Make Errors
Hi! I am trying to compile some plugins for nagios, however I am getting the following errors. My last suggestion was to remove glibc and reinstall this did not work and broke my system. I have posted this on a nagios forum and no one seems to know the answer. Is this related to the plugins themselves or my system?
Thanks Here are the compile errors. /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x4e): In function `dlfcn_load ': : undefined reference to `dlopen' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xbb): In function `dlfcn_load ': : undefined reference to `dlclose' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xf4): In function `dlfcn_load ': : undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x16d): In function `dlfcn_unl oad': : undefined reference to `dlclose' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x22c): In function `dlfcn_bin d_var': : undefined reference to `dlsym' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x2a8): In function `dlfcn_bin d_var': : undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x324): In function `dlfcn_bin d_func': : undefined reference to `dlsym' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x37c): In function `dlfcn_bin d_func': : undefined reference to `dlerror' collect2: ld returned 1 exit status make[1]: *** [check_http] Error 1 make[1]: Leaving directory `/home/admin.dk/nagios_2.9_install/nagios-plugins-1.4 .8/plugins' make: *** [check-recursive] Error 1 |
Looks like broken libcrypto version. Try forcing 'make' to include ' -ldl ' into the linking command line. Try 'make LDFLAGS+=-ldl ' or even configuring and rebuilding from scratch after setting 'export CFLAGS=-ldl'.
|
raskin,
Thanks for the reply. I tried a make LDFLAGS+=-ldl and it did the trick. Can you explain if possible what this does and will effect me in the long run. Can forcing this make become a problem in the future? |
It seems your libcrypto references functions for work with dynamic libraries, but either thinks these functions should be found in libc or at all doesn't specify its library dependencies and nagios build system fails to guess them. Forcing make to include -ldl in gcc options while linking tells the linker (program that mainly converts function calls specified by name to offset jumps and also sanitizes library calls made by name) that the program should require libdl.so and can rely on having functions in libdl.so implemented. That prevents linker from failing to understand how are dlopen/dlsym/dlerror/dlclose calls in used libcrypto.a supposed to work.
In future you will probably run into similar issues (you can hopefully resolve them in the same way) with next package you will build that uses libcrypto. I do not think there will be any issues related to this with any binary software, either that you managed to compile or you download (if it is library-compatible with you system). If you upgrade libcrypto, it will either has the issue fixed or not, neither of the options is likely to break your system (though unrelated issues can). |
Thanks raskin, your help did the trick and thanks for the answer.
|
The same bug, in make
I have the same bug when I tried to build asterisk 1.4,
Quote:
|
Try building a static libdl.a or a shared libcrypto.so ...
|
Can u tell me how to do that
Can u tell me how to doa static build on libdl.a or shared libcrypto.so
and can u please explain me what exactly is the issue, I'm bit confused |
You get such versions but recompiling the package in question with --enable-shared/--enable-static (or --with-shared/--with-static , depending on package).
Maybe you should just reconfigure asterisk with "LD_FLAGS=-ldl ./configure" instead of passing that to make.. Or manually add it to the command line in Makefile. |
I tried but didnt work
I tried LD_FLAGS=-ldl ./configure
but it failed again when I did the make |
Still no fix
Raskin , I tried it , but still no fix... Do I need to compile glibc to resolve that issue?, I presume that glibc is already there in my ubuntu server 8.04, because I did an apt---- update/upgrade. I don't know how to check whether its there...
|
All times are GMT -5. The time now is 04:38 PM. |