cygwin/bin/ld: cannot find -lXss - cygwin

I am trying to install WordNet with cygwin.
But Getting the following error during make
make[2]: Entering directory `/cygdrive/d/VaiVocabulary/vaiLinuxFinal/wordNet/WordNet-3.0/src'
gcc -g -O2 -o wishwn.exe wishwn-tkAppInit.o wishwn-stubs.o -L../lib -lWN -L/usr/lib -ltk8.5 -L/usr/lib -ltcl8.5 -lX11 -lXss -lXext -lXft -lXrender -lfontconfig -lexpat -liconv -lfreetype -lz -lbz2 -lX11 -lxcb -lXau -lXdmcp -ldl
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lXss
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lXext
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lXft
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lXrender
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lfontconfig
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lexpat
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lfreetype
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
Makefile:223: recipe for target `wishwn.exe' failed
It seems linking error. What would I have to do to resolve it?

It definitely looks like you are missing those libraries. Rerun Cygwin's Setup.exe and when you get to the package selection screen enter your missing dependencies in the 'search' box. For example searching for Xss and Xext finds both libraries (and their development packages) in the X11 folder while bz2 is in Libs.

Related

eureka-1.11: DSO missing from command line

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

Dependancies for RE2 on Centos7

I am trying to install re2 on a centos7 vm, and I am having some trouble solving these dependencies:
[root#roller re2]# make testinstall
cp testinstall.cc obj
(cd obj && g++ -I/usr/local/include -L/usr/local/lib testinstall.cc -lre2 -pthread -static -o testinstall)
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [testinstall] Error 1
Any help would be great! :)
thanks!

build alljoyn sample chat failed on android

I want to use the NDK to build the sample application chat (cpp version) of alljoyn on android. But I got the error undefined reference to 'typeinfo for ajn::BusObject'. And I have checked the alljoyn library path and I could find the libajdaemon.a and liballjoyn.a. The NDK version is r9c. The alljoyn android SDK version is 3.4.6. Can someone help me? Thanks!
The detail information is following:
/Volumes/MacintoshHD/Users/wshu_cn/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ -Wl,-soname,libChat.so -shared --sysroot=/Volumes/MacintoshHD/Users/wshu_cn/android-ndk-r9c/platforms/android-17/arch-arm ./obj/local/armeabi/objs-debug/Chat/Chat_jni.o ./obj/local/armeabi/libstdc++.a -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -L/Volumes/MacintoshHD/Users/wshu_cn/android-ndk-r9c/platforms/android-17/arch-arm/usr/lib -L/Volumes/MacintoshHD/Users/wshu_cn/android-ndk-r9c/platforms/android-8/arch-arm/usr/lib -L../..//lib -L/Volumes/MacintoshHD/Users/wshu_cn/android-ndk-r9c/sources/cxx-stl/gnu-libstdc++/libs/armeabi -L/Volumes/MacintoshHD/Users/wshu_cn/android-ndk-r9c/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi -L./libs ../..//lib/BundledDaemon.o -lajdaemon -lalljoyn -llog -lz -ldl -lssl -lcrypto -lm -lc -lstdc++ -lgcc -lgnustl_static -lstdc++ -lc -lm -o ./obj/local/armeabi/libChat.so
/Volumes/MacintoshHD/Users/wshu_cn/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs-debug/Chat/Chat_jni.o: in function typeinfo for ChatObject:Chat_jni.cpp(.data.rel.ro._ZTI10ChatObject+0x8): error: undefined reference to 'typeinfo for ajn::BusObject'
collect2: ld returned 1 exit status

Link options are incompatible - don't see options anywhere in command

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.

Not found z library when compiling zabbix-server

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.

Resources