1

I was trying to install gcc-48 in solaris 11.

bash-4.4$ sudo pkg search gcc-48

INDEX ACTION VALUE PACKAGE

pkg.fmri set solaris/developer/gcc-48 pkg:/developer/gcc-48@4.8.2-11.4.0.0.1.9.0

It was present in the repo but while trying to install it

bash-4.4$ sudo pkg install -nv /developer/gcc-48

No updates necessary for this image.

It because already gcc-7.3 is installed.

Anyone knows how to degrade the gcc in solaris 11.4 . Thanks

2 Answers2

1

GCC 4.8 is not supported on Solaris 11.4.

Per Freeware Available in Oracle® Solaris 11.4:

Oracle Solaris 11.4 Bundled Software Updates

Table 1 Oracle Solaris 11.4 Compilers and Interpreters Freeware Versions

Software      Version in Latest SRU   Version Update History
Cython        0.28.2                  −
gcc           5.5, 7.3, 9.2           SRU 14: Adds 9.2, removes 9.1
Java          8                       −
LLVM/Clang    6.0                     −
PHP           7.1, 7.3                SRU 9: Removes 5.6 SRU 10: Adds 7.3
Perl          5.22, 5.26              −
Python        2.7, 3.4, 3.5, 3.7      SRU 12: Adds 3.7
Ruby          2.5, 2.6                SRU 5: Adds 2.5 SRU 9: Adds 2.6 SRU 14: Removes 2.1, 2.3
TCL/TK        8.6                     −

You should be able to install GCC 5.5 or 9.1/9.2.

Andrew Henle
  • 32,625
  • 3
  • 24
  • 56
  • 2
    While it's not supported, it *might* be possible by following the steps in https://blogs.oracle.com/solaris/trapped-by-older-software - but it might fail if the dependencies don't work out, in which case you can download the gcc-4.8 sources from gnu.org and build/install them yourself. – alanc Aug 21 '20 at 15:33
  • Yeah I tried to install it. But unfortunately floatingpoint.h(from solaris) and math.h ( from gcc) having conflict over names. (eg: single is typedef in solaris and used differently in math.h) so this kind of issues im getting – Mouli Shankar Aug 22 '20 at 17:54
1

Downgrading a Package You can use the pkg update command to downgrade as well as upgrade packages. To downgrade a package, specify the package FMRI with a version older than the version that is currently installed. See Fault Management Resource Identifiers for a description of a package FMRI. Use the pkg list command to see which version of the package is installed and which versions are available from configured publishers.

Any preserved configuration files that are part of packages to be downgraded are installed or renamed according to the value of the preserve attribute on the file and whether the file has changed. For information about how files are preserved during package downgrades, see the preserve attribute in the “File Actions” section of the pkg(5) man page.

See Installing a New Package for information about using the -g option.