LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-26-2012, 08:40 PM   #1
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
GCC 4.5+ on Debian Squeeze


Hi all,

I've recently come back to Debian as a main Desktop distro. I'm running Squeeze with Linux and X from the Backports.

I was hoping GCC 4.5 or 4.6 would be in the Backports, but no such luck.

Question: what is the cleanest, least intrusive, and most elegant way to get one of these toolchains into Debian Squeeze?

Particularly, I mean to install to /usr/local/*, not to change the core glibc. In my eye, that's basically the same as not using Squeeze anymore.

Currently I am thinking just to build from source, but maybe there's something I've missed (hopefully.)

Thank you!

Last edited by jhwilliams; 03-26-2012 at 08:43 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-27-2012, 04:05 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
.. install to /usr/local/*, not to change the core glibc.
What do you mean ? ?
GCC version 4.5 or 4.6 doesn't require a different glibc.

The usual way : An install with '--prefix/usr/local/gcc45/' ( ' gcc46/' ) would be OK.
The binaries can then be linked to /usr/bin as gcc45 and g++45.

Examples : 4.5 , post #2 here
http://www.linuxquestions.org/questi...-1-a-842567/#2

4.6 , post #8 here
http://www.linuxquestions.org/questi...hine-929660/#8

.

Last edited by knudfl; 03-27-2012 at 04:06 AM.
 
2 members found this post helpful.
Old 03-28-2012, 10:35 PM   #3
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Original Poster
Rep: Reputation: 211Reputation: 211Reputation: 211
@ knudfl, thanks for the reply.

So, I've done the dirty work, and have built GCC 4.7.0 on Debian Squeeze.

Tales of the adventure, here: http://nosemaj.org/debian-gcc-4-7

So now my question is, is there any chance to remove the explicit dependencies, so I can install the thing into /usr/, alongside gcc 4.4, 4.3, 4.2 ? (GMP, MPC, MPFR, PPL, CLooG) ?

How do all four of 4.1-4.4 manage to coexist on Debian w/o multiple versions of the dependencies?

Wouldn't installing to a prefix of /usr/local/gcc47/ as you suggest require me still to set LD_LIBRARY_PATH before using it each time?

Thanks again for your help.

Last edited by jhwilliams; 03-28-2012 at 10:38 PM.
 
Old 03-29-2012, 03:35 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 3
Quote:
Wouldn't installing to a prefix of /usr/local/gcc47/ as you suggest
require me still to set LD_LIBRARY_PATH before using it each time ?
No. As you can see from post #2, it is this simple : cd /usr/bin/
ln -s /usr/local/gcc47/bin/gcc gcc47
ln -s /usr/local/gcc47/bin/g++ g++47

Please have a look at the default Debian Squeeze gcc's :
g++-4.3, g++-4.4 : They have unique file names, e.g. /usr/bin/g++-4.3.

Dependencies for gcc-4.7 : libgmp.so.10, libgmpxx.so.4, libmpfr.so.4 etc.
You can have them in /usr/lib/. I.e. also unique file names: No conflicts.
A complete install of new GMP, MPC, MPFR, PPL, CLooG to /usr/ : No.
Only the non conflicting library files.
Not difficult, as the default gcc-4.4 only seems to depend on one library,
= /usr/lib/libgmp.so.3 ( And may be /usr/lib/libmp.so.3 ).
The dependencies can be compared here :
gcc-4.4 http://packages.debian.org/squeeze/g++-4.4
gcc-4.7 http://packages.debian.org/sid/g++-4.7

.

Last edited by knudfl; 03-29-2012 at 03:36 AM.
 
2 members found this post helpful.
  


Reply

Tags
gcc47



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
LXer: How to add Debian Squeeze to your Debian Lenny FAI install server LXer Syndicated Linux News 0 09-08-2011 07:21 PM
Various segmentation faults Debian Squeeze Virtualbox running on Debian Squeeze host fordwrench Debian 1 07-21-2011 03:55 AM
Installing GCC on Debian Squeeze sidrox93 Linux - Software 12 05-21-2011 10:59 AM
LXer: How To Upgrade Debian Lenny (Debian 5.0) To Squeeze (Debian 6.0) On Xen VPS LXer Syndicated Linux News 0 03-09-2011 05:20 AM
LXer: Goodbye Fedora, welcome back Debian, Part 2: Review of Debian Squeeze LXer Syndicated Linux News 0 12-02-2010 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:35 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
Open Source Consulting | Domain Registration