multiple definition of `debug'
samueloph opened this issue · 3 comments
samueloph commented
I have got the following error while building thc-ipv6:
gcc -g -O2 -fdebug-prefix-map=/home/build-area/thc-ipv6-3.2=. -fstack-protector-strong -Wformat -Werror=format-security -falign-functions -falign-jumps -falign-loops -falign-labels -freorder-blocks -freorder-blocks-and-partition -D_HAVE_SSL -Wdate-time -D_FORTIFY_SOURCE=2 -o atk6-thcping6 thcping6.c thc-ipv6-lib.o -Wl,-z,relro -Wl,-z,now -lpcap -lssl -lcrypto
thc-ipv6-lib.o:(.bss+0x2c): multiple definition of `debug'
/tmp/ccnNvhca.o:(.bss+0x10): first defined here
collect2: error: ld returned 1 exit status
Makefile:43: recipe for target 'atk6-dnssecwalk' failed
make[1]: *** [atk6-dnssecwalk] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: /tmp/ccfDVHYt.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:43: recipe for target 'atk6-dnsdict6' failed
make[1]: *** [atk6-dnsdict6] Error 1
It looks like debug is being defined on three files:
thc-ipv6-lib.c
dnssecwalk.c
sendpeesmp6.c
Please also note the other error:
/usr/bin/ld: /tmp/ccfDVHYt.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
vanhauser-thc commented
I fixed the debug definitions.
I don't know anything about the libpthread linking. It does not happen for me, nor do I know what is going wrong. do you have more information?
vanhauser-thc commented
can you please check with the current github version of the ld pthread error still occurs and if so provide more information? otherwise I will close the issue
samueloph commented
Hello, sorry for the delay, i can't replicate the problem anymore, i think the pthread problem was something on my side.
I'll close this, thanks for the feedback and debug fix.