Archlinux: problem with building python module...

W
warpme
Mon, Dec 9, 2013 1:26 PM

Hi,
I'm trying build pjsip 2.1 python lib under 64-bit ArchLinux.
Unfortunately build fails on linking stage with following error:
$ make
python setup.py build
running build
running build_py
running build_ext
building '_pjsua' extension
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOUR
CE=2 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -DPJ_AUTO
CONF=1 -Imake[1]: Entering directory /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -I-fPIC -I-DPJ_IS_B IG_ENDIAN=0 -I-DPJ_IS_LITTLE_ENDIAN=1 -I/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjlib/include -I/home/piotro/ArchMyth/AB S/pjsip/src/pjproject-2.1.0/pjlib-util/include -I/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjnath/include -I/home/piotro/A rchMyth/ABS/pjsip/src/pjproject-2.1.0/pjmedia/include -I/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/include -Imake[1]:  Leaving directory /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -I/usr/include/python2.7 -c _pjsua.c
-o build/temp.linux-x86_64-2.7/_pjsua.o
_pjsua.c: In function ‘py_pjsua_call_make_call’:
_pjsua.c:3139:7: warning: passing argument 3 of ‘pjsua_call_make_call’ makes pointer from integer without a cast [enabled by default
]
In file included from _pjsua.h:27:0,
                 from _pjsua.c:20:
/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/include/pjsua-lib/pjsua.h:4234:22: note: expected ‘const struct pjsua_call
_setting *’ but argument is of type ‘unsigned int’
warning: no library file corresponding to 'make[1]: Entering directory /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-ap ps/src/python'' found (skipping) warning: no library file corresponding to 'make[1]: Leaving directory /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-app
s/src/python'' found (skipping)
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu build/temp.linux-x86_64-2.7/_pjsua.o -Lmake[1]: Ent
ering directory /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -L/home/piotro/ArchMyth/ABS/pjsip/src/pj project-2.1.0/pjlib/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjlib-util/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/p jproject-2.1.0/pjnath/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjmedia/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pj project-2.1.0/pjsip/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/third_party/lib -Lmake[1]: Leaving directory /home/pi
otro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -L/usr/lib -lpjsua-x86_64-unknown-linux-gnu -lpjsip-ua-x86_64-unk
nown-linux-gnu -lpjsip-simple-x86_64-unknown-linux-gnu -lpjsip-x86_64-unknown-linux-gnu -lpjmedia-codec-x86_64-unknown-linux-gnu -lp
jmedia-videodev-x86_64-unknown-linux-gnu -lpjmedia-x86_64-unknown-linux-gnu -lpjmedia-audiodev-x86_64-unknown-linux-gnu -lpjnath-x86
_64-unknown-linux-gnu -lpjlib-util-x86_64-unknown-linux-gnu -lresample-x86_64-unknown-linux-gnu -lmilenage-x86_64-unknown-linux-gnu
-lsrtp-x86_64-unknown-linux-gnu -lgsmcodec-x86_64-unknown-linux-gnu -lilbccodec-x86_64-unknown-linux-gnu -lg7221codec-x86_64-unknown
-linux-gnu -lspeex -lspeexdsp -lportaudio -lpj-x86_64-unknown-linux-gnu -lsamplerate -lm -luuid -lnsl -lrt -lpthread -lasound -lcryp
to -lssl -lopencore-amrnb -lopencore-amrwb -lpython2.7 -o build/lib.linux-x86_64-2.7/_pjsua.so
/usr/bin/ld: /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a(pjsua_acc.o): relocat
ion R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
make: *** [all] Error 1
Maybe somebody has idea where issue is?
br

Hi, I'm trying build pjsip 2.1 python lib under 64-bit ArchLinux. Unfortunately build fails on linking stage with following error: $ make python setup.py build running build running build_py running build_ext building '_pjsua' extension gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOUR CE=2 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -DPJ_AUTO CONF=1 -Imake[1]: Entering directory `/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -I-fPIC -I-DPJ_IS_B IG_ENDIAN=0 -I-DPJ_IS_LITTLE_ENDIAN=1 -I/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjlib/include -I/home/piotro/ArchMyth/AB S/pjsip/src/pjproject-2.1.0/pjlib-util/include -I/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjnath/include -I/home/piotro/A rchMyth/ABS/pjsip/src/pjproject-2.1.0/pjmedia/include -I/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/include -Imake[1]:  Leaving directory `/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -I/usr/include/python2.7 -c _pjsua.c -o build/temp.linux-x86_64-2.7/_pjsua.o _pjsua.c: In function ‘py_pjsua_call_make_call’: _pjsua.c:3139:7: warning: passing argument 3 of ‘pjsua_call_make_call’ makes pointer from integer without a cast [enabled by default ] In file included from _pjsua.h:27:0,                  from _pjsua.c:20: /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/include/pjsua-lib/pjsua.h:4234:22: note: expected ‘const struct pjsua_call _setting *’ but argument is of type ‘unsigned int’ warning: no library file corresponding to 'make[1]: Entering directory `/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-ap ps/src/python'' found (skipping) warning: no library file corresponding to 'make[1]: Leaving directory `/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-app s/src/python'' found (skipping) gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu build/temp.linux-x86_64-2.7/_pjsua.o -Lmake[1]: Ent ering directory `/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -L/home/piotro/ArchMyth/ABS/pjsip/src/pj project-2.1.0/pjlib/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjlib-util/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/p jproject-2.1.0/pjnath/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjmedia/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pj project-2.1.0/pjsip/lib -L/home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/third_party/lib -Lmake[1]: Leaving directory `/home/pi otro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip-apps/src/python' -L/usr/lib -lpjsua-x86_64-unknown-linux-gnu -lpjsip-ua-x86_64-unk nown-linux-gnu -lpjsip-simple-x86_64-unknown-linux-gnu -lpjsip-x86_64-unknown-linux-gnu -lpjmedia-codec-x86_64-unknown-linux-gnu -lp jmedia-videodev-x86_64-unknown-linux-gnu -lpjmedia-x86_64-unknown-linux-gnu -lpjmedia-audiodev-x86_64-unknown-linux-gnu -lpjnath-x86 _64-unknown-linux-gnu -lpjlib-util-x86_64-unknown-linux-gnu -lresample-x86_64-unknown-linux-gnu -lmilenage-x86_64-unknown-linux-gnu -lsrtp-x86_64-unknown-linux-gnu -lgsmcodec-x86_64-unknown-linux-gnu -lilbccodec-x86_64-unknown-linux-gnu -lg7221codec-x86_64-unknown -linux-gnu -lspeex -lspeexdsp -lportaudio -lpj-x86_64-unknown-linux-gnu -lsamplerate -lm -luuid -lnsl -lrt -lpthread -lasound -lcryp to -lssl -lopencore-amrnb -lopencore-amrwb -lpython2.7 -o build/lib.linux-x86_64-2.7/_pjsua.so /usr/bin/ld: /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a(pjsua_acc.o): relocat ion R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /home/piotro/ArchMyth/ABS/pjsip/src/pjproject-2.1.0/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a: could not read symbols: Bad value collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1 make: *** [all] Error 1 Maybe somebody has idea where issue is? br
ST
Shamun Toha Md
Tue, Dec 10, 2013 5:24 AM

Hello Problem,

You seem to have correct problem which draw that PjSIP Python is broken.
Have you tried in a fresh box? as below setup steps? And then still fails?

http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2013-December/016918.html

Regards
/Sham

Hello Problem, You seem to have correct problem which draw that PjSIP Python is broken. Have you tried in a fresh box? as below setup steps? And then still fails? http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2013-December/016918.html Regards /Sham
DG
Dennis Guse
Tue, Dec 10, 2013 8:32 AM

Looks like a 64bit issue (have you used -fPIC to compile the lib?)

On Mon, Dec 9, 2013 at 2:26 PM, warpme warpme@o2.pl wrote:

ion R_X86_64_32S against `.rodata.str1.1' can not be used when making a
shared object; recompile with -fPIC


Dennis Guse

Looks like a 64bit issue (have you used -fPIC to compile the lib?) On Mon, Dec 9, 2013 at 2:26 PM, warpme <warpme@o2.pl> wrote: > ion R_X86_64_32S against `.rodata.str1.1' can not be used when making a > shared object; recompile with -fPIC > --- Dennis Guse
W
Warpme
Tue, Dec 10, 2013 5:14 PM

On 10/12/13 09:32, Dennis Guse wrote:

Looks like a 64bit issue (have you used -fPIC to compile the lib?)

On Mon, Dec 9, 2013 at 2:26 PM, warpme <warpme@o2.pl
mailto:warpme@o2.pl> wrote:

 ion R_X86_64_32S against `.rodata.str1.1' can not be used when
 making a shared object; recompile with -fPIC

Dennis Guse


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Dennis,
Thx for replay.
I make sure: all calls to gcc gave -fPIC.
So it is even more strange for me why there is issue with code relocation...

br

On 10/12/13 09:32, Dennis Guse wrote: > Looks like a 64bit issue (have you used -fPIC to compile the lib?) > > On Mon, Dec 9, 2013 at 2:26 PM, warpme <warpme@o2.pl > <mailto:warpme@o2.pl>> wrote: > > ion R_X86_64_32S against `.rodata.str1.1' can not be used when > making a shared object; recompile with -fPIC > > > > > --- > Dennis Guse > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org Dennis, Thx for replay. I make sure: all calls to gcc gave -fPIC. So it is even more strange for me why there is issue with code relocation... br