Bug 183675

Summary: elfutils fail to compile under certain conditions
Product: [Fedora] Fedora Reporter: Herton Ronaldo Krzesinski <herton>
Component: elfutilsAssignee: Roland McGrath <roland>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: drepper
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.120 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-13 23:39:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch that fix the problem reported on this ticket none

Description Herton Ronaldo Krzesinski 2006-03-02 18:38:05 UTC
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.

Comment 1 Herton Ronaldo Krzesinski 2006-03-02 18:38:06 UTC
Created attachment 125551 [details]
Patch that fix the problem reported on this ticket

Comment 2 Roland McGrath 2006-04-13 22:05:17 UTC
This should be fixed in 0.120, please verify.

Comment 3 Herton Ronaldo Krzesinski 2006-04-13 23:28:18 UTC
It's ok with 0.120-2, I don't have this problem anymore, thanks.