I have a problem with compiling zabbix-server on CentOS 6.2.
Command line is:
./configure --enable-server --with-mysql --with-net-snmp --with-libcurl
--with-jabber --with-ssh2 --with-openipmi --with-ldap --enable-static
But error occures:
checking for main in -lz... no
configure: error: Not found z library;
Full configure output is here: http://pastebin.ru/WmDP7UL0
I already tried to do:
yum install zlib zlib-devel zlib-static zlibrary zlibrary-devel
But it was unsuccessfully.
Thank you for your attention.
UPD. Config log posted here: http://pastebin.ru/WNtQu9eR and shows this error:
configure:7366: checking for main in -lz
configure:7385: gcc -o conftest -g -O2 -rdynamic -static conftest.c -lz -lm -lrt -lresolv >&5
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
Here's the actual error:
/usr/bin/ld: cannot find -lm
But it is found previously, which points to something else. Check your ulimits to make sure you don't have a low max open file count.
Related
I did not get response from Qualcomm forum so I decided to post here. When I was trying to run examples of Halide for Hexagon by running make run as written in the document. Then I got the following issue. The -lc++abi is missing.
clang++ -std=c++11 -I /opt/qcom/Hexagon_SDK/4.3.0.0/tools/HALIDE_Tools/2.3.03/Halide/include -stdlib=libc++ -O3 -g -fno-rtti -rdynamic conv3x3_generator.cpp /opt/qcom/Hexagon_SDK/4.3.0.0/tools/HALIDE_Tools/2.3.03/Halide/lib/libHalide.a /opt/qcom/Hexagon_SDK/4.3.0.0/tools/HALIDE_Tools/2.3.03/Halide/tools/GenGen.cpp -o /opt/qcom/Hexagon_SDK/4.3.0.0/tools/HALIDE_Tools/2.3.03/Halide/Examples/build/offload/hexagon_benchmarks/bin/conv3x3.generator -lz -lrt -ldl -lpthread -lm
/usr/bin/ld: cannot find -lc++abi
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked the /usr/lib and find. So it should be there?
./x86_64-linux-gnu/libc++abi.so.1.0
./x86_64-linux-gnu/libc++abi.so.1
./llvm-10/lib/libc++abi.so.1.0
./llvm-10/lib/libc++abi.so.1
Did I miss anything or make anything stupid? Thanks!
ld is your system's host linker -- that's GNU BFD ld. clang++ must be in your PATH but it's the host clang++ and not the hexagon-clang++ that would be with Halide/Hexagon tools.
I contacted the person from Qualcomm. I am not supposed to use either /usr/bin/clang++ nor hexagon-clang++. I downloaded clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-18.04.tar.xz from https://releases.llvm.org/7.0.1/. You should use clang++ under the bin folder after you extract it. Now it works for me.
I am trying to build the RTI perftest in an i86 QNX architecture. When I try to build the makefile that I generated, I get the following:
Checking directory obj/i86QNX6.6qcc_cpp4.7.3/Release
Checking directory ../bin/i86QNX6.6qcc_cpp4.7.3/Release
qcc -V4.7.3,gcc_ntox86 -Y_cpp -lang-c++ -m64 -Wall -o ../bin/i86QNX6.6qcc_cpp4.7.3/Release/perftest_cpp obj/i86QNX6.6qcc_cpp4.7.3/Release/test.o obj/i86QNX6.6qcc_cpp4.7.3/Release/testPlugin.o obj/i86QNX6.6qcc_cpp4.7.3/Release/testSupport.o obj/i86QNX6.6qcc_cpp4.7.3/Release/Property.o obj/i86QNX6.6qcc_cpp4.7.3/Release/RTIDDSImpl.o obj/i86QNX6.6qcc_cpp4.7.3/Release/perftest_cpp.o -L/opt/RTI/ndds.5.1.0/lib/i86QNX6.6qcc_cpp4.7.3 -lnddscppz -lnddscz -lnddscorez -lm -lsocket -lpthread -lnsl -lrt -L/usr/lib/nptl
/opt/qnx/6.6.0/host/linux/x86/usr/bin/i486-pc-nto-qnx6.6.0-ld: cannot find -lpthread
/opt/qnx/6.6.0/host/linux/x86/usr/bin/i486-pc-nto-qnx6.6.0-ld: cannot find -lnsl
/opt/qnx/6.6.0/host/linux/x86/usr/bin/i486-pc-nto-qnx6.6.0-ld: cannot find -lrt
cc: /opt/qnx/6.6.0/host/linux/x86/usr/bin/i486-pc-nto-qnx6.6.0-ld error 1
make: *** [../bin/i86QNX6.6qcc_cpp4.7.3/Release/perftest_cpp] Error 1
I am not to familiar with QNX and its libraries, but when I remove those flags I get a ton of errors. Any tips on how to build the perftest for QNX or dealing with this error would be great, thanks!
My makefile has the following build line which resolves all symbols and results in a running executable:
qcc -o ../bin/i86QNX6.6qcc_cpp4.7.3/Release/perftest_cpp
obj/i86QNX6.6qcc_cpp4.7.3/Release/test.o
obj/i86QNX6.6qcc_cpp4.7.3/Release/testPlugin.o
obj/i86QNX6.6qcc_cpp4.7.3/Release/testSupport.o
obj/i86QNX6.6qcc_cpp4.7.3/Release/RTIDDSImpl.o
obj/i86QNX6.6qcc_cpp4.7.3/Release/perftest_cpp.o
-L/opt/RTI/rti_connext_dds-5.2.3/lib/i86QNX6.6qcc_cpp4.7.3
-lnddscppz -lnddscz -lnddscorez -lm -lsocket
-V4.7.3,gcc_ntox86 -Y_cpp -lang-c++ -Wall
Note that it has none of the libraries that you mention.
I've been trying to install eureka-1.11 program (DooM map editor for Linux) and when I ran make command, I got the error:
user_nout#linux-u90c:~/eureka-1.11-source> sudo make
root's password:
g++ obj_linux/editloop.o obj_linux/e_basis.o obj_linux/e_checks.o obj_linux/e_checks2.o obj_linux/e_cutpaste.o obj_linux/e_linedef.o obj_linux/e_loadsave.o obj_linux/e_nodes.o obj_linux/e_path.o obj_linux/e_sector.o obj_linux/e_things.o obj_linux/e_vertex.o obj_linux/im_arrows.o obj_linux/im_color.o obj_linux/im_img.o obj_linux/levels.o obj_linux/lib_adler.o obj_linux/lib_file.o obj_linux/lib_util.o obj_linux/main.o obj_linux/m_bitvec.o obj_linux/m_config.o obj_linux/m_files.o obj_linux/m_game.o obj_linux/m_keys.o obj_linux/m_select.o obj_linux/m_strings.o obj_linux/objects.o obj_linux/r_grid.o obj_linux/r_render.o obj_linux/sys_debug.o obj_linux/ui_about.o obj_linux/ui_browser.o obj_linux/ui_canvas.o obj_linux/ui_default.o obj_linux/ui_dialog.o obj_linux/ui_file.o obj_linux/ui_hyper.o obj_linux/ui_infobar.o obj_linux/ui_linedef.o obj_linux/ui_menu.o obj_linux/ui_misc.o obj_linux/ui_nombre.o obj_linux/ui_nodes.o obj_linux/ui_pic.o obj_linux/ui_prefs.o obj_linux/ui_replace.o obj_linux/ui_sector.o obj_linux/ui_scroll.o obj_linux/ui_sidedef.o obj_linux/ui_thing.o obj_linux/ui_tile.o obj_linux/ui_vertex.o obj_linux/ui_window.o obj_linux/w_loadpic.o obj_linux/w_flats.o obj_linux/w_sprite.o obj_linux/w_texture.o obj_linux/w_wad.o obj_linux/x_hover.o obj_linux/x_loop.o obj_linux/x_mirror.o obj_linux/glbsp/analyze.o obj_linux/glbsp/blockmap.o obj_linux/glbsp/glbsp.o obj_linux/glbsp/level.o obj_linux/glbsp/node.o obj_linux/glbsp/reject.o obj_linux/glbsp/seg.o obj_linux/glbsp/system.o obj_linux/glbsp/util.o obj_linux/glbsp/wad.o -o eureka -L /lib64 -lfltk_images -lfltk_gl -lfltk -lX11 -lXext -lXft -lfontconfig -lXinerama -lpng -ljpeg -lGL -lz -lm
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: /usr/local/lib64/libfltk.a(Fl_Native_File_Chooser.o): undefined reference to symbol 'dlsym##GLIBC_2.2.5'
/lib64/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:158: recipe for target 'eureka' failed
make: *** [eureka] Error 1
I was searching a lot about this type of error, but in each topic it was something different comparing to my problem.
For note: there is no configure file; also I tried to put another LDFLAGS in make file.
System: linux openSUSE Leap 42.1
The part of the makefile, if needed:
INSTALL_DIR=$(PREFIX)/share/eureka
CXXFLAGS=$(OPTIMISE) -Wall -D$(OS) \
-Iglbsp_src \
-D_THREAD_SAFE -D_REENTRANT
LDFLAGS=-L/usr/X11R6/lib
LIBS= \
-lfltk_images -lfltk_gl -lfltk \
-lX11 -lXext -lXft -lfontconfig -lXinerama \
-lpng -ljpeg -lGL -lz -lm
Any ideas how to overcome this issue?
The question can be closed - Knud Larsen has published an answer in the comment above.
All the thing was in not valid fltk on my system.
For reading the full answer to my question, see the comment, as I have already mentioned.
Thanks for help!
Testing eureka-111 with OpenSuse Leap 42.1 :
# zypper in gcc-c++ fltk-devel fltk-devel-static libXft-devel libjpeg8-devel libpng12-devel xdg-utils
cd eureka-1.11-source/ && make ... and the executable eureka is created.
P.S. : Reason for a difference with a manual build of fltk : The Suse 42.1 fltk packages were built with a different configure file ( Line 2685 edited ) :
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$# \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
+ DSOCOMMAND="\$(CXX) -Wl,--as-needed -Wl,--no-undefined \$(DSOFLAGS) -Wl,-soname,\$# \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
Ref. the patch fltk-1.3.2-underlinking.patch in the source SRPM, fltk-1.3.2-9.2.src.rpm
I'm trying to load a library to Firefox, and I get the following error in the terminal:
http://pastebin.com/ZLryd20D,
gcc -Wall -fPIC -c 11.cpp ,
gcc -shared -o libshared.so 11.o -ldl ,
LD_PRELOAD=$PWD/libshared.so firefox ,
/bin/sh: symbol lookup error: /home/enigma/Desktop/compilacionproceso/libshared.so: undefined symbol: __gxx_personality_v0
gcc -shared -o libshared.so 11.o -ldl -lstdc++
That's the wrong solution, that happens to work on Linux by accident.
The correct command line to build your shared library is:
g++ -shared -o libshared.so 11.o
(contrary to popular belief, gcc and g++ are not the same thing).
Answer from the OP himself, taken from a revision of the question:
I solved the problem adding a flag -lstdc++ for create the library
thanks to this post
What is __gxx_personality_v0 for?
cd /directory
gcc -Wall -fPIC -c 11.cpp
gcc -shared -o libshared.so 11.o -ldl -lstdc++
LD_PRELOAD=$PWD/libshared.so program
I'm trying to compile a 32 bit assembly code(NASM) on my 64 bit Linux, but I can't, I have tried others tutorials about it and I installed ia32-libs...
When I try run it as:
gcc asm1.o -o asm1
i386 of the file input `asm1.o' is incompatible with the output i386:x86-64
And when I try run it as:
gcc -m32 asm1.o -o asm1
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: connot find -lgcc_s
collect2: error: ld returned 1 exit status
Thanks for helps.
OBS: Sorry for my english, I'm not from US.
Need to install gcc-multilib.