Where is "dl" library ?

When I configure a application, FreeBSD reports
Code:
/usr/bin/ld: cannot find -ldl

What does it mean ?


Sincerely!
 
sw2wolf said:
Code:
$cat /etc/make.conf|grep CFLAGS
CFLAGS=-O2 -fno-strict-aliasing -pipe

Setting custom CFLAGS in make.conf is usually a mistake. Not only does it offer little improvement at best, it also prevents ports from using more optimized flags when they can.
 
wblock@ said:
Setting custom CFLAGS in make.conf is usually a mistake. Not only does it offer little improvement at best, it also prevents ports from using more optimized flags when they can.
Really! Then I should comment the CFLAGS in /etc/make.conf ?
 
sw2wolf said:
Code:
#ln -s /usr/lib/libc.so /usr/lib/libdl.so
fixed the problem .
Don't do things like that, it's going to haunt you when you least expect it.
 
SirDice said:
sw2wolf said:
Code:
#ln -s /usr/lib/libc.so /usr/lib/libdl.so
fixed the problem .
Don't do things like that, it's going to haunt you when you least expect it.

Especially when the detection of the system type and available libraries is done with devel/autoconf and the like this kind of hack will trip the detection logic will cause compilation errors that can very hard to debug. FreBSD does not have a libdl.so library, leave it like that. If you have to deal with broken software that does not use the proper methods for detecting which library provides dlopen(3) and related functions fix the software, FreeBSD is not broken in this regard and does not need fixing.
 
Back
Top