[Freeswitch-users] help on creating an rpm

Dave Horton dave at dchorton.com
Tue May 3 16:09:29 MSD 2011


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?  


More information about the FreeSWITCH-users mailing list