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
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 cross-compile Dropbear for an x86 machine where glibc is missing and instead, uclibc is being used. For that aim, I have cross-compiled zlib for this same instruction set using a custom crosstool-ng toolchain and installed it to a custom location.
msainz#ubuntu:~$ ls Projects/zlib_install/lib
libz.a libz.so libz.so.1 libz.so.1.2.11 pkgconfig
I have copied Projects/zlib_install/include/zlib.h and Projects/zlib/include/zconf.h to Projects/dropbear/zlibincludes/.
I've set my env variables this way:
msainz#ubuntu:~$ echo $PATH
usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:
/usr/local/games:/snap/bin:/home/msainz/x-tools/x86_64-multilib-linux-uclibc/bin
msainz#ubuntu:~/Projects/dropbear$ echo $LDFLAGS
/home/msainz/Projects/zlib_install/lib/libz.a
msainz#ubuntu:~/Projects/dropbear$ echo $CFLAGS
-Izlibincludes -I../zlibincludes
I launch the configure script this way: ./configure --prefix=/home/msainz/Projects/tmp_top_dir --host=x86
The execution terminates with the following error:
configure:4851: x86_64-multilib-linux-uclibc-gcc -o conftest -Izlibincludes -I../zlibincludes -Wno-
pointer-sign -fno-strict-overflow -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mfunction-
return=thunk -mindirect-branch=thunk /home/msainz/Projects/zlib_install/lib/libz.a -pie -Wl,-z,now -
Wl,-z,relro conftest.c -lz >&5
/home/msainz/x-tools/x86_64-multilib-linux-uclibc/bin/../lib/gcc/x86_64-multilib-linux-
uclibc/8.3.0/../../../../x86_64-multilib-linux-uclibc/bin/ld.bfd: cannot find -lz
collect2: error: ld returned 1 exit status
Any ideas to solve this? Thanks in advance.
Solved the problem adding --with-zlib=/home/msainz/Projects/zlib_install/ to the ./configure call.
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
g++ -Wl,-rpath,/usr/local/lib -o /path-to/executable {list of .o files} -L/usr/X11R6/lib -L/usr/local/lib -lQtGui -L/usr/local/lib -L/usr/openwin/lib -lSM -lICE -lXext -lX11 -lresolv -lsocket -lnsl -lQtCore -lm -lrt -ldl -lpthread
I'm using the above command to compile an executable. Well actually a makefile is doing it for me..but regardless.
I'm getting an error with the above command:
ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors
I don't see where -dn or -P are being supplied to the linker anywhere in the command or in the makefile. Where is the linker getting this info?
By trying to temporarily remove each segment of the linking command, I found that removing ",rpath,/usr/local/lib" made the thing work. Which got me thinking that I was setting linker options somewhere else in linux world.
Further investigation proved that I was setting LD_LIBRARY_PATH which included some linker options that caused the conflict. Upon changing that LD_LIBRARY_PATH, things worked as they should have.
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.