Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] elfutils fails with undefined reference to
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
haven
Tux's lil' helper
Tux's lil' helper


Joined: 19 Nov 2003
Posts: 141
Location: Belfast, Uk

PostPosted: Tue Sep 25, 2012 7:35 pm    Post subject: [Solved] elfutils fails with undefined reference to Reply with quote

Hi All,

I'm getting this error when compiling either dev-libs/elfutils-0.155 or dev-libs/elfutils-0.154-r1 and when using either gcc 4.5.3 or 4.7.1 as my compile environment.
Code:

ldgeneric.o: In function `compute_hash_sum':
ldgeneric.c:(.text+0x108e): undefined reference to `__elf_getdata_internal'
collect2: ld returned 1 exit status
make[2]: *** [ld] Error 1


The build log can be found at: http://sprunge.us/iVXf

emerge --info: http://sprunge.us/MUgI

I get the same error whether compiling on a fresh install AMD (k8) build or on an existing Intel Core2 setup.

Any help appreciated as I don't know enough to dig deeper into this.

Many thanks for your time and any assistance you can give.
Back to top
View user's profile Send private message
haven
Tux's lil' helper
Tux's lil' helper


Joined: 19 Nov 2003
Posts: 141
Location: Belfast, Uk

PostPosted: Wed Sep 26, 2012 8:02 pm    Post subject: Reply with quote

After a lot of random testing it turned out to be due to having: -DPIC in my
use flags. Removing this when building elfutils solved the issue and the
compile succeeded.

-fPIC was used fine without any issues. Adding -Dno-PIC to
/etc/portage/packages.env for dev-libs/elfutils did not work either. From
watching the compile options during the successful build it seems that the
different compile options are used at different stages of the compile and
setting this or excluding it globally breaks things.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum