/usr/bin/ld: cannot find -lsybctCollect2: ld returned 1 exit status - unix

How to resolve this error.
/usr/bin/ld: cannot find -lsybct
Collect2: ld returned 1 exit status
I can understand that it says library is missing.
When i searched for that library. It is already installed in my system.
locate libsybct.so
shows me path in which libsybct is installed
echo $LD_LIBRARY_PATH also shows correct path. I dont know where it went wrong.
There is no symbolic link created for it..
whether creating symbolic link for a library is important... If so where should I create and with what version.

just show the whole command?
maybe you forgot the "-L/your/path" options when you complied.
$LD_LIBRARY_PATH is for running time.
see reference here: /usr/bin/ld: cannot find -lemu

Related

Downgrade GNU make version from 4.1 to 3.81 or 3.82

Could anyone please let me know how to downgrade GNU package. I tried to download make-3.82.tar.gz file and extracted it and ran .configure. Then tried to run make got below error,
/glob/glob.c:577 undefined reference to '__alloca'
glob/libglob.a(glob.o):/path/glob/glob.c:728 more undefined reference to '__alloca' follow
collect2: error: ld returned 1 exit status.
Makefile: 359: recipe for target 'make' failed.
Thanks

Unable to install rJava 3.3.0 on RHEL 6.7

Recently we have downgraded R(latest) to 3.3.0 to RHEL.
Which requires to install xlsx and other rJava dependent packages, though I have deep dived into every possible duplicate and tried all options.
Details:
Command Executed
R CMD javareconf
Error:
.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/R/lib64/R/lib/libR.a(CommandLineArgs.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory /tmp/RtmpH1WhQR/R.INSTALL4a1266bbb309/rJava/jri/src'
`
Net search: I searched and found following link
https://github.com/BVLC/caffe/issues/2171 suggests to use
export CXXFLAGS=-fPIC
but no luck also I do not see CMakeCache.txt in the R folder, still not clear which piece I am missing and any help will be highly appreciated.
NOTE: This might seem to be a duplicate, but seriously I have already tried all the related/relevant posts on stackoverflow.
I resolved this, by manually placing the rJava folder(which I had in a different environment while we used R latest version), while entering into R add this following command before installing rJava dependant libraries:
.libPaths("/usr/lib64/R/library")
Change the path to the path where R is installed.
Hope this helps.

Compiling QScintilla on Ubuntu Fails

I'm trying to compile Qscintilla 2.9.2 on Ubuntu 16.04 64bit using Qt 5.7 got the following error message:
-L/home/mwambi/Qt5.7.0/5.7/gcc_64/lib -lQt5PrintSupport -L/usr/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lpthread -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:979: recipe for target 'libqscintilla2.so.12.0.1' failed
make: *** [libqscintilla2.so.12.0.1] Error 1
I do not know what the library GL is and where to find it. How can I solve this?
In my experience, this troubleshooting procedure is enough to solve about 90% of missing library issues during compilation:
"-l[name]" implies there's a "lib[name].so"
Search your system for "lib[name]" (use locate or find).
If you find it on your system, check paths ($LB_LIBRARY_PATH and the build system's -L flags) and verify that the architecture matches (x86+64 vs. i686).
Do a repository search for "lib[name]" (use apt, yum, synaptic, &c.).
Install it if it's missing.
Type "lib[name].so" into google or a dedicated package-search site (like RPMFind or packages.ubuntu.com) and see what package names come up, then search for as in #2-3.
In this case, libGL is an implementation of OpenGL. You can install Mesa or find an alternative implementation (I've only ever used Qt with Mesa). Here's a list of packages that provide libGL; if you already have one of these installed on your system, try fetching the dev versions of whichever ones you already have.

Trying to compile a package on Launchpad, can't find GLib even though its specificed

When I try to build my package I get this weird issue about Glib:
/usr/bin/ld: main_window.o: undefined reference to symbol 'ceilf##GLIBC_2.2.5'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libm.so: error adding symbols: DSO missing from command line
I have Glib in the required build packages and have added a bunch of PPAs that had Glib packages in them. I can't seem to make this error go away. Any ideas?
Setting _LDADD in automake fixed it but the paths are not dynamic.

Library of opencl not found?

I am trying to compile an opencl sample code but I am getting the following error
/usr/bin/ld: cannot find -lOpenCL
/usr/bin/ld: cannot find -loclUtil_x86_64
/usr/bin/ld: cannot find -lshrutil_x86_64
collect2: error: ld returned 1 exit status
make: *** [../../..//OpenCL//bin//linux/release/DeviceQuery] Error 1
I am using intel based machine ...
My make file is
EXECUTABLE := DeviceQuery
CCFILES := devQury.cpp
include ../common/common_opencl.mk
Any help would be of great help
Thanks ,
Piyush
Make sure that the OpenCL library (libOpenCL.so) is present in /usr/lib. This should have been put in place by the driver, so you shouldn't have to do anything.
If not then copy libOpenCL.so present in your cuda toolkit (lib64) to the above location.
sudo cp /usr/local/cuda-7.0/lib64/libOpenCL.so /usr/lib
This fixes the error
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
Have you installed the OpenCL SDK from either Intel or AMD? If not then perhaps you should follow these instructions. If you have an SDK installed then your makefile is probably missing -L... in the compiler command line, where ... is the path to the lib folder in the OpenCL SDK that should contain a file libOpenCL.a or something similar.

Resources