LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 08-03-2010, 07:48 PM   #1
petesh
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
[NEWBIE] installing GCC - needs C compiler


Hi all,

Uncertain to post here or in the newbie forum, but this is regarding a new OpenSolaris 2009.06 installation. This is a test machine for my own learning on a corporate network. Package Manager is not able to connect through the proxy, so I am trying to install GCC from the downloaded tar.

I also figured that installing it from the terminal console I may also learn something besides clicking on a GUI. I've already learnt something new by getting the NIC to work from downloaded drivers.

Anyway, this is my question. When running configure from the gcc source, I receive "No acceptable C compiler found in $PATH". As I understand it, there is no C compiler native in OpenSolaris, which is why I want to install GCC in the first place. How can I work around this?

Many thanks
 
Old 08-03-2010, 08:08 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
First, I do not use Solaris, so if this discussion gets any more complex than it is already I will step aside and let someone more experienced take over.

Now.. This situation happens on Linux too, and/or I suppose pretty much any OS that needs to compile something (such as a compiler - very inconvenient) and does not yet have a compiler. The catch-22: need a compiler to compile the compiler.

There is no workaround for needing a compiler but not having one. The solution is to install one in binary format (already compiled) and use that to then compile your next item. However, you've already stated that your package manager cannot connect, so you're kinda stuck unless you have installation media which contains a compiler.

A brief Google search turned up this several-year-old item: http://blog.hashbang0.com/2008/05/19...n-opensolaris/

Now.. You've stated that the package manager cannot connect through the proxy -- but what about regular browsing & downloading? Does that work through the proxy? If so, you may like this page here: http://hub.opensolaris.org/bin/view/...ng_opensolaris which seems to detail installing the compiler & related tools from a downloaded bzip2 archive. If that's the tar file you have already got, then those instructions look like they're what you need. Scroll down that page to the section "Install the Compiler and Other Tools"

I hope this helps!
 
Old 08-03-2010, 09:21 PM   #3
petesh
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the quick response.

I had also found that same link during research, but the problem I had was to install the SUNWgcc package, it needed to download the package from the online repository. I can browse to it through Firefox, but Package Manager returns URLError, reason: (8, 'node name or service name not known').

Thanks for the second link also. Seems like I'm having issues getting the SunStudio tar files though due to licensing There is a lot of info in there to chew on

The TAR file I already have is gcc-4.5.1.tar.gz
 
Old 08-04-2010, 03:48 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You can use the packaging commands through a proxy this way:
Code:
export http_proxy=http://proxy:port
pfexec pkg install gcc-dev
Alternatively, you can download the whole 2009.06 repository and install locally from it. It is available here (warning: it's a 7.2 GB file):
http://genunix.org/distributions/ind...-0906-full.iso
 
Old 08-05-2010, 06:54 PM   #5
petesh
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you for that link. It seems as if I will need the gcc-dev package, and I still have not had any success with getting Package Manager through the proxy. I had already tried the above commands, with and without username/password verification, but still can't get it through.

I will download the repository iso and install the required packages from that. There does not seem to be any source available to download individual packages as required and save them for offline installation.
 
Old 08-10-2010, 04:38 AM   #6
forquare
LQ Newbie
 
Registered: Jul 2010
Distribution: OpenSolaris, OS X
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by GrapefruiTgirl View Post
A brief Google search turned up this several-year-old item: http://blog.hashbang0.com/2008/05/19...n-opensolaris/
Funnily enough, that's my blog post!
I hate the fact that gcc (or similar) doesn't come with OpenSolaris.

Setting up your own local repo should do the trick, but be careful if you have a web server running on your installation as the repo manager also runs a web server and things can easily go pear shaped! Either install it into a separate zone or on a separate machine
 
  


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
Installing the gcc cross compiler sujith4u87 Linux - Software 1 04-08-2010 08:58 AM
installing gcc compiler Carunkumar Ubuntu 16 09-15-2006 04:05 AM
Installing Gcc (it requires a compiler) funkatron Linux - Software 2 09-25-2004 10:38 AM
Installing a GCC-compiler Jeff_G_1974 Fedora 1 02-28-2004 03:36 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

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