[Freeswitch-dev] problem compile target to 10.5.x on Mac 10.6.4

Seven Du dujinfang at gmail.com
Tue Sep 21 04:43:38 PDT 2010


Hi,

I'm on Mac 10.6.4 64bit.

I can successfully generate i386 binary by using

CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ./configure

Compiled binaries work fine on 10.6.4 but throw error on 10.5.x
(10.5.2 and 10.5.8):

FreeSWITCH/lib/libfreeswitch.1.dylib: unknown required load command 0x80000022

Looks like it need to target to the 10.5 SDK, so I tried:

CFLAGS="-m32 -isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5" \
CXXFLAGS="-m32 -isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5" \
LDFLAGS="-m32 -isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5" \
./configure

But stop on the following errors on make:

cc1: warnings being treated as errors
In file included from /usr/include/i386/_structs.h:38,
                 from /usr/include/machine/_structs.h:31,
                 from /usr/include/sys/_structs.h:57,
                 from /usr/include/sys/signal.h:154,
                 from /usr/include/sys/wait.h:116,
                 from /usr/include/stdlib.h:65,
                 from ./src/include/switch.h:76,
                 from src/switch_apr.c:33:
/usr/include/mach/i386/_structs.h:91: warning: type of bit-field
'__invalid' is a GCC extension
/usr/include/mach/i386/_structs.h:92: warning: type of bit-field
'__denorm' is a GCC extension
/usr/include/mach/i386/_structs.h:93: warning: type of bit-field
'__zdiv' is a GCC extension
/usr/include/mach/i386/_structs.h:94: warning: type of bit-field
'__ovrfl' is a GCC extension
/usr/include/mach/i386/_structs.h:95: warning: type of bit-field
'__undfl' is a GCC extension
/usr/include/mach/i386/_structs.h:96: warning: type of bit-field
'__precis' is a GCC extension
/usr/include/mach/i386/_structs.h:97: warning: type of bit-field
'<anonymous>' is a GCC extension
/usr/include/mach/i386/_structs.h:98: warning: type of bit-field
'__pc' is a GCC extension
/usr/include/mach/i386/_structs.h:104: warning: type of bit-field
'__rc' is a GCC extension
/usr/include/mach/i386/_structs.h:111: warning: type of bit-field
'<anonymous>' is a GCC extension
/usr/include/mach/i386/_structs.h:112: warning: type of bit-field
'<anonymous>' is a GCC extension
/usr/include/mach/i386/_structs.h:149: warning: type of bit-field
'__invalid' is a GCC extension
/usr/include/mach/i386/_structs.h:150: warning: type of bit-field
'__denorm' is a GCC extension
/usr/include/mach/i386/_structs.h:151: warning: type of bit-field
'__zdiv' is a GCC extension
/usr/include/mach/i386/_structs.h:152: warning: type of bit-field
'__ovrfl' is a GCC extension
/usr/include/mach/i386/_structs.h:153: warning: type of bit-field
'__undfl' is a GCC extension
/usr/include/mach/i386/_structs.h:154: warning: type of bit-field
'__precis' is a GCC extension
/usr/include/mach/i386/_structs.h:155: warning: type of bit-field
'__stkflt' is a GCC extension
/usr/include/mach/i386/_structs.h:156: warning: type of bit-field
'__errsumm' is a GCC extension
/usr/include/mach/i386/_structs.h:157: warning: type of bit-field
'__c0' is a GCC extension
/usr/include/mach/i386/_structs.h:158: warning: type of bit-field
'__c1' is a GCC extension
/usr/include/mach/i386/_structs.h:159: warning: type of bit-field
'__c2' is a GCC extension
/usr/include/mach/i386/_structs.h:160: warning: type of bit-field
'__tos' is a GCC extension
/usr/include/mach/i386/_structs.h:161: warning: type of bit-field
'__c3' is a GCC extension
/usr/include/mach/i386/_structs.h:162: warning: type of bit-field
'__busy' is a GCC extension
In file included from ./src/include/switch.h:78,
                 from src/switch_apr.c:33:
/usr/include/stdarg.h:4:2: error: #include_next is a GCC extension
In file included from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/libteletone/src/libteletone_generate.h:118,
                 from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/libteletone/src/libteletone.h:139,
                 from ./src/include/switch.h:141,
                 from src/switch_apr.c:33:
/usr/include/stdarg.h:4:2: error: #include_next is a GCC extension
In file included from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/apr/include/apr_strings.h:55,
                 from ./src/include/private/switch_core_pvt.h:51,
                 from src/switch_apr.c:37:
/usr/include/stdarg.h:4:2: error: #include_next is a GCC extension
In file included from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/apr/include/apr_tables.h:29,
                 from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/apr/include/apr_file_info.h:28,
                 from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/apr/include/apr_file_io.h:29,
                 from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/apr/include/apr_thread_proc.h:26,
                 from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/apr/include/apr_portable.h:30,
                 from ./src/include/private/switch_core_pvt.h:57,
                 from src/switch_apr.c:37:
/usr/include/stdarg.h:4:2: error: #include_next is a GCC extension
In file included from
/Users/seven/workspace/freeswitch/newi386/freeswitch/libs/apr/include/apr_lib.h:35,
                 from src/switch_apr.c:62:
/usr/include/stdarg.h:4:2: error: #include_next is a GCC extension
make[1]: *** [libfreeswitch_la-switch_apr.lo] Error 1
make: *** [all] Error 2


I could build on a 10.5.x machine to release it, however, I still
would like to build it on 10.6.

Any hints are appreciated.

Regards,
Seven

-- 
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn



More information about the FreeSWITCH-dev mailing list