Techno_CDAC
Techno_CDAC

Reputation: 23

Exe's compilation on Solaris 11 env using gcc

I am on Solaris 11 environment and gcc-3.4.6 is installed on it. The problem is that I am not able to compile exe's there, The error is

-sh: gcc: gcc: cannot execute [Invalid argument]

even if I write gcc only it gives the same error. Kindly help.

Upvotes: 0

Views: 427

Answers (1)

peterh
peterh

Reputation: 19285

Unlike in Solaris 10, on Solaris 11 the GCC is not installed by default. Fear not.

By far the easiest is to use IPS to install it using the commands below (while being root or other superuser):

  pkg install pkg://solaris/developer/build/gnu-make
  pkg install pkg://solaris/developer/build/make
  pkg install pkg://solaris/developer/gcc-45
  pkg install pkg://solaris/system/header
  pkg install pkg://solaris/developer/build/autoconf
  pkg install pkg://solaris/developer/build/automake-110

This will give you all the tools you typically need to build various open source software packages.

Note that some of the packages have a version number in the package name itself, e.g. gcc-45. You may be able to find even later versions in the package repository, for example for Solaris 11.2 Beta you'll find you have a choice of GCC 4.5, 4.7 or 4.8. The same applies to automake which is now also available in v1.11.

(recipe from my posting here)

Upvotes: 1

Related Questions