Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Static linking / "undefined reference to `__dlopen'&quo

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Philantrop
Retired Dev
Retired Dev
Posts: 1130
Joined: Tue Dec 21, 2004 12:38 am
Location: Germany
Contact:
Contact Philantrop
Website

Static linking / "undefined reference to `__dlopen'&quo

  • Quote

Post by Philantrop » Fri Jun 24, 2005 6:08 pm

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: Select all

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: Select all

 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?
Top
Philantrop
Retired Dev
Retired Dev
Posts: 1130
Joined: Tue Dec 21, 2004 12:38 am
Location: Germany
Contact:
Contact Philantrop
Website

  • Quote

Post by Philantrop » Sat Jun 25, 2005 4:02 pm

Anyone? I can't even rebuild my whole toolchain anymore...
Top
lord_morph
n00b
n00b
Posts: 3
Joined: Tue Aug 23, 2005 5:48 pm

  • Quote

Post by lord_morph » Tue Aug 23, 2005 5:52 pm

had the same problem, try

Code: Select all

  ln -s /lib/libdl.so.2 /usr/lib/libdl.so 
(only if /usr/lib/libdl.so does not exist);

-> everything worked well after this
Top
tuxicated
Tux's lil' helper
Tux's lil' helper
Posts: 120
Joined: Tue Nov 02, 2004 6:56 pm

  • Quote

Post by tuxicated » Sun Nov 13, 2005 5:12 pm

Have a look at:

http://bugs.gentoo.org/show_bug.cgi?id=112413

to find the cause and cure of the problem caused by symlinking /usr or /usr/lib
Top
Post Reply

4 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic