help on creating an rpm
Can anyone provide some help on how I can create my own rpm of freeswitch? What I want to do is package up freeswitch in an rpm, but with edited conf files that are suited to my customers. I've seen that there is an rpm spec file (freeswitch.spec) in the base directory, so I took a shot at running that but didn't get very far, and I didn't see any relevant articles on the wiki. What I've done so far: - created the standard rpm build directory tree (BUILD RPMS SOURCES SPECS SRPMS) - copied freeswitch.spec into SPECs - ran rpmbuild I get this: [build@centos64-1 freeswitch-stock]$ rpmbuild -bb -v SPECS/freeswitch.spec error: File /usr/src/redhat/SOURCES/freeswitch-1.0.7.tar.bz2: No such file or directory I was surprised at that error, since the Source directives in the spec file indicate that rpmbuild should grab the source via http urls. (Eventually, I'm going to need to change this, since I'll it to use a source tarball that I create, with my edited conf files). Given that someone did a great job of putting a spec file together, are there any docs on how to use it? Dave
You seem to not be very experienced with RPM. You need to change the stuff in your sourcetree and than create the file freeswitch-1.0.7.tar.bz2 in SOURCES, containing all the source with all your changes. rpm does not automagicall download anything, the source files have to be there. Am 02.05.2011 um 15:57 schrieb Dave Horton:
Can anyone provide some help on how I can create my own rpm of freeswitch? What I want to do is package up freeswitch in an rpm, but with edited conf files that are suited to my customers. I've seen that there is an rpm spec file (freeswitch.spec) in the base directory, so I took a shot at running that but didn't get very far, and I didn't see any relevant articles on the wiki.
What I've done so far:
- created the standard rpm build directory tree (BUILD RPMS SOURCES SPECS SRPMS) - copied freeswitch.spec into SPECs - ran rpmbuild
I get this:
[build@centos64-1 freeswitch-stock]$ rpmbuild -bb -v SPECS/freeswitch.spec error: File /usr/src/redhat/SOURCES/freeswitch-1.0.7.tar.bz2: No such file or directory
I was surprised at that error, since the Source directives in the spec file indicate that rpmbuild should grab the source via http urls. (Eventually, I'm going to need to change this, since I'll it to use a source tarball that I create, with my edited conf files).
Given that someone did a great job of putting a spec file together, are there any docs on how to use it?
Dave _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Michal Bielicki Geschäftsführer / CEO Seventh Signal Ltd. & Co. KG Weigandufer 45, Büro 115, D-12059 Berlin Voice: +49 30 60988730 Amtsgericht Charlottenburg HRA 44413 B Ust.-ID: DE266981999 Geschäftsführer: Michal Bielicki Persönlich Haftende Gesellschafterin: Seventh Signal Ltd, 69 Great Hampton St. Birmingham, B18 6EW, GB, Company Nr.: 06889439 WWW.: http://www.seventhsignal.de
Thanks for some of the feedback, I have gotten further. (As noted, I am not all that experienced with rpms, but have read up on various articles). Now, I have created my .rpmmacros to set the top level directory, and gotten my source tree in the correct place to be located, and when I run rpmbuild against the spec file it runs for quite a while but eventually fails with this error below. gcc -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -Werror -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -std=c99 -pedantic -Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python/mod_python.c -o mod_python.o >/dev/null 2>&1 Creating mod_python.so... /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status g++ -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -shared -o .libs/mod_python.so -shared -Wl,-x .libs/mod_python.o freeswitch_python.o mod_python_wrap.o /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/.libs/libfreeswitch.so -lz -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib -lpq /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib/.libs/libexpat.a /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr/.libs/libapr-1.a -luuid -lrt -lcrypt -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/srtp -lssl -lcrypto -lncurses -L/usr/local/lib -lpthread -ldl -lutil -lm -lpython2.7 -Wl,--rpath -Wl,/opt/freeswitch/lib -Wl,--rpath -Wl,/opt/freeswitch/mod make[5]: *** [mod_python.so] Error 1 make[5]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[4]: *** [all] Error 1 make[4]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[3]: *** [languages/mod_python-all] Error 1 make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod' make[3]: Entering directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.67849 (%build) Any thoughts about what might be wrong?
What platoform is this ? The spec is made for centos 5.X. there is no python 2.7 on centos so I assume you are trying fedora ? Am 03.05.2011 um 14:09 schrieb Dave Horton:
Thanks for some of the feedback, I have gotten further. (As noted, I am not all that experienced with rpms, but have read up on various articles). Now, I have created my .rpmmacros to set the top level directory, and gotten my source tree in the correct place to be located, and when I run rpmbuild against the spec file it runs for quite a while but eventually fails with this error below.
gcc -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -Werror -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -std=c99 -pedantic -Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python/mod_python.c -o mod_python.o >/dev/null 2>&1 Creating mod_python.so... /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status g++ -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -shared -o .libs/mod_python.so -shared -Wl,-x .libs/mod_python.o freeswitch_python.o mod_python_wrap.o /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/.libs/libfreeswitch.so -lz -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib -lpq /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib/.libs/libexpat.a /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr/.libs/libapr-1.a -luuid -lrt -lcr ypt -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/srtp -lssl -lcrypto -lncurses -L/usr/local/lib -lpthread -ldl -lutil -lm -lpython2.7 -Wl,--rpath -Wl,/opt/freeswitch/lib -Wl,--rpath -Wl,/opt/freeswitch/mod make[5]: *** [mod_python.so] Error 1 make[5]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[4]: *** [all] Error 1 make[4]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[3]: *** [languages/mod_python-all] Error 1 make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod' make[3]: Entering directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.67849 (%build)
Any thoughts about what might be wrong? _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Michal Bielicki Geschäftsführer / CEO Seventh Signal Ltd. & Co. KG Weigandufer 45, Büro 115, D-12059 Berlin Voice: +49 30 60988730 Amtsgericht Charlottenburg HRA 44413 B Ust.-ID: DE266981999 Geschäftsführer: Michal Bielicki Persönlich Haftende Gesellschafterin: Seventh Signal Ltd, 69 Great Hampton St. Birmingham, B18 6EW, GB, Company Nr.: 06889439 WWW.: http://www.seventhsignal.de
Hmm..actually this is centos: [root@centos64-1 ~]# uname -a Linux centos64-1 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux [root@centos64-1 ~]# cat /etc/redhat-release CentOS release 5.5 (Final) Begin forwarded message: From: Dave Horton <dave@dchorton.com> Date: May 3, 2011 8:09:29 AM EDT To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: help on creating an rpm Thanks for some of the feedback, I have gotten further. (As noted, I am not all that experienced with rpms, but have read up on various articles). Now, I have created my .rpmmacros to set the top level directory, and gotten my source tree in the correct place to be located, and when I run rpmbuild against the spec file it runs for quite a while but eventually fails with this error below. gcc -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -Werror -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -std=c99 -pedantic -Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python/mod_python.c -o mod_python.o >/dev/null 2>&1 Creating mod_python.so... /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status g++ -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -shared -o .libs/mod_python.so -shared -Wl,-x .libs/mod_python.o freeswitch_python.o mod_python_wrap.o /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/.libs/libfreeswitch.so -lz -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib -lpq /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib/.libs/libexpat.a /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr/.libs/libapr-1.a -luuid -lrt -lcrypt -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/srtp -lssl -lcrypto -lncurses -L/usr/local/lib -lpthread -ldl -lutil -lm -lpython2.7 -Wl,--rpath -Wl,/opt/freeswitch/lib -Wl,--rpath -Wl,/opt/freeswitch/mod make[5]: *** [mod_python.so] Error 1 make[5]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[4]: *** [all] Error 1 make[4]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[3]: *** [languages/mod_python-all] Error 1 make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod' make[3]: Entering directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.67849 (%build) Any thoughts about what might be wrong?
It seems to try to link a 32bit version of libpython to mod_pthon instead of the 64bit version. In dtail it seems to be linking in a version you installed by hand in/usr/local and that seems to be a 32bit version and that is why it fails. Am 03.05.2011 um 22:33 schrieb Dave Horton:
Hmm..actually this is centos:
[root@centos64-1 ~]# uname -a Linux centos64-1 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux [root@centos64-1 ~]# cat /etc/redhat-release CentOS release 5.5 (Final)
Begin forwarded message:
From: Dave Horton <dave@dchorton.com> Date: May 3, 2011 8:09:29 AM EDT To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: help on creating an rpm
Thanks for some of the feedback, I have gotten further. (As noted, I am not all that experienced with rpms, but have read up on various articles). Now, I have created my .rpmmacros to set the top level directory, and gotten my source tree in the correct place to be located, and when I run rpmbuild against the spec file it runs for quite a while but eventually fails with this error below.
gcc -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -Werror -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -std=c99 -pedantic -Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python/mod_python.c -o mod_python.o >/dev/null 2>&1 Creating mod_python.so... /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status g++ -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -shared -o .libs/mod_python.so -shared -Wl,-x .libs/mod_python.o freeswitch_python.o mod_python_wrap.o /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/.libs/libfreeswitch.so -lz -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib -lpq /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib/.libs/libexpat.a /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr/.libs/libapr-1.a -luuid -lrt -lcr ypt -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/srtp -lssl -lcrypto -lncurses -L/usr/local/lib -lpthread -ldl -lutil -lm -lpython2.7 -Wl,--rpath -Wl,/opt/freeswitch/lib -Wl,--rpath -Wl,/opt/freeswitch/mod make[5]: *** [mod_python.so] Error 1 make[5]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[4]: *** [all] Error 1 make[4]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[3]: *** [languages/mod_python-all] Error 1 make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod' make[3]: Entering directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.67849 (%build)
Any thoughts about what might be wrong?
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Michal Bielicki Geschäftsführer / CEO Seventh Signal Ltd. & Co. KG Weigandufer 45, Büro 115, D-12059 Berlin Voice: +49 30 60988730 Amtsgericht Charlottenburg HRA 44413 B Ust.-ID: DE266981999 Geschäftsführer: Michal Bielicki Persönlich Haftende Gesellschafterin: Seventh Signal Ltd, 69 Great Hampton St. Birmingham, B18 6EW, GB, Company Nr.: 06889439 WWW.: http://www.seventhsignal.de
Thanks, that was the problem. I had installed python 2.7 because some other software needed it; not sure exactly how it was causing problems but I removed it so that configure found the older python install (2.4) and the rpm built fine. Many thanks. On May 3, 2011, at 4:46 PM, Michal Bielicki wrote: It seems to try to link a 32bit version of libpython to mod_pthon instead of the 64bit version. In dtail it seems to be linking in a version you installed by hand in/usr/local and that seems to be a 32bit version and that is why it fails. Am 03.05.2011 um 22:33 schrieb Dave Horton:
Hmm..actually this is centos:
[root@centos64-1 ~]# uname -a Linux centos64-1 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux [root@centos64-1 ~]# cat /etc/redhat-release CentOS release 5.5 (Final)
Begin forwarded message:
From: Dave Horton <dave@dchorton.com> Date: May 3, 2011 8:09:29 AM EDT To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: help on creating an rpm
Thanks for some of the feedback, I have gotten further. (As noted, I am not all that experienced with rpms, but have read up on various articles). Now, I have created my .rpmmacros to set the top level directory, and gotten my source tree in the correct place to be located, and when I run rpmbuild against the spec file it runs for quite a while but eventually fails with this error below.
gcc -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -Werror -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -std=c99 -pedantic -Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python/mod_python.c -o mod_python.o >/dev/null 2>&1 Creating mod_python.so... /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status g++ -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/include -I/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -shared -o .libs/mod_python.so -shared -Wl,-x .libs/mod_python.o freeswitch_python.o mod_python_wrap.o /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/.libs/libfreeswitch.so -lz -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib -lpq /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr-util/xml/expat/lib/.libs/libexpat.a /data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/apr/.libs/libapr-1.a -luuid -lrt -lcr ypt -L/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/libs/srtp -lssl -lcrypto -lncurses -L/usr/local/lib -lpthread -ldl -lutil -lm -lpython2.7 -Wl,--rpath -Wl,/opt/freeswitch/lib -Wl,--rpath -Wl,/opt/freeswitch/mod make[5]: *** [mod_python.so] Error 1 make[5]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[4]: *** [all] Error 1 make[4]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod/languages/mod_python' make[3]: *** [languages/mod_python-all] Error 1 make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src/mod' make[3]: Entering directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/data/home/build/tmp/rpm/BUILD/freeswitch-1.0.7' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.67849 (%build)
Any thoughts about what might be wrong?
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Michal Bielicki Geschäftsführer / CEO Seventh Signal Ltd. & Co. KG Weigandufer 45, Büro 115, D-12059 Berlin Voice: +49 30 60988730 Amtsgericht Charlottenburg HRA 44413 B Ust.-ID: DE266981999 Geschäftsführer: Michal Bielicki Persönlich Haftende Gesellschafterin: Seventh Signal Ltd, 69 Great Hampton St. Birmingham, B18 6EW, GB, Company Nr.: 06889439 WWW.: http://www.seventhsignal.de
participants (3)
-
Dave Horton
-
Joseph L. Casale
-
Michal Bielicki