error: cannot link with -lzmq

975 views
Skip to first unread message

R.M.Sasi Mugunthan

unread,
Jan 16, 2013, 5:56:13 AM1/16/13
to storm...@googlegroups.com
Hi Storm Team,

We are facing the below error while configuring jzmq in Linux paltform. Please help to resolve this error.

./configure --with-zeromq=/usr/local

Error:
------
checking for zmq_init in -lzmq... no
configure: error: cannot link with -lzmq


Complete error trace:
$: ./configure --with-zeromq=/usr/local
\checking for a BSD-compatible install... /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64make... GNU
checking for gcc... /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc accepts -g... yes
checking for /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc option to accept ANSI C... none needed
checking dependency style of /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc... /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld
checking if the linker (/xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld) is GNU ld... yes
checking for /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld option to reload object files... -r
checking for BSD-compatible nm... /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... /xenv/C/ia64/3.4.6/RH5.3AS_64/lib/ia64cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/nm -B output from /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc object... ok
checking for objdir... .libs
checking for ar... /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ar
checking for ranlib... /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ranlib
checking for strip... /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/strip
checking if /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc supports -fno-rtti -fno-exceptions... no
checking for /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc option to produce PIC... -fPIC
checking if /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc PIC flag -fPIC works... yes
checking if /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc static flag -static works... yes
checking if /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc supports -c -o file.o... yes
checking whether the /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc linker (/xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld -m elf_x86_64
checking if the linker (/xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/xenv/OS/ia64/RH5.3AS_64/x86_64/usr/bin/ia64ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for gawk... (cached) gawk
checking whether /xenv/C/ia64/3.4.6/RH5.3AS_64/usr/bin/ia64cc and cc understand -c and -o together... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ZeroMQ... yes
checking zmq.h usability... yes
checking zmq.h presence... yes
checking for zmq.h... yes
checking for zmq_init in -lzmq... no
configure: error: cannot link with -lzmq

Thanks.
Sasi

Adrian Muraru

unread,
Jan 16, 2013, 9:29:02 PM1/16/13
to storm...@googlegroups.com
Make sure you have the libzmq.so shared library in /usr/local/lib. Looks like you only have the static .a lib

san

unread,
Jan 16, 2013, 10:36:24 PM1/16/13
to storm...@googlegroups.com
You are correct. but after installation of zeroMQ 2.1.7 only .a lib installed and not libzmq.so.
 
Do we missing any installation step ?

R.M.Sasi Mugunthan

unread,
Jan 16, 2013, 11:20:45 PM1/16/13
to storm...@googlegroups.com

Hi Adrian,

This "libzmq.so" file not even available under zeromq-2.1.7.tar.gz. Do we need to copy this so file explicitly to lib folder or this will be copied as part of zmq installation.

Note: We have
successfully installed zmq 2.1.7 in our Linux Server release 5.6 (Tikanga)

Please clarify

Thanks.
Sasi

于峰

unread,
Aug 5, 2013, 5:06:40 AM8/5/13
to storm...@googlegroups.com
This is because your system is based on x64 arch. 
You should do this:
cd /usr/local/lib
sudo rm -rf libzmq.so

sudo ln -s ../../lib64/libzmq.so.3.0.0 libzmq.so


在 2013年1月16日星期三UTC+8下午6时56分13秒,R.M.Sasi Mugunthan写道:
Reply all
Reply to author
Forward
0 new messages