[pjsip] linking problem when using ld

Stefan Winkler s.winkler at ognios.com
Mon May 5 02:33:48 EDT 2014


Hi Vittorio,

the _start symbol should be in crt0.o or if the code you get the warning from is C++ also crtbegin.o is needed to find the start of constructors. Maybe it helps linking that too as you manually link lc.

-----Ursprüngliche Nachricht-----
Von: pjsip [mailto:pjsip-bounces at lists.pjsip.org] Im Auftrag von Vittorio Giovara
Gesendet: Donnerstag, 01. Mai 2014 01:41
An: pjsip at lists.pjsip.org
Betreff: [pjsip] linking problem when using ld

Hello,
I am trying to compile the pjsip suite by manually setting the compilation/linking tools rather than relying on gcc only. The libraries compile fine, but when the sample apps and tests are linked I get this nasty error:

ld: 
/home/etudiant/Downloads/pjproject-2.2.1/pjlib/lib/libpj-x86_64-pc-linux-gnu.a(os_core_unix.o): 
undefined reference to symbol 'sched_get_priority_min@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libc.so.6: error adding symbols: DSO missing from command line

Heavy googling reports that the order of the libs appearing on the command line might interfere, but after trying a few combinations I still got the compilation error. If I manually add -lc, since that symbol is defined in glibc, the linking succeeds with a warning (ld: 
warning: cannot find entry symbol _start; defaulting to 0000000000404330).

For full report, the configuration line is:

CC="gcc" CXX="g++" LD="ld" AR="ar" CCAS="gcc -c" RANLIB="ranlib" 
STRIP="strip" 
PATH="/home/etudiant/sflphone/contrib/x86_64-linux-gnu/bin:/home/etudiant/sflphone/extras/tools/build/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" 
CPPFLAGS=" -I/home/etudiant/sflphone/contrib/x86_64-linux-gnu/include" 
CFLAGS=" -I/home/etudiant/sflphone/contrib/x86_64-linux-gnu/include -g" 
CXXFLAGS=" -I/home/etudiant/sflphone/contrib/x86_64-linux-gnu/include
-g" LDFLAGS=" -L/home/etudiant/sflphone/contrib/x86_64-linux-gnu/lib" 
./configure --prefix="/home/etudiant/sflphone/contrib/x86_64-linux-gnu" 
--build="x86_64-linux-gnu" --host="x86_64-linux-gnu" 
--target="x86_64-linux-gnu" --program-prefix="" --enable-static --disable-shared --disable-dependency-tracking --with-pic --disable-oss --disable-sound --disable-video --enable-ext-sound --disable-speex-aec --disable-g711-codec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-sdl --disable-ffmpeg --disable-v4l2

Any idea how to properly fix this? Would it be possible to add a configure switch that skips this step entirely?
Thanks,
Vittorio

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

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




More information about the pjsip mailing list