[Freeswitch-dev] mod_java build problem

Damjan Jovanovic damjan at ecntelecoms.com
Mon Nov 19 00:52:27 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.953, required 6, AWL -0.59, 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 Sun, 2007-11-18 at 11:24 -0800, jonathan augenstine wrote:
> I am trying to build the mod_java module and I am encountering a
> compile problem.  Initially, I encountered this on OSX and chalked it
> off to a BSD gcc issue (I have encountered issues with BSD build
> problems before and yet it will build successfully on Linux).  I then
> attempted to build on Fedora and encountered the same exact problem.
> The error listed is a pointer initialization issue: 
> 
> making all mod_java
> Compiling freeswitch_java.cpp...
> Compiling switch_swig_wrap.cpp...
> Compiling mod_java.c...
> cc1: warnings being treated as errors
> mod_java.c:117: warning: initialization from incompatible pointer
> type 
> make[5]: *** [mod_java.o] 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
> 
> mod_java.c:
> 115 static switch_application_interface_t java_application_interface =
> {
> 116         /*.interface_name */ "java",
> 117         /*.application_function */ java_function,
> 118         NULL, NULL, NULL, 
> 119         /* flags */ SAF_NONE,
> 120         /* should we support no media mode here?  If so, we need
> to detect the mode, and either disable t    he media functions or
> indicate media if/when we need */
> 121         /*.next */ NULL 
> 122 };
> 
> 
> When I look at the method prototype, it looks OK.  I do see a
> difference between the implementation of mod_java and mod_python
> (which does build successfully) but I thought I would check to see if
> there is some build configuration issue before pursuing the mod_python
> implementation issue. 
> 
> Have changes been made to the mod/languages interface that would
> explain this compile error?

I also ran into this. Basically, you have to use the SWITCH_STANDARD_APP
macro for java_function (look at python_function in mod_python) and
change a char* to a const char* somewhere. I'll patch the svn tomorrow.

BTW thank you for using mod_java :-).

> Jonathan

Damjan Jovanovic





More information about the Freeswitch-dev mailing list