libdl.so.2 is not found by the linker.

On openSUSE 12.1 compiling gracegtk-0.4.5 or gracegtk-0.4.4, I obtain the following error message:

/usr/lib64/gcc/x86_64-suse-linux/4.6/…/…/…/…/x86_64-suse-linux/bin/ld: dlmodule.o: undefined reference to symbol ‘dlclose@@GLIBC_2.2.5
/usr/lib64/gcc/x86_64-suse-linux/4.6/…/…/…/…/x86_64-suse-linux/bin/ld: note: ‘dlclose@@GLIBC_2.2.5’ is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line
/lib64/libdl.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [ggrace] Error 1
make[1]: Leaving directory `/home/mori/Download/gracegtk-0.4.5/src’
make: *** [subdirs] Error 1

running the command pkg-config --libs gtk±2.0, I get:
-pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0

where can be observed that -ldl is not present therefore causing the problem.
Somebody knows the solution to this problem?
Thanks.

Hi,

on my system, they can be found in /lib and /lib64, It’s a link each time, pointing to libdl.2.14.01.so in each dir.

HTH

Lenwolf

Does grace-gtk use configure? If so try


../configure LIBS="-ldl"


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Am 06.02.2012 12:15, schrieb Martin Helm:
> Does grace-gtk use configure? If so try
>


> ../configure LIBS="-ldl"
> 

Of course


../configure LIBS="-ldl"

(./ not the …/)


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Hi:
I wrote ./configure LIBS="-ldl" as suggested by martin_helm but the problem remains the same.
Indeed lenwolf, also I have the libraries /lib64/libdl-2.14.1.so and /lib64/libdl.so.2 but for some reason the compilation does not work.
Thanks.

Am 06.02.2012 22:56, schrieb saltamontes:
>
> Hi:
> I wrote ./configure LIBS="-ldl" as suggested by martin_helm but the
> problem remains the same.
> Indeed lenwolf, also I have the libraries /lib64/libdl-2.14.1.so and
> /lib64/libdl.so.2 but for some reason the compilation does not work.
> Thanks.
>
>
I had now a deeper look, what you need is the symbolic link libdl.so
which is in /usr/lib64/libdl.so it is part of the package glibc-devel,
install it and test again (you should not need the LIBS= switch just
…/configure but try it both ways if needed).


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Hi
Run this;


export SUSE_ASNEEDED=0
../configure --prefix=/usr


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.9-1.4-desktop
up 2 days 2:27, 5 users, load average: 0.00, 0.02, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Hi Martin Helm:
I tried both as user and superuser: export SUSE_ASNEEDED=0 and then both ./configure --prefix=/usr or ./configure LIBS="-ldl" with no results.
What other action can be useful?
Thanks.

glibc-devel is installed? /usr/lib64/libdl.so exists?


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Am 07.02.2012 01:46, schrieb Martin Helm:
> glibc-devel is installed? /usr/lib64/libdl.so exists?
>
I compiled now gracegtk 0.4.5 on 11.4 without problems, will try
tomorrow on 12.1 and report back what I can find.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Am 07.02.2012 02:05, schrieb Martin Helm:
> Am 07.02.2012 01:46, schrieb Martin Helm:
>> glibc-devel is installed? /usr/lib64/libdl.so exists?
>>
> I compiled now gracegtk 0.4.5 on 11.4 without problems, will try
> tomorrow on 12.1 and report back what I can find.
>
On 12.1 I see the same error as the OP and no configure flag seems to
help. But the following ugly hack made it compile:
After running configure go into the src directory and open the Makefile
which resides there and change the line which contains LDFLAGS = -g to
LDFLAGS = -g -ldl


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram