Dear Filippo,

Thank you for your reply.

I have also done some more work on this since the last post. I used the 
release tarball instead. I can definately confirm 3, 4 and 7. The error 
for no 4 only appeared on my XP machine and not on my Vista machine but 
this might be due to different installations as I installed mingw at 
different times. I have not had the time to investigate this further.

I did the same as you for no 7 and noticed that it suddenly worked.

When using the compiled library I still get the two assertions I 
mentioned in my last post. However, I will check as soon as possible the 
fact that the extern keyword was missing from su_config.h. This might 
fix the issue of the first assertion I got.

I'll get back as soon as have tested your patch.

Thanks
/Jonas

Della Betta Filippo skrev:
> Dear Jonas, all
> if you want to compile the latest version win mingw I found the following:
> 1) to overcome the PKG_CHECK_MODULE problem, you need to install pkg-config 
> (see http://www.mingw.org/wiki/FAQ - How do I get pkg-config installed? -)
> 2) I noticed that there are o lot of warnings on mingw complaining 
> declaration with SOFIAPUBVAR. I think extern is missing (see patch attached)
> 3) Makefile.am should be modified to include (in case of MinGW platform) 
> su_win32_port.c on the list of libsu_la_SOURCES (and removed from EXTRA_DIST)
> 4) I also had some problem with gai_strerror function (the check in 
> sac-su2.m4 line 529 don't find gai_strerror for mingw, but actually 
> gai_strerror is present on mingw platform). To overcome this issue, I simply 
> changed config.h generated defining HAVE_GAI_STRERROR to 1
> 5) I had some problem with s2check (s2base.c line 77 timespec is not defined 
> on mingw platform). I included pthread.h on s2base.c and changed code a 
> little since timespec in pthread.h has tv_nsec instead of tv.tv_usec.
> 6) Regarding error in winbase.h, this is due to the fact that #include 
> <stdio.h> and #include <stdarg.h> (needed for va_list macro definition) are 
> missing on line 274 of sac-su2.m4)
> 7) The -lpthreadVC2 is correct, what mingw doesn't like (I don't know why) is 
> the -I and -L syntax with $(top_srcdir). I overcome this issue I put the full 
> path of pthread dir (i.e. -I/home/Administrator/sofia-sip/win32/pthread and 
> -L/home/Administrator/sofia-sip/win32/pthread) in sac-general.m4
>
> Hope that helps,
> Regards,
> Filippo
>
> -----Original Message-----
> From: Jonas Jalminger [mailto:jo...@jalminger.com]
> Sent: venerdì 6 marzo 2009 14.56
> To: Pekka Pessi
> Cc: sofia-sip-devel@lists.sourceforge.net
> Subject: Re: [Sofia-sip-devel] Building sofia-sip with mingw
>
> Dear Pekka and Kai,
>
> Thanks for your replies. I did what Kai suggested and used the latest
> release tarball (1.12.10). It does not complain about any PKG_CHECK_MODULE.
>
> In the config.log I can see the following:
>
> It fails when checking for iphlpapi.h as the winbase.h include gives a
> syntax error on line 1308 and 1309 saying "before va_list".
>
> It fails also on checking for pthread_create beacuse the linker includes
> -lpthread as well as -lpthreadVC2. I suppose that -lpthread should not
> be there.
>
> ld.exe always fails actually on finding phreadVC2.lib. I guess it is
> because the combination -L and -lpthreadVC2 does not work with mingw.
> Shouldn't it be -L/whateverpath/pthreadVC2.lib without the -lpthreadVC2?
> This is also why the long long for printf test fails.
>
> Also, the file su_win32_port.c does not get included in the makefile in
> the su suddirectory. I inserted it along with the .lo counterpart
> directly into the makefile. It now compiled.
>
> However, when I run a program which runs fine on Linux I get two
> assertions when calling:
>  nua_create(appl->root, app_callback, appl, TAG_NULL());
>
> 1. It fails on soa.c line 244 SOA_VALID_ACTIONS(actions). I have traced
> to the the deafult soa struct has its members set to 0 (NULL).
> 2. su_alloc.c line 552 size >= sizeof(*home). The reason is that home =
> NULL.
>
> Well that's about it so far. I guess that the assertions might be
> related to the fact that the configure script repeatadly fails.
>
> Cheers,
> /Jonas
>
> Pekka Pessi skrev:
>   
>> 2009/3/6 Jonas Jalminger <jo...@jalminger.com>:
>>
>>     
>>> Building sofia-sip on Windows using mingw/msys is hard. I have not seen
>>> too many posts regarding this so I will share my experience so far.
>>>
>>>       
>> Thanks for sharing.
>>
>>
>>     
>>> I started by doing an autreconf in the top directory.
>>>
>>>       
>> I'm afraid that this is a mistake. autoconf and automake has number of
>> version-related problem. In this particular case, autoconf does not
>> warn if you miss autoconf macros of pkg-config.
>>
>>
>>     
>>> Trying configure
>>> gave the following problem:
>>>  ./configure: line 16805: syntax error near unexpected token `GLIB,'
>>> ./configure: line 16805: `  PKG_CHECK_MODULES(GLIB, glib-$with_glib,
>>> HAVE_GLIB=yes, HAVE_GLIB=no)'
>>> Trying --with-glib=no had no effect. Instead I manually removed the test
>>> in the configure script and set HAVE_GLIB=no.
>>>
>>>       
>>     
>>> Next, it stopped once again on a PKG_CHECK_MODULE for ssl. The same
>>> problem here and I had to manually set HAVE_OPENSSL=0.
>>>
>>> Same problem with CHECK. Same soultion, have_check=0.
>>>
>>> Next, it says that the compiler cannot handle 64-bit integers, which it
>>> can. Again I manully changed it to use %llu and the rest even if the
>>> test failed.
>>>
>>>       
>> Could you have a peek in your config.log and see why and what exactly
>> failed there?
>>
>>
>>     
>>> The configuration now completed without errors. Time to do make and it
>>> failed much right away with the first libtool command:
>>> if /bin/sh ../../libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I.
>>> -I. -I../.. -I../../libsofia-sip-ua/su/sofia-sip    -Wall     -g -O2
>>> -I../../win32/pthread -DWINVER=0x0501     -D_WIN32_WINNT=0x0501
>>> -DIN_LIBSOFIA_SIP_UA -DIN_LIBSOFIA_SRES   -mms-bitfields  -pipe
>>> -mno-cygwin -mwindows -mconsole -Wall -g -O0 -MT su.lo -MD -MP -MF
>>> ".deps/su.Tpo" -c -o su.lo su.c; \
>>> then mv -f ".deps/su.Tpo" ".deps/su.Plo"; else rm -f ".deps/su.Tpo";
>>> exit 1; fi
>>> ../../libtool: line 828: X--mode=compile: command not found
>>> ../../libtool: line 828: X--tag=CC: command not found
>>> ../../libtool: line 861: libtool: ignoring unknown tag : command not found
>>> ../../libtool: line 995: *** Warning: inferring the mode of operation is
>>> deprecated.: command not found
>>> ../../libtool: line 996: *** Future versions of Libtool will require
>>> --mode=MODE be specified.: command not found
>>> ../../libtool: line 1139: Xgcc: command not found
>>> and so forth. It seems like there is an extra X inserted.
>>>
>>>       
>>     
>>> I have no idea which file to modify to remove the extra X. It would be
>>> great if someone could point me to where the problem is.
>>>
>>>       
>> I think autoreconf used M4 macros from newer libtool for autoconf, but
>> failed to install the libtool script itself. Or vice versa. Either
>> copy the original configure and Makefile.in files from release tar, or
>> run libtoolize --force --install.
>>
>>
>>     
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>
> Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle 
> persone indicate. La diffusione, copia o qualsiasi altra azione derivante 
> dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora 
> abbiate ricevuto questo documento per errore siete cortesemente pregati di 
> darne immediata comunicazione al mittente e di provvedere alla sua 
> distruzione, Grazie.
>
> This e-mail and any attachments is confidential and may contain privileged 
> information intended for the addressee(s) only. Dissemination, copying, 
> printing or use by anybody else is unauthorised. If you are not the intended 
> recipient, please delete this message and any attachments and advise the 
> sender by return e-mail, Thanks.
>
>   


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to