View previous topic :: View next topic |
Author |
Message |
haven Tux's lil' helper
Joined: 19 Nov 2003 Posts: 141 Location: Belfast, Uk
|
Posted: Tue Sep 25, 2012 7:35 pm Post subject: [Solved] elfutils fails with undefined reference to |
|
|
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 |
|
|
haven Tux's lil' helper
Joined: 19 Nov 2003 Posts: 141 Location: Belfast, Uk
|
Posted: Wed Sep 26, 2012 8:02 pm Post subject: |
|
|
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 |
|
|
|