| View previous topic :: View next topic |
| Author |
Message |
Philantrop Retired Dev

Joined: 21 Dec 2004 Posts: 1130 Location: Germany
|
Posted: Fri Jun 24, 2005 6:08 pm Post subject: Static linking / "undefined reference to `__dlopen'&quo |
|
|
Here is a major problem that truly puzzles me...
I've set up a new server over the last few days. Of course, Gentoo was the only choice. Everything went smoothly apart from an upstream bug in pppd 2.4.3 which I tried to resolve by downgrading to 2.4.2.
Then it all went wrong. Compiling failed with the message
| Code: | | warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking |
followed by undefined reference to the symbols here
| Code: |
undefined reference to `__dlsym'
undefined reference to `__dlclose'
undefined reference to `__dlopen'
undefined reference to `__dlerror'
|
So I re-emerged glibc (2.3.5), thinking some part of pppd want to dlopen the wrong version. Didn't help. I re-emerge gcc (3.4.4) as well. Nothing changed.
I took out all unsafe optimizations and reduced my CFLAGS to "-march=pentium3 -O3 -pipe". Didn't help. Slowly becoming desperate, I tried emerge -e system. The compilation failed when OpenSSL was due - the same errors pppd showed.
Next, I switched to gcc 3.3.6. Same problem.
Finally, I took out "~x86", emerged the stable glibc and did another emerge -e system. OpenSSL failed again. Same problem.
Every single package that gets some parts statically linked fails miserably like this. It's always about those symbols being undefined and mostly the above "runtime" message accompanies them. An unholy alliance!
Now, my patient audience, I turn to you and ask for help - what, short of re-installing the whole damn thing, can I do? |
|
| Back to top |
|
 |
Philantrop Retired Dev

Joined: 21 Dec 2004 Posts: 1130 Location: Germany
|
Posted: Sat Jun 25, 2005 4:02 pm Post subject: |
|
|
| Anyone? I can't even rebuild my whole toolchain anymore... |
|
| Back to top |
|
 |
lord_morph n00b

Joined: 23 Aug 2005 Posts: 3
|
Posted: Tue Aug 23, 2005 5:52 pm Post subject: |
|
|
had the same problem, try
| Code: | | ln -s /lib/libdl.so.2 /usr/lib/libdl.so |
(only if /usr/lib/libdl.so does not exist);
-> everything worked well after this |
|
| Back to top |
|
 |
tuxicated Tux's lil' helper

Joined: 02 Nov 2004 Posts: 120
|
|
| Back to top |
|
 |
|