Description of problem: Latest elfutils 0.119 fail to compile if there isn't already an elfutils installed on the system, of course it should use the compiled elfutils from source dir: this occurs because for compilation of some files from elfutils, there is missing information on Makefile.am to use the libelf compiled in source dir, so compiler/linker tries to find libelf on the system and don't find it because it isn't installed and compilation fails (so you can't see the bug if you already have libelf installed on the system). Version-Release number of selected component (if applicable): 0.119 How reproducible: Obtain elfutils 0.119. Try to compile it on a system without libelf/elfutils already installed. Steps to Reproduce: See "How reproducible" Actual results: Compilation fails, example output: if gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DSRCDIR=\"/home/testes/elfutils/BUILD/elfutils-0.119/src\" -DOBJDIR=\"/home/testes/e lfutils/BUILD/elfutils-0.119/build/src\" -I. -I../../src -I.. -I../../src -I../../src/../libelf -I../../src/../libebl -I../ ../src/../libdw -I../../src/../libdwfl -I../../src/../lib -I.. -Wall -Wshadow -std=gnu99 -Werror -Wunused -Wextra -Wform at=2 -O2 -g -fexceptions -MT addr2line.o -MD -MP -MF ".deps/addr2line.Tpo" -c -o addr2line.o ../../src/addr2line.c; \ then mv -f ".deps/addr2line.Tpo" ".deps/addr2line.Po"; else rm -f ".deps/addr2line.Tpo"; exit 1; fi gcc -Wall -Wshadow -std=gnu99 -Werror -Wunused -Wextra -Wformat=2 -O2 -g -fexceptions -o addr2line addr2line.o ../libdw /libdw.so /usr/bin/ld: warning: libelf.so.1, needed by ../libdw/libdw.so, not found (try using -rpath or -rpath-link) ../libdw/libdw.so: undefined reference to `gelf_getsymshndx' ../libdw/libdw.so: undefined reference to `elf32_xlatetof' ../libdw/libdw.so: undefined reference to `elf_errno' ../libdw/libdw.so: undefined reference to `elf_kind' ../libdw/libdw.so: undefined reference to `gelf_update_shdr' (...) ../libdw/libdw.so: undefined reference to `elf_getscn' collect2: ld returned 1 exit status make[2]: ** [addr2line] Erro 1 rm i386_ld.o make[2]: Leaving directory `/home/testes/elfutils/BUILD/elfutils-0.119/build/src' make[1]: ** [all-recursive] Erro 1 make[1]: Leaving directory `/home/testes/elfutils/BUILD/elfutils-0.119/build' make: ** [all] Erro 2 Expected results: Compilation should be successful Additional info: I'm opening this bug here for Fedora because elfutils doesn't have an official home page/links or bugzilla or mailing list itself (if something exists I couldn't find), and I think it's better then mailing the author(s) directly and elfutils was created and/or is modified by Ulrich Drepper and Roland McGrath from what I could see in the ChangeLog file entries, and they work for Red Hat :) Solution: I created a patch, I'll attach it to this ticket, that solves the problem.
Created attachment 125551 [details] Patch that fix the problem reported on this ticket
This should be fixed in 0.120, please verify.
It's ok with 0.120-2, I don't have this problem anymore, thanks.