linking problem when using ld

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux