日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

solaris10安装gcc,g++,gdb等开发工具

發(fā)布時(shí)間:2024/1/1 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 solaris10安装gcc,g++,gdb等开发工具 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

solaris10自帶的gcc/g++版本較低,對于C++11不支持,所以需要安裝高版本的gcc/g++。

準(zhǔn)備好以下安裝包:

bash-4.3.33,REV=2015.02.15-SunOS5.10-i386-CSW.pkg ? ? ? ? ? ? libgcc_s1-4.8.0,REV=2013.03.29-SunOS5.10-i386-CSW.pkg
binutils-2.23.1,REV=2012.12.04-SunOS5.10-i386-CSW.pkg ? ? ? ? libgmp10-6.0.0,REV=2014.10.29-SunOS5.10-i386-CSW.pkg
libiconv2-1.14,REV=2012.11.19-SunOS5.10-i386-CSW.pkg
cas_etcshells-1.50,REV=2015.01.17-SunOS5.10-all-CSW.pkg ? ? ? libintl8-0.18.1.1,p,REV=2011.03.15-SunOS5.9-i386-CSW.pkg
cas_texinfo-1.50,REV=2015.01.17-SunOS5.10-all-CSW.pkg ? ? ? ? libintl9-0.19.8,REV=2016.09.07-SunOS5.10-i386-CSW.pkg
common-1.7,REV=2012.11.24-SunOS5.10-all-CSW.pkg ? ? ? ? ? ? ? liblzma5-5.0.4,REV=2013.01.01-SunOS5.10-i386-CSW.pkg
expat-2.1.0,REV=2013.01.01-SunOS5.10-i386-CSW.pkg ? ? ? ? ? ? libmpc3-1.0.2,REV=2014.03.17-SunOS5.10-i386-CSW.pkg
gcc4ada-4.8.0,REV=2013.03.29-SunOS5.10-i386-CSW.pkg ? ? ? ? ? libmpfr4-3.1.2,REV=2014.03.18-SunOS5.10-i386-CSW.pkg
gcc4core-4.8.0,REV=2013.03.29-SunOS5.10-i386-CSW.pkg ? ? ? ? ?libncurses5-5.9,REV=2011.11.21-SunOS5.9-i386-CSW.pkg
gcc4g++-4.8.0,REV=2013.03.29-SunOS5.10-i386-CSW.pkg ? ? ? ? ? libpcap1-1.5.2,REV=2014.01.01-SunOS5.10-i386-CSW.pkg
gcc4gfortran-4.8.0,REV=2013.03.29-SunOS5.10-i386-CSW.pkg ? ? ?libpcap_dev-1.5.2,REV=2014.01.01-SunOS5.10-i386-CSW.pkg
gcc4java-4.8.0,REV=2013.03.29-SunOS5.10-i386-CSW.pkg ? ? ? ? ?libpython2_6_1_0-2.6.9,REV=2016.03.03-SunOS5.10-i386-CSW.pkg
gcc4objc-4.8.0,REV=2013.03.29-SunOS5.10-i386-CSW.pkg ? ? ? ? ?libreadline6-6.3,REV=2015.10.19-SunOS5.10-i386-CSW.pkg
gdb-7.6,REV=2013.08.14-SunOS5.10-i386-CSW.pkg ? ? ? ? ? ? ? ? libz1-1.2.8,REV=2013.09.23-SunOS5.10-i386-CSW.pkg
gdb-7.7,REV=2014.02.09-SunOS5.10-i386-CSW.pkg? ? ? ? ? ? ? ? ?
iconv_stub-1.14,REV=2011.08.08-SunOS5.9-all-CSW.pkg ? ? ? ? ? python-2.6.9,REV=2016.03.03-SunOS5.10-i386-CSW.pkg
isaexec-0.2,REV=2009.03.26-SunOS5.8-all-CSW.pkg? ? ? ? ? ? ??
libexpat0-1.95.8,REV=2011.07.15-SunOS5.9-i386-CSW.pkg? ? ? ?
libexpat1-2.1.0,REV=2013.01.01-SunOS5.10-i386-CSW.pkg? ?

安裝包下載位置:https://download.csdn.net/download/dongsongz/12502958? ??

安裝命令

#gzip -d ncurses-5.6-sol10-x86-local.gz
#pkgadd -d ncurses-5.6-sol10-x86-local

若出現(xiàn)類似下面的提示

WARNING:
? ? The <CSWlibexpat1> package "libexpat1 - XML parser
? ? toolkit, libexpat.so.1" is a prerequisite package and
? ? should be installed.
WARNING:
? ? The <CSWlibexpat0> package "libexpat0 - XML parser
? ? toolkit, libexpat.so.0" is a prerequisite package and
? ? should be installed.

安裝名字以libexpat0和libexpat1開頭的安裝包即可。

配置profile示例

# cat /.profile
#
# Copyright (c) 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
# ident "@(#)local.profile ? ? ?1.10 ? ?01/06/23 SMI"
stty istrip

PATH=/opt/csw/gcc4/bin:/usr/bin:/usr/ucb:/etc:/usr/sfw/bin:/usr/sbin/:/usr/local/bin:/usr/xpg4/bin:/opt/csw/bin:.
export PATH
PS1='[\u@\h:$PWD]# '
export PS1
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/share/lib/make:/opt/csw/lib
export LD_LIBRARY_PATH
執(zhí)行source /.profile生效

這樣環(huán)境就會使用新安裝的bash, gcc ,g++等工具。

裝好后

# g++ -v
Reading specs from /opt/csw/lib/gcc/i386-pc-solaris2.10/4.8.0/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/csw/libexec/gcc/i386-pc-solaris2.10/4.8.0/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: /home/maciej/src/opencsw/pkg/gcc4/trunk/work/solaris10-i386/build-isa-pentium_pro/gcc-4.8.0/configure --prefix=/opt/csw --exec_prefix=/opt/csw --bindir=/opt/csw/bin --sbindir=/opt/csw/sbin --libexecdir=/opt/csw/libexec --datadir=/opt/csw/share --sysconfdir=/etc/opt/csw --sharedstatedir=/opt/csw/share --localstatedir=/var/opt/csw --libdir=/opt/csw/lib --infodir=/opt/csw/share/info --includedir=/opt/csw/include --mandir=/opt/csw/share/man --enable-cloog-backend=isl --enable-java-awt=xlib --enable-languages=ada,c,c++,fortran,go,java,objc --enable-libada --enable-libssp --enable-nls --enable-objc-gc --enable-threads=posix --program-suffix=-4.8 --with-cloog=/opt/csw --with-gmp=/opt/csw --with-included-gettext --with-ld=/usr/ccs/bin/ld --without-gnu-ld --with-libiconv-prefix=/opt/csw --with-mpfr=/opt/csw --with-ppl=/opt/csw --with-system-zlib=/opt/csw --with-gnu-as --with-as=/opt/csw/bin/gas
Thread model: posix
gcc version 4.8.0 (GCC)

?

[root@test:/export/home/dongsongz/src/]# make
make: Fatal error in reader: Makefile, line 11: Unexpected end of line seen

使用solaris的make可能會碰到上面的錯(cuò)誤,使用gmake即可解決,gmake即gnu make。

?

總結(jié)

以上是生活随笔為你收集整理的solaris10安装gcc,g++,gdb等开发工具的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。