Re: [Sofia-sip-devel] [PATCH] Fix configuration under MinGW
On date Tuesday 2010-07-06 19:35:38 +0300, Pekka Pessi phoned this: 2010/7/6 Stefano Sabatini ssabat...@reilabs.com: this patch fixes the configuration problem as reported here: http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/3853 Thanks for the patch. -CFLAGS=$CFLAGS -I\$(top_srcdir)/win32/pthread -DWINVER=0x0501 \ +CFLAGS=$CFLAGS -I${srcdir}/win32/pthread -DWINVER=0x0501 \ Can you actually compile sofia-sip with this? It seems to me that the relative srcdir does dot work when make descends deeper into source tree. Mmh no, indeed compilation was failing with a libtool error (I had to hack the generated libtool script to fix it, as reported in another thread). So it seems that the patch defined in sac-general.m4 needs to be *absolute*. I tried to use $abs_srcdir but that is expanded to the empty string, then I hacked this: abs_srcdir=`(cd $srcdir pwd)` CFLAGS=$CFLAGS -I${abs_srcdir}/win32/pthread -DWINVER=0x0501 \ ... and now it is working (configure and libtool and all). Now I need to understand why it isn't expanding $abs_srcdir... Regards. -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
[Sofia-sip-devel] [PATCH] Fix configuration under MinGW
Hi all, this patch fixes the configuration problem as reported here: http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/3853 $LIBS and $CFLAGS need to be expanded at the configuration level, otherwise when using them during configuration they will be wrong, resulting in many failing tests and in a fatal error which happens in the code from configure.ac: if test $ac_cv_c_ll_format = yes; then AC_DEFINE([LLU], [%llu], [Format (%llu) for unsigned long long])dnl AC_DEFINE([LLI], [%lli], [Format (%lli) for long long])dnl AC_DEFINE([LLX], [%llx], [Format (%llx) for long long hex])dnl else AC_MSG_ERROR(printf cannot handle 64-bit integers) fi This is what you can find in config.log: configure:24311: gcc -o conftest.exe -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 -Wl,--enable-auto-image-bas e conftest.c -L$(top_srcdir)/win32/pthread -lpthreadVC2 -lws2_32-lwsock3 2 5 c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot fin d -lpthreadVC2 collect2: ld returned 1 exit status configure:24311: $? = 1 configure: program exited with status 1 configure: failed program was: Patch attached, regards. From 7d74c8b50b33469667006c50e902e690620ce5dd Mon Sep 17 00:00:00 2001 Message-Id: 7d74c8b50b33469667006c50e902e690620ce5dd.1278413394.git.stefano.sabatini-l...@poste.it From: Stefano Sabatini stefano.sabatini-l...@poste.it Date: Tue, 6 Jul 2010 12:28:11 +0200 Subject: [fix-mingw-compilation PATCH] Fix configuration in MinGW. CFLAGS and LIBS need to be expanded at configuration time, otherwise many configure test will fail and the configure will abort with the message: configure: error: printf cannot handle 64-bit integers --- m4/sac-general.m4 |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/sac-general.m4 b/m4/sac-general.m4 index b494de1..de0ba9a 100644 --- a/m4/sac-general.m4 +++ b/m4/sac-general.m4 @@ -359,12 +359,12 @@ fi ]) if test $ac_cc_environment = mingw32 ; then -CFLAGS=$CFLAGS -I\$(top_srcdir)/win32/pthread -DWINVER=0x0501 \ +CFLAGS=$CFLAGS -I${srcdir}/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 LDFLAGS=$LDFLAGS -Wl,--enable-auto-image-base -LIBS=-L\$(top_srcdir)/win32/pthread -lpthreadVC2 -lws2_32 \ +LIBS=-L${srcdir}/win32/pthread -lpthreadVC2 -lws2_32 \ -lwsock32 MINGW_ENVIRONMENT=1 AC_SUBST(MINGW_ENVIRONMENT) -- 1.7.1 -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] [PATCH] Fix configuration under MinGW
Do these CFLAGS get into the build as well? a bit worried that we need to do both this for the tests, and using top_ for the build. Mike On Jul 6, 2010, at 6:53 AM, Stefano Sabatini wrote: Hi all, this patch fixes the configuration problem as reported here: http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/3853 $LIBS and $CFLAGS need to be expanded at the configuration level, otherwise when using them during configuration they will be wrong, resulting in many failing tests and in a fatal error which happens in the code from configure.ac: if test $ac_cv_c_ll_format = yes; then AC_DEFINE([LLU], [%llu], [Format (%llu) for unsigned long long])dnl AC_DEFINE([LLI], [%lli], [Format (%lli) for long long])dnl AC_DEFINE([LLX], [%llx], [Format (%llx) for long long hex])dnl else AC_MSG_ERROR(printf cannot handle 64-bit integers) fi This is what you can find in config.log: configure:24311: gcc -o conftest.exe -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 -Wl,--enable-auto-image-bas e conftest.c -L$(top_srcdir)/win32/pthread -lpthreadVC2 -lws2_32 -lwsock3 2 5 c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot fin d -lpthreadVC2 collect2: ld returned 1 exit status configure:24311: $? = 1 configure: program exited with status 1 configure: failed program was: Patch attached, regards. 0001-Fix-configuration-in-MinGW.patch-- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] [PATCH] Fix configuration under MinGW
I'll take a look at this issue. Mike On Jul 6, 2010, at 12:20 PM, Stefano Sabatini wrote: On date Tuesday 2010-07-06 11:55:57 -0400, Michael Jerris phoned: Do these CFLAGS get into the build as well? a bit worried that we need to do both this for the tests, and using top_ for the build. Indeed I'm not sure this fix is right at all, at least it is working for me but it may badly fails in other scenarios. I have no special expertise with auto* tools, and I still can't grasp how it solves the problem of defining the same flags for both the configure file and the Makefile. Hope someone with expertise in that area (Pekka?) can shed some light. [...] Regards. -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] [PATCH] Fix configuration under MinGW
2010/7/6 Stefano Sabatini ssabat...@reilabs.com: this patch fixes the configuration problem as reported here: http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/3853 Thanks for the patch. -CFLAGS=$CFLAGS -I\$(top_srcdir)/win32/pthread -DWINVER=0x0501 \ +CFLAGS=$CFLAGS -I${srcdir}/win32/pthread -DWINVER=0x0501 \ Can you actually compile sofia-sip with this? It seems to me that the relative srcdir does dot work when make descends deeper into source tree. --Pekka -- Pekka.Pessi mail at nokia.com -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel