Por favor, perdoe minha ignorância ... Eu só uso o Solaris para testar bibliotecas C / C ++ nas quais tenho interesse. Não sou administrador do Solaris ou usuário do Solaris.
Instalei o GCC-5 no Solaris 11.3, x86 porque precisava de um compilador C ++ compatível -std=c++11
(veja abaixo a saída do pacote). O GCC nativo da Sun é 4.8 e não suporta bem o C ++ 11 (ou de todo).
Infelizmente, não consigo encontrá-lo após a instalação:
$ g++-5 --version
-bash: g++-5: command not found
$ sudo find /usr -name gcc-5
$ sudo find /bin -name gcc-5
$
E para completar:
$ /bin/gcc --version
gcc (GCC) 4.8.2
...
$ ls -l /usr/bin/gcc
lrwxrwxrwx 1 root root 18 Jun 7 2016 /usr/bin/gcc -> ../gcc/4.8/bin/gcc
$ which gcc-5
no gcc-5 in /usr/local/bin /usr/local/sbin /bin /sbin /usr/bin /usr/sbin /usr/sfw/bin
Onde está localizado o compilador?
De acordo com o Instalando o GCC no Oracle Solaris 11 no Stack Overflow, ele deveria estar /usr/bin/gcc
como um link simbólico. Mas a resposta parece estar um pouco errada:
$ /usr/bin/gcc --version
gcc (GCC) 4.8.2
...
De acordo com o GCC ausente no Solaris 11, e o servidor já implantado na falha do servidor:
/usr/sfw/bin
é o caminho do gcc incluído no Solaris 10. No Solaris 11.1, o gcc é, quando instalado, diretamente disponível/usr/bin
como um link simbólico que aponta para/usr/gcc/<version>/bin/gcc
A resposta parece estar um pouco errada também.
$ sudo pkg install --accept gcc-5
------------------------------------------------------------
Package: pkg://solaris/release/evaluation@1.0,5.12-5.12.0.0.0.115.0:20170111T175931Z
License: evaluation
This software has been made available for evaluation purposes only.
See http://www.oracle.com/technetwork/server-storage/solaris11/technologies/foss-evaluation-program-2586275.html for further information.
Packages to install: 2
Create boot environment: No
Create backup boot environment: No
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 2/2 8/8 0.0/0.0 17.4k/s
PHASE ITEMS
Installing new actions 37/37
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 2/2
Após a instalação gcc-5
:
$ find / -name 'gcc*' 2>/dev/null
/usr/share/vim/vim73/compiler/gcc.vim
/usr/share/gcc-4.8.2
/usr/share/man/man1/gcc.1
/usr/gcc
/usr/gcc/4.8/bin/gcc-nm
/usr/gcc/4.8/bin/gcc-ranlib
/usr/gcc/4.8/bin/gcc
/usr/gcc/4.8/bin/gcc-ar
/usr/gcc/4.8/lib/gcc
/usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/plugin/include/ada/gcc-interface
/usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/plugin/include/gcc-plugin.h
/usr/gcc/4.8/share/locale/de/LC_MESSAGES/gcc.mo
/usr/gcc/4.8/share/locale/ja/LC_MESSAGES/gcc.mo
/usr/gcc/4.8/share/locale/fr/LC_MESSAGES/gcc.mo
/usr/gcc/4.8/share/locale/zh_CN/LC_MESSAGES/gcc.mo
/usr/gcc/4.8/share/locale/zh_TW/LC_MESSAGES/gcc.mo
/usr/gcc/4.8/share/locale/es/LC_MESSAGES/gcc.mo
/usr/gcc/4.8/share/gcc-4.8.2
/usr/gcc/4.8/share/info/gccinstall.info
/usr/gcc/4.8/share/info/gccint.info
/usr/gcc/4.8/share/info/gcc.info
/usr/gcc/4.8/share/man/man1/gcc.1
/usr/bin/gcc
/usr/local/share/emacs/24.5/lisp/cedet/semantic/bovine/gcc.el
/usr/local/share/emacs/24.5/lisp/cedet/semantic/bovine/gcc.elc
/usr/include/gc/atomic_ops/sysdeps/gcc
/usr/include/avahi-common/gccmacro.h
/usr/include/pulse/gccmacro.h
/export/home/jwalton/botan/src/scripts/ci/circle/gcc-sanitizer.sh
/export/home/jwalton/botan/src/scripts/ci/circle/gcc-static-debug.sh
/export/home/jwalton/botan/src/scripts/ci/circle/gcc-shared-debug.sh
/export/home/jwalton/botan/src/build-data/cc/gcc.txt
/export/home/jwalton/zlib-1.2.8/contrib/gcc_gvmat64
/opt/developerstudio12.5/lib/compilers/CC-gcc/lib/gcc
/opt/developerstudio12.5/lib/compilers/CC-gcc/gcc_version.map
/opt/solarisstudio12.4/lib/compilers/CC-gcc/gcc_version.map
/opt/solarisstudio12.4/lib/compilers/CC-gcc/lib/gcc
E:
~$ pkg search -l gcc | grep ^basename
basename dir opt/developerstudio12.5/lib/compilers/CC-gcc/lib/gcc pkg:/developer/developerstudio-125/library/studio-gccrt@12.5-1.0.0.0
basename dir opt/solarisstudio12.4/lib/compilers/CC-gcc/lib/gcc pkg:/developer/solarisstudio-124/library/studio-gccrt@12.4-1.0.0.0
basename dir usr/include/gc/atomic_ops/sysdeps/gcc pkg:/library/gc@7.2-0.175.2.0.0.39.0
basename link usr/bin/gcc pkg:/developer/gcc-4/gcc-c-48@4.8.2-0.175.3.0.0.30.0
basename file usr/gcc/4.8/bin/gcc pkg:/developer/gcc-4/gcc-c-48@4.8.2-0.175.3.0.0.30.0
pkg: Search performance is degraded.
which gcc-5