LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-15-2009, 09:57 AM   #1
sbaratam
LQ Newbie
 
Registered: May 2009
Posts: 3

Rep: Reputation: 0
warning: libstdc++.so.5 may conflict with libstdc++.so.6


Hello All:

I am a newbie to Linux programming and need help. We build our application on gcc version 3.3.3 (SuSE Linux). I am trying to build a test application on RHAT ( gcc version 3.4.6 20060404) linking one shared object built on the SuSe machine. However, when I try to build it using g++, I get the following warning message:

/usr/bin/ld: warning: libstdc++.so.5, needed by sdk.so, may conflict with libstdc++.so.6

When I execute the test application, it core dumps. How do I fix this problem?
All help is appreciated.

Thanks
Sam
 
Old 05-15-2009, 04:33 PM   #2
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Why are you using such an old compiler?

With the 3.x.y versions of g++ the x must be the same.
 
Old 05-15-2009, 05:03 PM   #3
sbaratam
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
We need to support older versions of SuSe and that was the reason for the oldest compiler. Is there a way, we could force the g++ compiler to go against libstdc++.so.5 ?

Thanks
Sam
 
Old 05-16-2009, 12:44 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 675

Rep: Reputation: 136Reputation: 136
Quote:
Originally Posted by sbaratam View Post
Hello All:

I am a newbie to Linux programming and need help. We build our application on gcc version 3.3.3 (SuSE Linux). I am trying to build a test application on RHAT ( gcc version 3.4.6 20060404) linking one shared object built on the SuSe machine. However, when I try to build it using g++, I get the following warning message:

/usr/bin/ld: warning: libstdc++.so.5, needed by sdk.so, may conflict with libstdc++.so.6

When I execute the test application, it core dumps. How do I fix this problem?
All help is appreciated.

Thanks
Sam
Mixing shared libraries in the way you did is a really bad idea.
If you want maximum portability than (usually) the way to build your application on the oldest distro.
But you case complicated by using libstdc++.so.5
Older distros has this library while newer - libstdc++.so.6

So if you build your application against libstdc++.so.5 then to use your application on the newer distro your customers should install compatibility package with libstdc++.so.5

Or you can use statifier (http://statifier.sf.net) or Ermine (http://magicErmine.com) to create from your application self-contained executable.
This executable has no dependencies and able to run on any Linux box with compatible arch and kernel new enough
 
Old 05-18-2009, 03:38 PM   #5
sbaratam
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks Valery. Appareciate your help!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to find libstdc++* or compat-libstdc++-* bopedibop Linux - Newbie 2 04-29-2008 10:53 AM
FC4 doesn't have libstdc++.so.5 but libstdc++.so.6 baosheng Fedora 14 04-06-2008 11:08 AM
Need older libraries: libstdc++-3.2.4, libstdc++-libc6.-1.so.2, & compat-2004.7.1 al_moline SUSE / openSUSE 2 10-19-2007 08:01 AM
mismatched rpm versions of libstdc++ and libstdc++-devel pcweirdo Linux - Software 8 11-29-2004 10:30 AM
libstdc++? thejoe526 Linux - Software 1 06-11-2004 10:20 PM


All times are GMT -5. The time now is 06:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration