LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-22-2007, 12:04 PM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
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
 
Old 05-22-2007, 12:53 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
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'.
 
Old 05-22-2007, 01:15 PM   #3
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
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?
 
Old 05-22-2007, 01:34 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
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).
 
Old 05-22-2007, 04:02 PM   #5
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks raskin, your help did the trick and thanks for the answer.
 
Old 08-01-2008, 01:47 AM   #6
darleys
LQ Newbie
 
Registered: Jul 2008
Posts: 9

Rep: Reputation: 0
The same bug, in make

I have the same bug when I tried to build asterisk 1.4,
Quote:
/usr/src/asterisk/main/editline/readline.c:1294: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/src/asterisk/main/editline/readline.c:1300: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
utils.o: In function `ast_gethostbyname':
/usr/src/asterisk/main/utils.c:223: warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
manager.o: In function `accept_thread':
/usr/src/asterisk/main/manager.c:2406: warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x2d6): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x446): undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2
I used make LDFLAGS+=-ldl but its not of any use, Raskin can u please help me out
 
Old 08-01-2008, 02:01 AM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Try building a static libdl.a or a shared libcrypto.so ...
 
Old 08-01-2008, 02:11 AM   #8
darleys
LQ Newbie
 
Registered: Jul 2008
Posts: 9

Rep: Reputation: 0
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
 
Old 08-01-2008, 02:37 AM   #9
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
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.
 
Old 08-01-2008, 03:35 AM   #10
darleys
LQ Newbie
 
Registered: Jul 2008
Posts: 9

Rep: Reputation: 0
I tried but didnt work

I tried LD_FLAGS=-ldl ./configure
but it failed again when I did the make
 
Old 08-03-2008, 11:08 PM   #11
darleys
LQ Newbie
 
Registered: Jul 2008
Posts: 9

Rep: Reputation: 0
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NVIDIA - make errors flebber Linux - Software 2 05-30-2006 09:47 PM
Make errors lazwaz Linux - Software 1 05-21-2005 05:37 AM
Chap 5 Binutils make LDFLAGS & make install errors shotokan Linux From Scratch 5 04-10-2005 04:01 AM
'make' errors... drenal Linux - Newbie 3 04-21-2004 08:51 PM
libbonobomm make errors Louis_Carole Linux - Software 6 04-06-2004 01:35 PM


All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration