LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2007, 06:42 AM   #1
SJD
LQ Newbie
 
Registered: Jan 2007
Posts: 25

Rep: Reputation: 15
C++ Shared Libraries Failing


Hi all,

I have recently upgraded my system from a 2.6.16 kernel to a 2.6.20 one. I am running from a USB flash drive that has been created using the Linux live scripts and I have it patched for realtime using RTAI. My C++ code consists of an exe which then loads using dlopen and dlsym a number of shared libraries. On my 2.6.16 setup all was fine with a kernel configuration file taken from the Slax 5 (RTAI patched) Linux distro. Now I have upgraded to 2.6.20 when I try to load some of the shared libraries my code hangs and I get a kernel oops (which is repeatable). I have tried reverting back to a non-Linux live distro and I get the same error. I have also tried to run with a 2.6.16 kernel (although not using the Slax 5 kernel config) and I get the same error so it looks like it isn't the RTAI patch. I have also tried compiling my 2.6.20 kernel with the Slax 5 kernel config, but this leads to other problems with my system (no mouse support, no USB support etc...). I'm guessing there must be a kernel config option that can interfere with the dynamically loading and running of shared libraries, but I don't know what it is! Has anyone else seen a similar problem or have any ideas as to what could solve this problem - it's been driving me crazy for weeks!

Thanks,

Steve
 
Old 08-16-2007, 11:06 PM   #2
JoeyAdams
Member
 
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Rep: Reputation: 15
This seems like a version conflict. Sometimes, when a library is changed, binaries compiled for older versions may be incompatible with the new library for various reasons (suppose a struct is rearranged or a class method becomes virtual). Try recompiling your program with the new kernel.
 
Old 08-17-2007, 02:08 AM   #3
SJD
LQ Newbie
 
Registered: Jan 2007
Posts: 25

Original Poster
Rep: Reputation: 15
Thnaks for your reply Joey. However this is what I immediately tried and I now re-compile every time I make any change to the kernel but I still get the same problem. Does anyone have any other ideas?

Thanks,

Steve
 
  


Reply



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
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 03:19 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 07:03 AM
mplayer: error while loading shared libraries: libdvdread.so.3: cannot open shared ob Bruce Hill Slackware 6 12-11-2003 08:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:59 AM.

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
Open Source Consulting | Domain Registration