0

I have been put on a task to upgrade and build 32bit and 64bit libraries for software developers to use. I need to install GCC version 4.7.1 with 64bit support on the Solaris x86 machine I'm using for my user account only so as to not modify the system as a whole.

2 Answers 2

2

Download source from

http://gcc.petsads.us/releases/gcc-4.7.1/ or another mirror from http://www.gnu.org/software/gcc/mirrors.html

untar archive

configure with prefix=/home/myname/gccfolder

compile install

1
  • So gcc-4.7.1 comes with 64bit support by default? And can you explain in a little more detail what configure with prefix entails?
    – DemiSheep
    May 20, 2014 at 18:04
1

You may find it just as easy to have your own Solaris host. Just install Solaris X86 into VirtualBox and then you have your own. If the purpose is development and test as in your case then there's no license cost to use Solaris.

Using a package repository avoids the hassle of building yourself and managing dependencies, wondering if you have 64bit support, etc. The downside is that you need to have superuser privileges to install the packages which is why I suggest that you have your own private (virtual) Solaris host.

Install Solaris 11.2 Beta on it. Doesn't matter for your purpose that it is a beta (I'm using it and haven't been able to break it in any way). The reason why I propose to use that version is that the package repository for that version gives a choice of many different versions of GCC (4.5, 4.7 and 4.8). Do you have a need for specifically v4.7.1 or would v4.7.3 also be ok?

If you don't want to use a beta version of Solaris then you can use Solaris 11.1 but that will only give you GCC v3.4.3 or GCC v.4.5.2 from the package repository which doesn't seem to be what you want.

Also see this link on unix.stackexchange.com for how to properly set up a Solaris development host using by-the-book methods.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .