effortlesscoding / doubango

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

tinyDAV does not compile on MAC #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. get r867
2. apply patch contained in issue #233
3. compile

What is the expected output? What do you see instead?
it compiles. it does not compile.

What version of the product are you using? On what operating system?
r867, macOS X 10.7.5 with gnu tool, not Xcode

Please provide any additional information below.

make  all-recursive
Making all in tinySAK
make[2]: Nothing to be done for `all'.
Making all in tinyNET
make[2]: Nothing to be done for `all'.
Making all in tinyHTTP
make[2]: Nothing to be done for `all'.
Making all in tinyXCAP
make[2]: Nothing to be done for `all'.
Making all in tinyIPSec
make[2]: Nothing to be done for `all'.
Making all in tinySMS
make[2]: Nothing to be done for `all'.
Making all in tinySIGCOMP
make[2]: Nothing to be done for `all'.
Making all in tinySDP
make[2]: Nothing to be done for `all'.
Making all in tinyMSRP
make[2]: Nothing to be done for `all'.
Making all in tinyMEDIA
make[2]: Nothing to be done for `all'.
Making all in tinyRTP
make[2]: Nothing to be done for `all'.
Making all in tinyDAV
/bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2 DFLAGS -no-undefined  -o 
libtinyDAV.la -rpath /usr/local/lib libtinyDAV_la-tdav.lo 
libtinyDAV_la-tdav_session_av.lo libtinyDAV_la-tdav_consumer_audio.lo 
libtinyDAV_la-tdav_speakup_jitterbuffer.lo libtinyDAV_la-tdav_jitterbuffer.lo 
libtinyDAV_la-tdav_producer_audio.lo libtinyDAV_la-tdav_session_audio.lo 
libtinyDAV_la-tdav_speex_denoise.lo libtinyDAV_la-tdav_speex_jitterbuffer.lo 
libtinyDAV_la-tdav_speex_resampler.lo libtinyDAV_la-tdav_webrtc_denoise.lo 
libtinyDAV_la-tdav_consumer_video.lo libtinyDAV_la-tdav_converter_video.lo 
libtinyDAV_la-tdav_runnable_video.lo libtinyDAV_la-tdav_session_video.lo 
libtinyDAV_la-tdav_video_frame.lo libtinyDAV_la-tdav_video_jb.lo 
libtinyDAV_la-tdav_consumer_t140.lo libtinyDAV_la-tdav_producer_t140.lo 
libtinyDAV_la-tdav_session_t140.lo libtinyDAV_la-tdav_consumer_msrp.lo 
libtinyDAV_la-tdav_producer_msrp.lo libtinyDAV_la-tdav_session_msrp.lo 
libtinyDAV_la-tdav_codec_amr.lo libtinyDAV_la-g711.lo 
libtinyDAV_la-tdav_codec_g711.lo libtinyDAV_la-g722_decode.lo 
libtinyDAV_la-g722_encode.lo libtinyDAV_la-tdav_codec_g722.lo 
libtinyDAV_la-tdav_codec_g729.lo libtinyDAV_la-tdav_codec_gsm.lo 
libtinyDAV_la-tdav_codec_bv16.lo libtinyDAV_la-tdav_codec_bv32.lo 
libtinyDAV_la-tdav_codec_ilbc.lo libtinyDAV_la-tdav_codec_speex.lo 
libtinyDAV_la-tdav_codec_dtmf.lo libtinyDAV_la-tdav_codec_red.lo 
libtinyDAV_la-tdav_codec_ulpfec.lo libtinyDAV_la-tdav_codec_h261.lo 
libtinyDAV_la-tdav_codec_h263.lo libtinyDAV_la-tdav_codec_h264.lo 
libtinyDAV_la-tdav_codec_h264_rtp.lo libtinyDAV_la-tdav_codec_theora.lo 
libtinyDAV_la-tdav_codec_vp8.lo libtinyDAV_la-tdav_codec_mp4ves.lo 
libtinyDAV_la-tdav_codec_msrp.lo libtinyDAV_la-tdav_codec_t140.lo 
../tinySAK/libtinySAK.la ../tinyNET/libtinyNET.la ../tinySDP/libtinySDP.la 
../tinyRTP/libtinyRTP.la ../tinyMEDIA/libtinyMEDIA.la ../tinyMSRP/libtinyMSRP.la

ld: duplicate symbol _tdav_speakup_jitterbuffer_plugin_def_t in 
.libs/libtinyDAV_la-tdav_speakup_jitterbuffer.o and .libs/libtinyDAV_la-tdav.o 
for architecture x86_64

Original issue reported on code.google.com by agouaill...@gmail.com on 6 Apr 2013 at 4:42

GoogleCodeExporter commented 9 years ago
by default the compiler supposes the const variable to have only an internal 
scope, which means a copy of it is placed in each translation unit, leading to 
this problem.
explicitly telling the compiler that it should expect more than one copy around 
by using the "extern" keyword seems to work.

I still did not get answer on how to test it, so the only thing I can say is 
that this patch makes it compile. I let the developers the burden of the 
testing, by lack of any other choice.

Index: tinyDAV/include/tinydav/audio/tdav_speakup_jitterbuffer.h
===================================================================
--- tinyDAV/include/tinydav/audio/tdav_speakup_jitterbuffer.h   (revision 867)
+++ tinyDAV/include/tinydav/audio/tdav_speakup_jitterbuffer.h   (working copy)
@@ -52,7 +52,7 @@
 }
 tdav_speakup_jitterbuffer_t;

-const tmedia_jitterbuffer_plugin_def_t *tdav_speakup_jitterbuffer_plugin_def_t;
+extern const tmedia_jitterbuffer_plugin_def_t 
*tdav_speakup_jitterbuffer_plugin_def_t;

 TDAV_END_DECLS

Original comment by agouaill...@gmail.com on 9 Apr 2013 at 1:35

GoogleCodeExporter commented 9 years ago
alexandres-MacBook-Air:doubango agouaillard$ make
make  all-recursive
Making all in tinySAK
make[2]: Nothing to be done for `all'.
Making all in tinyNET
make[2]: Nothing to be done for `all'.
Making all in tinyHTTP
make[2]: Nothing to be done for `all'.
Making all in tinyXCAP
make[2]: Nothing to be done for `all'.
Making all in tinyIPSec
make[2]: Nothing to be done for `all'.
Making all in tinySMS
make[2]: Nothing to be done for `all'.
Making all in tinySIGCOMP
make[2]: Nothing to be done for `all'.
Making all in tinySDP
make[2]: Nothing to be done for `all'.
Making all in tinyMSRP
make[2]: Nothing to be done for `all'.
Making all in tinyMEDIA
make[2]: Nothing to be done for `all'.
Making all in tinyRTP
make[2]: Nothing to be done for `all'.
Making all in tinyDAV
make[2]: Nothing to be done for `all'.
Making all in tinySIP
make[2]: Nothing to be done for `all'.
alexandres-MacBook-Air:doubango agouaillard$ 

Original comment by agouaill...@gmail.com on 9 Apr 2013 at 1:35

GoogleCodeExporter commented 9 years ago
You're right: I will add "TINYDAV_GEXTERN" (the next commit)

Original comment by boss...@yahoo.fr on 9 Apr 2013 at 5:13

GoogleCodeExporter commented 9 years ago
r870+

Original comment by boss...@yahoo.fr on 9 Apr 2013 at 11:24

GoogleCodeExporter commented 9 years ago
verified

Original comment by agouaill...@gmail.com on 10 Apr 2013 at 1:40