mydecember / doubango-1

Automatically exported from code.google.com/p/doubango
0 stars 0 forks source link

tinyNET does not compile on MacOS 64b #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
following technical documentation for recompilation of doubango, I reached that:
ld: duplicate symbol _type in .libs/libtinyNET_la-tnet_ice_ctx.o and 
.libs/libtinyNET_la-tnet_ice_candidate.o for architecture x86_64

What version of the product are you using? On what operating system?
branch 2.0
macosX 10.7.5
i686-apple-darwin11-llvm-gcc-4.2

Please provide any additional information below.
poking around to see where the error could come from, it appears that the 
culprit is tinyNET/src/ice/tnet_ice_utils.h:33
I suspect that, each .c file being compiled separately, the usual #ifndef / 
#def / #endif guards are not enough to protect from double inclusion. I have no 
idea how to fix that cleanly in the context of doubango.

Original issue reported on code.google.com by agouaill...@gmail.com on 11 Jan 2013 at 7:42

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 11 Jan 2013 at 10:08

GoogleCodeExporter commented 9 years ago
Here are the gory details leading up to the bitter failure.  So close, yet so 
far@  Hope this issue gets resolved!!

The nail in the coffin comes with

duplicate symbol _socket_type in:
    .libs/libtinyNET_la-tnet_ice_candidate.o
    .libs/libtinyNET_la-tnet_ice_utils.o
ld: 6 duplicate symbols for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [libtinyNET.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

see below..

src/tls/tnet_dtls.c:637: warning: 'SSL_shutdown' is deprecated (declared at 
/usr/include/openssl/ssl.h:1532)
src/tls/tnet_dtls.c:638: warning: 'SSL_free' is deprecated (declared at 
/usr/include/openssl/ssl.h:1490)
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../tinySAK/src -I./src 
-DHAVE_OPENSSL=1 -g -O2 -MT libtinyNET_la-tnet_dtls.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_dtls.Tpo -c src/tls/tnet_dtls.c -o 
libtinyNET_la-tnet_dtls.o >/dev/null 2>&1
mv -f .deps/libtinyNET_la-tnet_dtls.Tpo .deps/libtinyNET_la-tnet_dtls.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  
-I../tinySAK/src -I./src -DHAVE_OPENSSL=1   -g -O2 -MT 
libtinyNET_la-tnet_turn.lo -MD -MP -MF .deps/libtinyNET_la-tnet_turn.Tpo -c -o 
libtinyNET_la-tnet_turn.lo `test -f 'src/turn/tnet_turn.c' || echo 
'./'`src/turn/tnet_turn.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../tinySAK/src -I./src 
-DHAVE_OPENSSL=1 -g -O2 -MT libtinyNET_la-tnet_turn.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn.Tpo -c src/turn/tnet_turn.c  -fno-common -DPIC -o 
.libs/libtinyNET_la-tnet_turn.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../tinySAK/src -I./src 
-DHAVE_OPENSSL=1 -g -O2 -MT libtinyNET_la-tnet_turn.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn.Tpo -c src/turn/tnet_turn.c -o 
libtinyNET_la-tnet_turn.o >/dev/null 2>&1
mv -f .deps/libtinyNET_la-tnet_turn.Tpo .deps/libtinyNET_la-tnet_turn.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  
-I../tinySAK/src -I./src -DHAVE_OPENSSL=1   -g -O2 -MT 
libtinyNET_la-tnet_turn_attribute.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn_attribute.Tpo -c -o 
libtinyNET_la-tnet_turn_attribute.lo `test -f 'src/turn/tnet_turn_attribute.c' 
|| echo './'`src/turn/tnet_turn_attribute.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../tinySAK/src -I./src 
-DHAVE_OPENSSL=1 -g -O2 -MT libtinyNET_la-tnet_turn_attribute.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn_attribute.Tpo -c src/turn/tnet_turn_attribute.c  
-fno-common -DPIC -o .libs/libtinyNET_la-tnet_turn_attribute.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../tinySAK/src -I./src 
-DHAVE_OPENSSL=1 -g -O2 -MT libtinyNET_la-tnet_turn_attribute.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn_attribute.Tpo -c src/turn/tnet_turn_attribute.c 
-o libtinyNET_la-tnet_turn_attribute.o >/dev/null 2>&1
mv -f .deps/libtinyNET_la-tnet_turn_attribute.Tpo 
.deps/libtinyNET_la-tnet_turn_attribute.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  
-I../tinySAK/src -I./src -DHAVE_OPENSSL=1   -g -O2 -MT 
libtinyNET_la-tnet_turn_message.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn_message.Tpo -c -o 
libtinyNET_la-tnet_turn_message.lo `test -f 'src/turn/tnet_turn_message.c' || 
echo './'`src/turn/tnet_turn_message.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../tinySAK/src -I./src 
-DHAVE_OPENSSL=1 -g -O2 -MT libtinyNET_la-tnet_turn_message.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn_message.Tpo -c src/turn/tnet_turn_message.c  
-fno-common -DPIC -o .libs/libtinyNET_la-tnet_turn_message.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../tinySAK/src -I./src 
-DHAVE_OPENSSL=1 -g -O2 -MT libtinyNET_la-tnet_turn_message.lo -MD -MP -MF 
.deps/libtinyNET_la-tnet_turn_message.Tpo -c src/turn/tnet_turn_message.c -o 
libtinyNET_la-tnet_turn_message.o >/dev/null 2>&1
mv -f .deps/libtinyNET_la-tnet_turn_message.Tpo 
.deps/libtinyNET_la-tnet_turn_message.Plo
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -g -O2 DFLAGS -no-undefined  -o 
libtinyNET.la -rpath /usr/local/lib libtinyNET_la-tnet.lo 
libtinyNET_la-tnet_auth.lo libtinyNET_la-tnet_endianness.lo 
libtinyNET_la-tnet_nat.lo libtinyNET_la-tnet_poll.lo 
libtinyNET_la-tnet_socket.lo libtinyNET_la-tnet_transport.lo 
libtinyNET_la-tnet_transport_poll.lo libtinyNET_la-tnet_utils.lo 
libtinyNET_la-tnet_dhcp.lo libtinyNET_la-tnet_dhcp_message.lo 
libtinyNET_la-tnet_dhcp_option.lo libtinyNET_la-tnet_dhcp_option_sip.lo 
libtinyNET_la-tnet_dhcp6.lo libtinyNET_la-tnet_dhcp6_duid.lo 
libtinyNET_la-tnet_dhcp6_message.lo libtinyNET_la-tnet_dhcp6_option.lo 
libtinyNET_la-tnet_dns.lo libtinyNET_la-tnet_dns_a.lo 
libtinyNET_la-tnet_dns_aaaa.lo libtinyNET_la-tnet_dns_cname.lo 
libtinyNET_la-tnet_dns_message.lo libtinyNET_la-tnet_dns_mx.lo 
libtinyNET_la-tnet_dns_naptr.lo libtinyNET_la-tnet_dns_ns.lo 
libtinyNET_la-tnet_dns_opt.lo libtinyNET_la-tnet_dns_ptr.lo 
libtinyNET_la-tnet_dns_regexp.lo libtinyNET_la-tnet_dns_resolvconf.lo 
libtinyNET_la-tnet_dns_rr.lo libtinyNET_la-tnet_dns_soa.lo 
libtinyNET_la-tnet_dns_srv.lo libtinyNET_la-tnet_dns_txt.lo 
libtinyNET_la-tnet_ice_candidate.lo libtinyNET_la-tnet_ice_ctx.lo 
libtinyNET_la-tnet_ice_event.lo libtinyNET_la-tnet_ice_pair.lo 
libtinyNET_la-tnet_ice_utils.lo libtinyNET_la-tnet_stun.lo 
libtinyNET_la-tnet_stun_attribute.lo libtinyNET_la-tnet_stun_message.lo 
libtinyNET_la-tnet_tls.lo libtinyNET_la-tnet_dtls.lo libtinyNET_la-tnet_turn.lo 
libtinyNET_la-tnet_turn_attribute.lo libtinyNET_la-tnet_turn_message.lo 
../tinySAK/libtinySAK.la -lssl -lcrypto -lresolv 
libtool: link: gcc -dynamiclib  -o .libs/libtinyNET.0.dylib  
.libs/libtinyNET_la-tnet.o .libs/libtinyNET_la-tnet_auth.o 
.libs/libtinyNET_la-tnet_endianness.o .libs/libtinyNET_la-tnet_nat.o 
.libs/libtinyNET_la-tnet_poll.o .libs/libtinyNET_la-tnet_socket.o 
.libs/libtinyNET_la-tnet_transport.o .libs/libtinyNET_la-tnet_transport_poll.o 
.libs/libtinyNET_la-tnet_utils.o .libs/libtinyNET_la-tnet_dhcp.o 
.libs/libtinyNET_la-tnet_dhcp_message.o .libs/libtinyNET_la-tnet_dhcp_option.o 
.libs/libtinyNET_la-tnet_dhcp_option_sip.o .libs/libtinyNET_la-tnet_dhcp6.o 
.libs/libtinyNET_la-tnet_dhcp6_duid.o .libs/libtinyNET_la-tnet_dhcp6_message.o 
.libs/libtinyNET_la-tnet_dhcp6_option.o .libs/libtinyNET_la-tnet_dns.o 
.libs/libtinyNET_la-tnet_dns_a.o .libs/libtinyNET_la-tnet_dns_aaaa.o 
.libs/libtinyNET_la-tnet_dns_cname.o .libs/libtinyNET_la-tnet_dns_message.o 
.libs/libtinyNET_la-tnet_dns_mx.o .libs/libtinyNET_la-tnet_dns_naptr.o 
.libs/libtinyNET_la-tnet_dns_ns.o .libs/libtinyNET_la-tnet_dns_opt.o 
.libs/libtinyNET_la-tnet_dns_ptr.o .libs/libtinyNET_la-tnet_dns_regexp.o 
.libs/libtinyNET_la-tnet_dns_resolvconf.o .libs/libtinyNET_la-tnet_dns_rr.o 
.libs/libtinyNET_la-tnet_dns_soa.o .libs/libtinyNET_la-tnet_dns_srv.o 
.libs/libtinyNET_la-tnet_dns_txt.o .libs/libtinyNET_la-tnet_ice_candidate.o 
.libs/libtinyNET_la-tnet_ice_ctx.o .libs/libtinyNET_la-tnet_ice_event.o 
.libs/libtinyNET_la-tnet_ice_pair.o .libs/libtinyNET_la-tnet_ice_utils.o 
.libs/libtinyNET_la-tnet_stun.o .libs/libtinyNET_la-tnet_stun_attribute.o 
.libs/libtinyNET_la-tnet_stun_message.o .libs/libtinyNET_la-tnet_tls.o 
.libs/libtinyNET_la-tnet_dtls.o .libs/libtinyNET_la-tnet_turn.o 
.libs/libtinyNET_la-tnet_turn_attribute.o 
.libs/libtinyNET_la-tnet_turn_message.o   ../tinySAK/.libs/libtinySAK.dylib 
-lssl -lcrypto -lresolv  -O2   -install_name  /usr/local/lib/libtinyNET.0.dylib 
-compatibility_version 1 -current_version 1.0 -Wl,-single_module
duplicate symbol _type in:
    .libs/libtinyNET_la-tnet_ice_candidate.o
    .libs/libtinyNET_la-tnet_ice_ctx.o
duplicate symbol _socket_type in:
    .libs/libtinyNET_la-tnet_ice_candidate.o
    .libs/libtinyNET_la-tnet_ice_ctx.o
duplicate symbol _type in:
    .libs/libtinyNET_la-tnet_ice_candidate.o
    .libs/libtinyNET_la-tnet_ice_pair.o
duplicate symbol _socket_type in:
    .libs/libtinyNET_la-tnet_ice_candidate.o
    .libs/libtinyNET_la-tnet_ice_pair.o
duplicate symbol _type in:
    .libs/libtinyNET_la-tnet_ice_candidate.o
    .libs/libtinyNET_la-tnet_ice_utils.o
duplicate symbol _socket_type in:
    .libs/libtinyNET_la-tnet_ice_candidate.o
    .libs/libtinyNET_la-tnet_ice_utils.o
ld: 6 duplicate symbols for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [libtinyNET.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Original comment by a...@mrgray.com on 7 Mar 2013 at 4:11

GoogleCodeExporter commented 9 years ago
Fixed in r867: https://code.google.com/p/doubango/source/detail?r=867

Original comment by boss...@yahoo.fr on 6 Apr 2013 at 4:53