Bug 1371778

Summary: gcc-arm-linux-gnu will not run as cross compiler on x86_64
Product: [Fedora] Fedora Reporter: Tom Trebisky <tom>
Component: cross-gccAssignee: David Howells <dhowells>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 24CC: dan, davejohansen, dhowells, jakub, jwakely, law, mpolacek, tom
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-19 15:32:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.