gcc-linaro won't build on Natty

Bug #744908 reported by Ken Werner
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro GCC
Won't Fix
Undecided
Unassigned

Bug Description

Ubuntu Natty puts glibc into a multilib path (/usr/lib/arm-linux-gnueabi or /usr/lib/x86_64-linux-gnu) and the linaro-gcc fails to find the crt files. It fails to link libgcc: https://pastebin.linaro.org/54/.

As a workaround I adjusted the LIBRARY_PATH environment variable:
  $ /home/kwerner/data/gcc-linaro-build/./gcc/xgcc --print-file-name=crti.o
  crti.o

  $ export LIBRARY_PATH=/usr/lib/arm-linux-gnueabi
  $ /home/kwerner/data/gcc-linaro-build/./gcc/xgcc --print-file-name=crti.o
  /usr/lib/arm-linux-gnueabi/crti.o

It seems that the natty gcc has a some multiarch patches on top:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/gcc-4.5/natty/files/head:/debian/patches/

Revision history for this message
Steve Langasek (vorlon) wrote :

Matthias has uploaded a workaround for this by way of eglibc, to add compat symlinks back to /usr/lib/*.o in the -dev package. This will probably not be accepted until after beta; in the meantime you can grab the source package from https://launchpad.net/ubuntu/natty/+queue?queue_state=1&queue_text=eglibc if you want to test it.

Revision history for this message
Ken Werner (kwerner) wrote :

I've created the symlinks manually and it worked. However, I think it would be nice if the GCC could find the appropriate directory on its own.

Revision history for this message
Michael Hope (michaelh1) wrote :

I've talked with Steve about this. This change is appearing in Ubuntu first, hopefully Debian second, then he wants to start talking with other distros. The work-around that Matthias has done is fine for the short term - anyone who installs the libc6-dev package will get the right files in the right places so that past and current GCCs can build.

Marking as won't fix as for now it's Ubuntu specific. Steve will get a hold of us if we can help on the GCC side in the future.

Changed in gcc-linaro:
status: New → Won't Fix
Revision history for this message
Matthias Kretz (mkretz) wrote :

I don't get this. Is there a rationale documented somewhere why the move to the x86_64-linux-gnu (or other) was made? Google didn't help me find anything. And I have not yet been able to figure out how you recommend GCC to be compiled. GCC 4.6.0 packages, at least, don't compile.

Revision history for this message
Ken Werner (kwerner) wrote :

@Matthias
Ulrich Weigand wrote a nice document about this: http://lists.linaro.org/pipermail/linaro-toolchain/2010-July/000058.html
You may also have a look at http://wiki.debian.org/Multiarch/

Revision history for this message
Matthias Kretz (mkretz) wrote :

Thank you for these links! I agree that it's a good way to go forward. But please make sure that upstream releases still work on your released distributions.
In this case, I tracked it down to my binutils installation. The latest binutils release compiles fine, but the result is unusable. The next binutils release should require no patches to work on Ubuntu, IMO (I didn't check, but I hope the required patches are already integrated upstream?).
In a perfect world the working binutils release would have happened before this change to Ubuntu. Until that is the case, I'd have placed symlinks in /usr/lib and /lib, so that compatibility with the old behavior were still available.

I now adjusted by GCC build script to patch binutils such that it works also on Ubuntu Natty.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.