[Bug 1515159] Re: libfl.so contains text instead of ELF code
Alexander Steffen
Alexander.Steffen at infineon.com
Mon Nov 16 16:25:02 UTC 2015
I've got a binary, that is linked against libfl.so.2 (in this case a
pre-built toolchain from Arch Linux ARM:
http://archlinuxarm.org/builder/xtools/x-tools7h.tar.xz). If try to run
that binary on Ubuntu with libfl-dev (>=2.5.39) installed, I get this
result:
$ ./arm-unknown-linux-gnueabihf-ar
./arm-unknown-linux-gnueabihf-ar: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libfl.so.2: invalid ELF header
ldd shows the same message:
$ ldd arm-unknown-linux-gnueabihf-ar
./arm-unknown-linux-gnueabihf-ar: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libfl.so.2: invalid ELF header
If I replace /usr/lib/x86_64-linux-gnu/libfl.so.2.0.0 with the corresponding file for example from Arch Linux (https://www.archlinux.org/packages/core/x86_64/flex/), everything works:
$ ldd arm-unknown-linux-gnueabihf-ar
linux-vdso.so.1 => (0x00007fff0f059000)
libfl.so.2 => /usr/lib/x86_64-linux-gnu/libfl.so.2 (0x00007f3543573000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f354335a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3543156000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3542d91000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3542a8b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3543775000)
I took a look at what other major (non-Debian-based) distributions do with regard to libfl.so. Many do not seem to provide libfl.so at all, but those that do provide a binary file, not a linker script. So it seems to me that Ubuntu is doing something strange here, that is not compatible with other distributions. Is it for backwards compatibility or how should I interpret your quote?
Arch Linux: binary libfl.so (https://www.archlinux.org/packages/core/x86_64/flex/download/)
Fedora: no libfl.so (https://apps.fedoraproject.org/packages/flex-devel/)
Gentoo: no libfl.so (www.portagefilelist.de/site/query/listPackageFiles/?category=sys-devel&package=flex&version=2.5.39-r1&do)
openSUSE: no libfl.so (https://software.opensuse.org/package/flex)
Slackware: binary libfl.so (http://mirrors.slackware.com/slackware/slackware-current/slackware/d/flex-2.5.39-i486-1.txz)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to flex in Ubuntu.
https://bugs.launchpad.net/bugs/1515159
Title:
libfl.so contains text instead of ELF code
Status in flex package in Ubuntu:
Incomplete
Bug description:
All variants of the package libfl-dev (from precise to xenial, for
both amd64 and i386) available from http://packages.ubuntu.com/
contain a broken libfl.so or libfl.so.2.0.0. The file does not contain
ELF code, but readable text (a GNU ld script according to the text).
Trying to use a binary that relies on this shared library then
obviously fails with "error while loading shared libraries:
/usr/lib/x86_64-linux-gnu/libfl.so.2: invalid ELF header".
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flex/+bug/1515159/+subscriptions
More information about the foundations-bugs
mailing list