Compiling a static linked xymon client for RHEL 6.x
Hi all
I have searched the archives for a solution to this problem, but none of the discussed issues helped me with a final solution. My goal is to monitor an appliance which is based on RHEL 6.x and for that reason I have tried to build a static linked xymon-client on CentOS 6.4
The client compiles just fine when using dynamic linked libs, but when trying to compile a static linked with "CGLAGS = -static" in the Makefile it fails with:
/usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status gmake[1]: *** [test-endianness] Error 1 gmake[1]: Leaving directory `/home/gjs/Downloads/xymon-4.3.10/lib' gmake: *** [lib-build] Error 2
Any wise ideas on how to proceed with this ? :)
Best regards /Gorm
On 1 May 2013 17:16, Gorm J. Siiger <gjs at sonnit.dk> wrote:
/usr/bin/ld: cannot find -lc
Install the glibc-static package and try again.
The "-lc" means the "c" library, named libc. The compiler replaces "-l" with "lib". The same type of error saying "cannot find -lMOO" would mean that it couldn't find the library file libMOO. For a dynamic library, this would be libMOO.so, and for a static library would be libMOO.a. So you're missing the file "libc.so".
You can then use "yum provides */libMOO.so" to find what package to install.
J
participants (2)
-
gjs@sonnit.dk
-
jlaidman@rebel-it.com.au