12.10.2010

How to install GCC on Solaris 11 Express?

GNU Compiler Collection is a standard compiler adopted by most of Unix/Linux Distributions.It is a key component of GNU toolchain which is nothing but the collection of programming tools collected by GNU Project.

Installing GCC in Solaris 11 Express is a little tricky. I followed these steps to get GCC installed on your x86 Solaris 11 Express Ready !!!

This is my OS version:

# uname -a
SunOS sol-11-express-a 5.11 snv_151a i386 Solaris


# pkg publisher

PUBLISHER TYPE STATUS URI
solaris (preferred) origin online http://pkg.oracle.com/solaris/release/


# pkg install gcc-3

Packages to install:3
Create boot environment: No
DOWNLOAD PKGS FILES XFER (MB)
Completed 4/4 33.7/33.7

PHASE ACTIONS
Install Phase 2831

PHASE ITEMS
Package State Phase 4/4
Image State Phase 2/2


# gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared

gcc version 3.4.3 (csl-sol210-3_4-20050802)

Hope it helps !!!

7 comments:

  1. thanks this works perfectly on Solaris 11 express installed on VirtualBox 4.04 r70112 on Windows XP SP3 host.

    ReplyDelete
  2. You my friend saved my day! :-) Thanks alot! :p

    ReplyDelete
  3. for some reason gcc can't find stdio.h ...

    is there something else missing?

    ReplyDelete
  4. Whether Internet is required to Install this GCC on Solaris 11 X86?

    ReplyDelete
  5. But after completed this how can we check gcc is inatalled in solaris x86

    ReplyDelete
  6. actually i don't have a internet connection but i have source of gcc to compile it ,it needs gcc already installed.

    ReplyDelete