Bug 1371778 - gcc-arm-linux-gnu will not run as cross compiler on x86_64
Summary: gcc-arm-linux-gnu will not run as cross compiler on x86_64
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: cross-gcc
Version: 24
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: David Howells
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-31 05:30 UTC by Tom Trebisky
Modified: 2016-09-19 15:32 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 15:32:14 UTC
Type: Bug


Attachments (Terms of Use)

Description Tom Trebisky 2016-08-31 05:30:36 UTC
Description of problem:
On a fresh F24 install on an x86_64 system, I did a dnf install of gcc-arm-linux-gnu and attempted to use it.  It fails, first being unable to find "cc1", then when given a -B option to override the improper GCC_EXEC_PREFIX compiled in, it attempts to run the intel assembler on the arm output from the compiler.


Version-Release number of selected component (if applicable):
6.1.1-2.fc24

How reproducible:
Easy


Steps to Reproduce:
1. dnf install the compiler
2. create some trivial C file
3. run arm-linux-gnu-gcc -c trivial.c

Actual results:
arm-linux-gnu-gcc: error trying to exec 'cc1': execvp: No such file or directory
Then if you supply -B/usr/libexec/gcc you get a bit further and get:
Fatal error: invalid -march= option: `armv7-a'


Expected results: it would yield no errors and produce trivial.o


Additional info:

I did a "dnf erase arm-linux-gnu-gcc, then went back to the F23 repository and obtained the 4 RPMs for the 5.3.1 version of the compiler and installed them using rpm -Uvh and everything works perfectly.

It looks like this is just improperly built as a cross compiler.  I am almost tempted to get the gcc-6.1.1 source and build it, but will just use the 5.3.1 version until this gets straightened out.

Comment 1 Tom Trebisky 2016-09-18 00:19:30 UTC
This is quite strange, but this entire problem seems to have gone away by itself.  Yesterday I did a dnf update, which pulled in the gcc-arm-linux-gnu-6.1.1-2 packages and now it all works perfectly fine.  I am baffled, but I guess this is good news.  I have tried a variety of things to try to reproduce the problem I reported, installing and uninstalling both 6.1.1 and 5.3.1 - but it all just works (and I haven't changed my make system either).  I would like to suspect that somehow 6.1.1 has problems on a fresh Fedora install, but works when installed as an update over 5.3.1, but I am making wild guesses and have no way to test this theory other than by reinstalling Fedora, which I am not about to do.

This will simply have to remain one of the universes great unsolved mysteries ....  My apologies for the irreproduceable bug report.  Honest though, I didn't imagine all this.

Comment 2 David Howells 2016-09-19 15:32:14 UTC
cross-gcc-6.1.1-2 works fine for me on a new F24 installation.  I'm going to close the bug for the moment.


Note You need to log in before you can comment on or make changes to this bug.