Build Failure on 64 bit Fedora 21

Martin Fouts
Sat Mar 21 22:00:00 GMT 2015

Ld cannot find libc during check to see if gcc can compile a statically
linked program.


When running ./ct-ng build the error below appears in the log and the build
On Fedora 21, at least on 64 bit systems, the static libraries are not
installed by default.


UNCONFIRMED  (I assume that's what a first report should be marked as.)


Uncertain.  Perhaps modifying the error handling for the test to see if the
error is a missing library and clarifying that it appears static libraries
are not installed?


Install the static libraries.  Actually, this is part of the fix as well.  I
only marked it as a workaround because I think the scripts could be made
more robust in addition.

To install:

sudo yum install glibc-static

The actual  error report:

[ERROR]    collect2: error: ld returned 1 exit status
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Checking that gcc can compile a trivial
statically linked program (CT_WANTS_STATIC_LINK)'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: main[scripts/]

For unsubscribe information see

More information about the crossgcc mailing list