[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

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:

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" 
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?

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

pjsip mailing list
pjsip at lists.pjsip.org

More information about the pjsip mailing list