gperftools / gperftools

Main gperftools repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fail to compile latest version(2.15) in aarch64-centos-7.6 host

donglongchao opened this issue · comments

when link unittest there are some errors

/usr/bin/ld: .libs/debugallocation_test: hidden symbol `pthread_atfork' in /usr/lib64/libpthread_nonshared.a(pthread_atfork.oS) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

any hints about this ? There is no such error with x86-64 host.

aarch64: eu-nm /usr/lib64/libpthread.so.0 | grep fork
__fork |0000000000011d2c|GLOBAL|FUNC |0000000000000004| |.text
__fork_generation |0000000000034370|LOCAL |OBJECT |0000000000000008| |.bss
__libc_fork@@GLIBC_PRIVATE ||GLOBAL|FUNC || |UNDEF
__vfork |000000000000f280|GLOBAL|FUNC |0000000000000054| |.text
fork |0000000000011d2c|GLOBAL|FUNC |0000000000000004| |.text
old_pthread_atfork.c |0000000000000000|LOCAL |FILE |0000000000000000| |ABS
pt-fork.c |0000000000000000|LOCAL |FILE |0000000000000000| |ABS
pt-vfork.os |0000000000000000|LOCAL |FILE |0000000000000000| |ABS
vfork |000000000000f280|WEAK |FUNC |0000000000000054| |.text

x86-64: eu-nm /usr/lib64/libpthread.so.0 | grep fork
__dyn_pthread_atfork |000000000000ce70|LOCAL |FUNC |000000000000001c| |.text
__fork |0000000000010ac0|GLOBAL|FUNC |0000000000000005| |.text
__fork_generation |000000000021b458|LOCAL |OBJECT |0000000000000004| |.bss
__libc_fork@@GLIBC_PRIVATE ||GLOBAL|FUNC || |UNDEF
__register_atfork@@GLIBC_2.3.2 ||GLOBAL|FUNC || |UNDEF
__vfork |000000000000e630|GLOBAL|FUNC |0000000000000043| |.text
fork |0000000000010ac0|GLOBAL|FUNC |0000000000000005| |.text
old_pthread_atfork.c |0000000000000000|LOCAL |FILE |0000000000000000| |ABS
pt-fork.c |0000000000000000|LOCAL |FILE |0000000000000000| |ABS
pthread_atfork@GLIBC_2.2.5 |000000000000ce70|GLOBAL|FUNC |000000000000001c| |.text
vfork |000000000000e630|WEAK |FUNC |0000000000000043| |.text

aarch64: objdump -t /usr/lib64/libpthread_nonshared.a
In archive /usr/lib64/libpthread_nonshared.a:

pthread_atfork.oS: file format elf64-littleaarch64

SYMBOL TABLE:
0000000000000000 l d .text 0000000000000000 .text
0000000000000000 l d .data 0000000000000000 .data
0000000000000000 l d .bss 0000000000000000 .bss
0000000000000000 l d .comment 0000000000000000 .comment
0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack
0000000000000000 l d .eh_frame 0000000000000000 .eh_frame
0000000000000000 g F .text 0000000000000014 .hidden __pthread_atfork
0000000000000000 w UND 0000000000000000 .hidden __dso_handle
0000000000000000 UND 0000000000000000 __register_atfork
0000000000000000 g F .text 0000000000000014 .hidden pthread_atfork

x86-64: objdump -t /usr/lib64/libpthread_nonshared.a
In archive /usr/lib64/libpthread_nonshared.a:

pthread_atfork.oS: file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l d .text 0000000000000000 .text
0000000000000000 l d .data 0000000000000000 .data
0000000000000000 l d .bss 0000000000000000 .bss
0000000000000000 l d .comment 0000000000000000 .comment
0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack
0000000000000000 l d .eh_frame 0000000000000000 .eh_frame
0000000000000000 g F .text 000000000000001c .hidden __pthread_atfork
0000000000000000 w UND 0000000000000000 .hidden __dso_handle
0000000000000000 UND 0000000000000000 GLOBAL_OFFSET_TABLE
0000000000000000 UND 0000000000000000 __register_atfork
0000000000000000 g F .text 000000000000001c .hidden pthread_atfork

Thanks for the ticket. Just in case, can you please try against master? In principle it shouldn't be an error to link against hidden symbol, so perhaps something else is happening. And we did refactor automake rules quite a bit recently.

Thanks for the ticket. Just in case, can you please try against master? In principle it shouldn't be an error to link against hidden symbol, so perhaps something else is happening. And we did refactor automake rules quite a bit recently.

The master branch can be compiled successfully and appears to have no issues.

Ok then. Assuming fixed. (New release should come soon)