[armel-cross] Shared libgcc broken

Bug #805581 reported by Ulrich Weigand on 2011-07-04
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro GCC
armel-cross-toolchain-base (Ubuntu)
Marcin Juszkiewicz

Bug Description

When building a trivial program with arm-linux-gnueabi-g++ or with arm-linux-gnueabi-gcc -shared-libgcc on Natty, I'm seeing failures like:
/usr/lib/gcc/arm-linux-gnueabi/4.5.2/../../../../arm-linux-gnueabi/bin/ld: warning: libc.so, needed by /usr/lib/gcc/arm-linux-gnueabi/4.5.2/libgcc_s.so.1, not found (try using -rpath or -rpath-link)

This is caused by a bogus DT_NEEDED entry in the shared libgcc file /usr/arm-linux-gnueabi/lib/libgcc_s.so.1 (as installed from libgcc1-armel-cross_4.5.2-8ubuntu3cross1.62_all.deb). "readelf -a" shows:
 0x00000001 (NEEDED) Shared library: [libc.so]

A dynamic dependency always needs to point to the per-major-level version of the library (i.e. libc.so.6); the file name without any suffix is only intended for use at static link time. This does not matter much with most libraries since the one name links to the other, but libc is a special case: libc.so is just a linker script, which is not understood by the dynamic loader.

The version of libgcc_s.so.1 that is actually installed on the native armel port is correct:
 0x00000001 (NEEDED) Shared library: [libc.so.6]

Looking at the oneric version of the libgcc1-armel-cross package, the library does not contain any DT_NEEDED records at all. While this probably prevent link error I'm seeing on Natty, it is still not quite correct since libgcc_s.so.1 actually does have a dependency on libc ...

I have not analyzed the libgcc1-armel-cross build process to understand how exactly the wrong DT_NEEDED record is generated.

Marcin Juszkiewicz (hrw) on 2011-07-06
Changed in gcc-linaro:
status: New → Invalid
Marcin Juszkiewicz (hrw) on 2012-01-18
Changed in armel-cross-toolchain-base (Ubuntu):
status: New → Fix Committed
no longer affects: gcc-4.5-armel-cross (Ubuntu)
Changed in armel-cross-toolchain-base (Ubuntu):
assignee: nobody → Marcin Juszkiewicz (hrw)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package armel-cross-toolchain-base - 1.77

armel-cross-toolchain-base (1.77) precise; urgency=low

  * Fixed paths for eglibc/stage1 - binaries moved from /lib to
  * Added build-gcc3 stamp to get libgcc1_s.so depending properly on libc.so.6
    - closes LP: #805581
  * Added hacky fix for debian/control generation - LP: #913734
  * Use all cpu cores during build of gcc.
  * PPA updates:
    - take care of linux-source dependency too
    - bumped versions
  * Debian updates:
    - rules: updated versions and handling of linux step under Debian
    - control: added lsb-release to build dependencies
    - eglibc: refreshed stages under Debian
    - linux: apply patches under Debian
  * removed code duplication for unpacking binutils
  * gcc: dropped merged patches
  * eglibc: refreshed patches
  * eglibc: disabled dh_shlibdeps as build was unable to find libraries dependencies
  * eglibc: dropped one patch as cross is using fortify now
 -- Marcin Juszkiewicz <email address hidden> Wed, 18 Jan 2012 08:03:12 +0100

Changed in armel-cross-toolchain-base (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers