[Freeswitch-dev] mod_java link problem in build

Damjan Jovanovic damjan at ecntelecoms.com
Thu Nov 22 02:38:53 EST 2007


X-ECN Telecoms-MailScanner-Information: Contact ECN Telecoms
X-ECN Telecoms-MailScanner: Found to be clean
X-ECN Telecoms-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-96.982, required 6, AWL -0.61, FH_HOST_ALMOST_IP 1.75,
	RCVD_IN_PBL 0.91, RCVD_IN_SORBS_DUL 0.88, RDNS_DYNAMIC 0.10,
	USER_IN_WHITELIST -100.00)
X-ECN Telecoms-MailScanner-From: damjan at ecntelecoms.com
X-Spam-Status: No

On Wed, 2007-11-21 at 22:55 -0800, jonathan augenstine wrote:
> I just attempted the build of mod_java.  The previous problem is
> resolved but some new issues have cropped up.  There is a link problem
> now with unresolved symbols.  Below is a trace of the build.
> 
> Jonathan
> 
> 
> making all mod_java
> Compiling freeswitch_java.cpp... 
> Compiling switch_swig_wrap.cpp...
> Compiling mod_java.c...
> 
> Creating mod_java.so...
> Undefined symbols:
>   "operator delete(void*)", referenced from:
>       JavaSession::~JavaSession()in freeswitch_java.o 
>       JavaSession::~JavaSession()in freeswitch_java.o
>       _Java_org_freeswitch_swig
> _freeswitchJNI_delete_1input_1callback_1state_1t in switch_swig_wrap.o
> 
> _Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_10 in
> switch_swig_wrap.o 
> 
> _Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_12 in
> switch_swig_wrap.o
> 
> _Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_11 in
> switch_swig_wrap.o
>   "___gxx_personality_v0", referenced from: 
>       ___gxx_personality_v0$non_lazy_ptr in freeswitch_java.o
>       ___gxx_personality_v0$non_lazy_ptr in switch_swig_wrap.o
>   "operator new[](unsigned long)", referenced from:
> 
> _Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1funcargs_1set in switch_swig_wrap.o 
>   "operator delete[](void*)", referenced from:
> 
> _Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1funcargs_1set in switch_swig_wrap.o
>   "operator new(unsigned long)", referenced from: 
> 
> _Java_org_freeswitch_swig_freeswitchJNI_new_1input_1callback_1state_1t
> in switch_swig_wrap.o
> 
> _Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hook_1state_1get
> in switch_swig_wrap.o
> 
> _Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1run_1dtmf_1callback in switch_swig_wrap.o 
>       _Java_org_freeswitch_swig_freeswitchJNI_hanguphook in
> switch_swig_wrap.o
>       _Java_org_freeswitch_swig_freeswitchJNI_dtmf_1callback in
> switch_swig_wrap.o
> 
> _Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_10 in
> switch_swig_wrap.o 
> 
> _Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_12 in
> switch_swig_wrap.o
> 
> _Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1run_1dtmf_1callback in switch_swig_wrap.o
> 
> _Java_org_freeswitch_swig_freeswitchJNI_process_1callback_1result in
> switch_swig_wrap.o 
> 
> _Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_11 in
> switch_swig_wrap.o
>   "vtable for __cxxabiv1::__si_class_type_info", referenced from:
>       typeinfo for JavaSessionin freeswitch_java.o 
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> gcc
> -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers
> -DHasJava -fno-strict-aliasing
> -I/Users/jaugenstine/freeswitch/freeswitch/src/include
> -I/Users/jaugenstine/freeswitch/freeswitch/libs/libteletone/src
> -Werror -DMACOSX -g -O2 -Wall -std=c99 -pedantic -D_GNU_SOURCE
> -o .libs/mod_java.so -dynamic -bundle -force-flat-namespace mod_java.o
> -o .libs/mod_java.so freeswitch_java.o switch_swig_wrap.o
> -L/usr/local/lib /Users/jaugenstine/freeswitch/freeswitch/.libs/libfreeswitch.1.0.0.dylib -lm -lsqlite3 /usr/lib/libiconv.dylib /Users/jaugenstine/freeswitch/freeswitch/libs/apr/.libs/libapr- 1.a -ldl -lpthread
> make[5]: *** [mod_java.so] Error 1
> 
> make[4]: *** [all] Error 1
> make[3]: *** [mod_java-all] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1 
> make: *** [all] Error 2 

Neither mod_java nor any other module that uses C++ (eg. mod_python)
will currently link on MacOS, because on them maccies you apparently
have to link C++ code with g++ instead of ld like on every other
operating system in the world.

You can probably link it manually by using g++ instead of gcc in that
last command, and dropping the -std=c99.


> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

Good luck
Damjan





More information about the Freeswitch-dev mailing list