[Freeswitch-users] Some build 32 bit binary on 64bit Mac
Seven Du
dujinfang at gmail.com
Thu Aug 19 20:30:15 PDT 2010
Hi Mike,
I would love to, but I couldn't figure out how to make a patch.
Actually, I pulled a fresh git and run that configure against, still
get all those errors.
I tried my old code base again, I reverted all code changes, git pull,
and can still build ok with the following diff and make mega clean &&
make.
also I cleaned what I can think about:
cd freeswitch/libs
(cd esl ; make clean)
(cd ilbc; make clean)
(cd broadvoice; make clean)
(cd apr; make clean)
(cd apr-util; make clean)
(cd js; make clean)
(cd tiff-3.8.2; make clean)
(cd srtp; make clean)
(cd sqlite; make clean)
(cd speex; make clean)
(cd spandsp; make clean)
(cd sofia-sip; make clean)
(cd pcre; make clean)
(cd libsndfile; make clean)
(cd libedit; make clean)
(cd apr-util/xml/expat; make clean)
(cd js/nsprpub; make clean)
(find js/ -name "*.o" -exec rm -f {} \;)
(cd libg722_1; make clean)
cd ..
(cd src/mod/languages/mod_lua/lua; make clean)
seven at seven-macpro:~/workspace/freeswitch/i386/freeswitch$ git status
# On branch master
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: libs/esl/Makefile
# deleted: libs/js/libtool.m4
# deleted: libs/js/shtool
diff --git a/libs/esl/Makefile b/libs/esl/Makefile
index a180406..a3c1829 100644
--- a/libs/esl/Makefile
+++ b/libs/esl/Makefile
@@ -4,11 +4,11 @@ LIBEDIT_DIR=../../libs/libedit
DEBUG=-g -ggdb
BASE_FLAGS=$(INCS) -DHAVE_EDITLINE $(DEBUG) -I$(LIBEDIT_DIR)/src/ -fPIC
PICKY=-O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings
-Wstrict-prototypes -Wmis
-CFLAGS=$(BASE_FLAGS) $(PICKY)
-CXXFLAGS=$(BASE_FLAGS) -Wall -Werror -Wno-unused-variable
+CFLAGS=$(BASE_FLAGS) $(PICKY) -m32
+CXXFLAGS=$(BASE_FLAGS) -Wall -Werror -Wno-unused-variable -m32
MYLIB=libesl.a
LIBS=-lncurses -lpthread -lesl -lm
-LDFLAGS=-L.
+LDFLAGS=-L. -m32
OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o
src/esl_json.o
SRC=src/esl.c src/esl_json.c src/esl_event.c src/esl_threadmutex.c
src/esl_config.c src/esl_oop
HEADERS=src/include/esl_config.h src/include/esl_event.h
src/include/esl.h src/include/esl_thre
I diff-ed configure and Makefile and src/Makefile, they are identical
between old code base and new clean pulled.
Getting lost.
On Fri, Aug 20, 2010 at 1:15 AM, Michael Jerris <mike at jerris.com> wrote:
> we should fix this in configure so if you are on 64 bit apple and pass --host=i386 it sets those other flags for you. Can you provide a patch for this?
>
> Mike
>
> On Aug 19, 2010, at 3:14 AM, Seven Du wrote:
>
>> I think this is the correct way.
>>
>> CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ./configure
>> --prefix=/opt/fs-i386 --host=i386
>>
>> Thanks MikeJ and Math on irc.
>>
>> btw, @Math, I dont' use --build=i386-apple-darwin10, it seems throws errors.
>>
>> On Thu, Aug 12, 2010 at 8:20 PM, Seven Du <dujinfang at gmail.com> wrote:
>>> There are many reasons I need a 32bit lib:
>>>
>>> 1) 64bit app cannot load flash in webkit in QT(at least in my case).
>>> I'm try to build a client with libfreeswitch and flash in.
>>>
>>> 2) I want the lib run in iPhone simulator. Eventually on ARM on iphone.
>>>
>>> 3) If you release prebuilt desktop binary, you'd better don't forget
>>> 32 bit users.
>>>
>>> 4) perhaps more...
>>>
>>>
>>> On Thu, Aug 12, 2010 at 7:33 PM, Steven Ayre <steveayre at gmail.com> wrote:
>>>> If you're on 64bit, why do you want to compile as 32bit?
>>>>
>>>> -Steve
>>>>
>>>>
>>>>
>>>> On 12 August 2010 11:36, Seven Du <dujinfang at gmail.com> wrote:
>>>>>
>>>>> I'm on Mac 10.6.4 64bit, a fresh clone of git head. I tried to build
>>>>> FS into 32 bit.
>>>>>
>>>>> I use the following command when configure:
>>>>>
>>>>> CFLAGS="-arch i386" CXXFLAGS="-arch i386" LDFLAGS="-arch i386"
>>>>> ./configure --prefix=/opt/fs-i386 --host=i386 --build=i386
>>>>> --target=i386
>>>>>
>>>>>
>>>>> However, when make, it throws some errors, I manually *change* the
>>>>> source like from "ifdef" to "ifndef" to trick it and make further,
>>>>> however, I still couldn't get fully built.
>>>>>
>>>>> some errors below. and ideas? thanks.
>>>>>
>>>>>
>>>>>
>>>>> src/switch_apr.c: In function 'switch_vasprintf':
>>>>> src/switch_apr.c:1024: warning: implicit declaration of function
>>>>> 'vasprintf'
>>>>>
>>>>>
>>>>>
>>>>> src/switch_core_session.c: In function 'switch_core_session_thread':
>>>>> src/switch_core_session.c:1193: warning: format '%d' expects type
>>>>> 'int', but argument 8 has type 'switch_size_t'
>>>>> src/switch_core_session.c:1203: warning: format '%d' expects type
>>>>> 'int', but argument 8 has type 'switch_size_t'
>>>>> src/switch_core_session.c:1221: warning: format '%d' expects type
>>>>> 'int', but argument 8 has type 'switch_size_t'
>>>>>
>>>>>
>>>>> src/switch_core.c: In function 'send_heartbeat':
>>>>> src/switch_core.c:84: warning: format '%d' expects type 'int', but
>>>>> argument 5 has type 'long unsigned int'
>>>>> src/switch_core.c: In function 'change_user_group':
>>>>> src/switch_core.c:677: warning: implicit declaration of function
>>>>> 'setgroups'
>>>>> src/switch_core.c:704: warning: implicit declaration of function
>>>>> 'initgroups'
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> src/switch_core.c: In function 'send_heartbeat':
>>>>> src/switch_core.c:84: warning: format '%d' expects type 'int', but
>>>>> argument 5 has type 'long unsigned int'
>>>>> src/switch_core.c: In function 'change_user_group':
>>>>> src/switch_core.c:677: warning: implicit declaration of function
>>>>> 'setgroups'
>>>>> src/switch_core.c:704: warning: implicit declaration of function
>>>>> 'initgroups'
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> src/switch_rtp.c: In function 'rtp_common_write':
>>>>> src/switch_rtp.c:3437: error: 'u_long' undeclared (first use in this
>>>>> function)
>>>>> src/switch_rtp.c:3437: error: (Each undeclared identifier is reported only
>>>>> once
>>>>> src/switch_rtp.c:3437: error: for each function it appears in.)
>>>>> src/switch_rtp.c:3437: error: expected ')' before 'rtp_session'
>>>>> src/switch_rtp.c:3437: error: expected ')' before 'rtp_session'
>>>>> src/switch_rtp.c:3437: error: expected ')' before 'rtp_session'
>>>>> src/switch_rtp.c:3437: error: expected ')' before 'rtp_session'
>>>>> src/switch_rtp.c:3437: error: expected ')' before 'rtp_session'
>>>>> src/switch_rtp.c:3437: error: expected ')' before 'rtp_session'
>>>>> make[1]: *** [libfreeswitch_la-switch_rtp.lo] Error 1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> src/switch_utils.c: In function 'switch_build_uri':
>>>>> src/switch_utils.c:1530: error: 'NI_MAXHOST' undeclared (first use in
>>>>> this function)
>>>>> src/switch_utils.c:1530: error: (Each undeclared identifier is
>>>>> reported only once
>>>>> src/switch_utils.c:1530: error: for each function it appears in.)
>>>>> src/switch_utils.c:1530: error: 'NI_MAXSERV' undeclared (first use in
>>>>> this function)
>>>>>
>>>>>
>>>>>
>>>>> more detailed log:
>>>>>
>>>>> http://pastebin.freeswitch.org/13615
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Blog: http://www.dujinfang.com
>>>>> Proj: http://www.freeswitch.org.cn
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Blog: http://www.dujinfang.com
>>> Proj: http://www.freeswitch.org.cn
>>>
>>
>>
>>
>> --
>> Blog: http://www.dujinfang.com
>> Proj: http://www.freeswitch.org.cn
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
>
--
Blog: http://www.dujinfang.com
Proj: http://www.freeswitch.org.cn
More information about the FreeSWITCH-users
mailing list