I'm trying (and failing) to build elfutils 0.153 on my i686 Linux box.
The lines around the error are:
gcc -std=gnu99 -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -g -O2 -o libdw.so -shared -o libdw.so -Wl,--soname,libdw.so.1,-z,defs \ -Wl,--enable-new-dtags,-rpath,/usr/lib/elfutils \ -Wl,--version-script,libdw.map,--no-undefined \ -Wl,--whole-archive libdw_pic.a ../libdwfl/libdwfl_pic.a ../libebl/libebl.a ../libelf/libelf.so -Wl,--no-whole-archive\ -ldl -llzma -lbz2 -lz if readelf -d libdw.so | fgrep -q TEXTREL; then exit 1; fi make[1]: *** [libdw.so] Error 1
For good measure I ran "readelf -d | fgrep TEXTREL" on libdl.so, liblzma.so, libbz2.so, and libz.so, but they all come back clean.
Running readelf -d libdw.so gets me:
Dynamic section at offset 0x49a60 contains 32 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libelf.so.1] 0x00000001 (NEEDED) Shared library: [libdl.so.2] 0x00000001 (NEEDED) Shared library: [liblzma.so.5] 0x00000001 (NEEDED) Shared library: [libbz2.so.1.0] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux.so.2] 0x0000000e (SONAME) Library soname: [libdw.so.1] 0x0000000f (RPATH) Library rpath: [/usr/lib/elfutils] 0x0000001d (RUNPATH) Library runpath: [/usr/lib/elfutils] 0x0000000c (INIT) 0x542c 0x0000000d (FINI) 0x39f58 0x00000004 (HASH) 0xf4 0x00000005 (STRTAB) 0x1df0 0x00000006 (SYMTAB) 0xa10 0x0000000a (STRSZ) 4725 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000003 (PLTGOT) 0x4abb0 0x00000002 (PLTRELSZ) 992 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x504c 0x00000011 (REL) 0x35bc 0x00000012 (RELSZ) 6800 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000016 (TEXTREL) 0x0 0x6ffffffc (VERDEF) 0x32e4 0x6ffffffd (VERDEFNUM) 14 0x0000001e (FLAGS) TEXTREL 0x6ffffffe (VERNEED) 0x34cc 0x6fffffff (VERNEEDNUM) 4 0x6ffffff0 (VERSYM) 0x3066 0x6ffffffa (RELCOUNT) 764 0x00000000 (NULL) 0x0
Here's the following versions of packages installed: gcc 4.6.3 binutils 2.22 glibc 2.15 Linux 3.3.1
Any ideas? I'm stumped.
When reporting a build problem, always show the complete configure and make command lines you used, and any environment variables you set that might be relevant. If you are building from git rather than from the release tar file (or you used --enable-maintainer-mode), then you also need to tell us which versions of autoconf and automake you used.
If you have a previous version of elfutils already installed or built, then use the eu-findtextrel tool on libdw.so. If you don't, then you can comment out that readelf | fgrep line from libdw/Makefile to let the build complete, and then run the src/findtextrel program just built, like this:
LD_LIBRARY_PATH=libelf:libdw:backends ./src/findtextrel libdw/libdw.so
If that produces a torrent of output, then it's likely that you somehow managed to compile without -fpic, which shouldn't really be possible unless you changed something. In that event, we'll likely need to see the entire output from configure and make to help you.
If it produces just a little output, then there may be something wrong with your compiler installation or something like that. But we won't really be able even to guess until we see all those details.
Thanks, Roland
elfutils-devel@lists.fedorahosted.org