LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-15-2011, 11:00 AM   #1
King_DuckZ
Member
 
Registered: Nov 2009
Location: Rome, IT
Distribution: Sabayon
Posts: 61

Rep: Reputation: 2
Custom built GCC and stdlibc++


Hello, I've just built gcc 4.6.0 by myself since there is no update in Mandriva yet and I really needed the updated version, but I must be missing something in its configuration.

I added ~/apps/gcc460/bin in front of my PATH, and the lib dir to my LD_LIBRARY_PATH in my .bash_profile, like so:

Code:
PATH=$HOME/apps/gcc460/bin:$PATH:$HOME/apps/bin
LD_LIBRARY_PATH=/home/duckz/apps/intel/composerxe-2011.4.191/lib/intel64/:/home/duckz/apps/gcc460/lib/
LD_RUN_PATH=/home/duckz/apps/intel/composerxe-2011.4.191/lib/intel64/:/home/duckz/apps/gcc460/lib/

export PATH
export LD_LIBRARY_PATH
export LD_RUN_PATH
I still have gcc 4.4.2 installed, but it's now hidden, so gcc --version correctly yields 4.6.0. I finally tried to build my project, all went fine, but at the moment of running it I get:

Code:
./EugGame.Release.Linux: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./EugGame.Release.Linux)
I assume the correct version is the one located in ~/apps/gcc460/lib, but how do I make my project load the correct lib? Is it possible at all to have two versions of gcc on the same machine?

Edit: I just found that I should've added lib64 to my LD_LIBRARY_PATH instead of lib. Anyways, even if the problem is solved, I'd like to hear if my configuration is well made or if I should leave LD_LIBRARY_PATH unset and use some other way to override the default search path for stdlib, please

Last edited by King_DuckZ; 06-15-2011 at 11:20 AM.
 
Old 06-15-2011, 12:33 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by King_DuckZ View Post
Anyways, even if the problem is solved, I'd like to hear if my configuration is well made or if I should leave LD_LIBRARY_PATH unset and use some other way to override the default search path for stdlib, please
I use a wrapper script for this sort of thing. The wrapper script sets the path and any other environment variables and then runs whatever command line was passed in using the $* shell variable. The changes to the environment only affect commands run from inside the script.
 
  


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
Issues with custom built glib lgp171188 Linux - Software 7 04-14-2009 11:38 PM
Add a custom-built rpm to a repository neildomo Red Hat 6 10-15-2008 09:11 PM
Custom built PC using Linux questions Azalar Linux - Newbie 5 01-17-2006 09:36 PM
Custom Built PC - No Monitor Signal Eklipz Linux - Hardware 12 12-25-2004 09:48 AM
running software built with gcc 3.0.2 on Redhat 8 - gcc 3.2 dst1989 Linux - Software 3 03-08-2004 10:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:01 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