[asterisk-bugs] [JIRA] (ASTERISK-28411) Build link error bundled pjproject : relocation against symbol cant be used when shared object

PICCORO Lenz McKAY (JIRA) noreply at issues.asterisk.org
Thu May 9 09:21:47 CDT 2019


PICCORO Lenz McKAY created ASTERISK-28411:
---------------------------------------------

             Summary: Build link error bundled pjproject : relocation against symbol cant be used when shared object
                 Key: ASTERISK-28411
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28411
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_pjsip, Third-Party/pjproject
    Affects Versions: 16.2.1, 16.2.0, 16.1.1, 16.1.0, 16.0.0
            Reporter: PICCORO Lenz McKAY


After try to compile bundled pjproject got that error:

`/usr/bin/ld: res_pjsip_session.o: relocation R_X86_64_PC32 against symbol ast_sip_session_media_state_reset can not be used when making a shared object; recompile with -fPIC`

But i already compiled with PIC as output show, 

NOTE IMPORTANT: quite stupid do not build agains well updated external pjproject! nonsense!

{code}
[  598s] x86_64-linux-gnu-gcc -o res_pjsip_session.o -c res_pjsip_session.c -MD -MT res_pjsip_session.o -MF .res_pjsip_session.o.d -MP -pthread -I/usr/src/packages/BUILD/include -fgnu89-inline -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2   -I/usr/include/libxml2  -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations       -fPIC -DAST_MODULE=\"res_pjsip_session\" -DAST_MODULE_SELF_SYM=__internal_res_pjsip_session_self  -DPJ_AUTOCONF=1 -fgnu89-inline -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -I/usr/src/packages/BUILD/third-party/pjproject/source/pjlib/include -I/usr/src/packages/BUILD/third-party/pjproject/source/pjlib-util/include -I/usr/src/packages/BUILD/third-party/pjproject/source/pjnath/include -I/usr/src/packages/BUILD/third-party/pjproject/source/pjmedia/include -I/usr/src/packages/BUILD/third-party/pjproject/source/pjsip/include  
[  600s] /usr/src/packages/BUILD/build_tools/make_linker_version_script res_pjsip_session "" "/usr/src/packages/BUILD"
[  600s] x86_64-linux-gnu-gcc -o res_pjsip_session.so -pthread -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed    -shared -Wl,--version-script,res_pjsip_session.exports,--warn-common  res_pjsip_session.o  
[  600s] /usr/bin/ld: res_pjsip_session.o: relocation R_X86_64_PC32 against symbol `ast_sip_session_media_state_reset' can not be used when making a shared object; recompile with -fPIC
[  600s] /usr/bin/ld: final link failed: Bad value
[  600s] collect2: error: ld returned 1 exit status
[  600s] /usr/src/packages/BUILD/Makefile.rules:179: recipe for target 'res_pjsip_session.so' failed
[  600s] make[3]: *** [res_pjsip_session.so] Error 1
[  600s] make[3]: Leaving directory '/usr/src/packages/BUILD/res'
[  600s] Makefile:383: recipe for target 'res' failed
[  600s] make[2]: *** [res] Error 2
[  600s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  600s] dh_auto_build: make -j1 AST_FORTIFY_SOURCE= DEBUG= OPTIMIZE= NOISY_BUILD=yes ASTDATADIR=/usr/share/asterisk ASTVARRUNDIR=/var/run/asterisk returned exit code 2
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list