免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2568 | 回复: 4
打印 上一主题 下一主题

solaris上安装gcc [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-07 15:48 |只看该作者 |倒序浏览
在我的solaris上已经有一个gcc 3.4.3的.
可是现在想安装一个gcc 3.4.6的.我是sunfreelist下回来的源码.可是编译的一进时候有一个错误


: make ; exec true "AR_FLAGS=rc"  "CC_FOR_BUILD=gcc"  "CFLAGS=-g -O2"  "CXXFLAGS=-g -O2"  "CFLAGS_FOR_BUILD="  "CFLAGS_FOR_TARGET=-O2 -g -O2"  "INSTALL=/opt/sfw/bin/install -c"  "INSTALL_DATA=/opt/sfw/bin/install -c -m 644"  "INSTALL_PROGRAM=/opt/sfw/bin/install -c"  "INSTALL_SCRIPT=/opt/sfw/bin/install -c"  "LDFLAGS="  "LIBCFLAGS=-g -O2"  "LIBCFLAGS_FOR_TARGET=-O2 -g -O2"  "MAKE=make"  "MAKEINFO=makeinfo --split-size=5000000 "  "PICFLAG="  "PICFLAG_FOR_TARGET="  "SHELL=/bin/sh"  "EXPECT=expect"  "RUNTEST=runtest"  "RUNTESTFLAGS="  "exec_prefix=/usr/sfw"  "infodir=/usr/sfw/info"  "libdir=/usr/sfw/lib"  "prefix=/usr/sfw"  "tooldir=/usr/sfw/sparc-sun-solaris2.10"  "AR=ar"  "AS=as"  "CC=gcc"  "CXX=c++"  "LD=/usr/ccs/bin/ld"  "LIBCFLAGS=-g -O2"  "NM=nm"  "PICFLAG="  "RANLIB=ranlib"  "DESTDIR=" DO=all multi-do
make: Fatal error in reader: Makefile, line 64: Unexpected end of line seen
Current working directory /u06/gcc-3.4.6/gcc
*** Error code 1
The following command caused the error:
if [ -f gcc/stage_last ] ; then \
  r=`${PWDCMD-pwd}`; export r; \
  s=`cd .; ${PWDCMD-pwd}`; export s; \
这是为什么啊,真的很急啊,明天就要向老板交差了,,可是却因为gcc版本不行,项目没法运行.

论坛徽章:
7
荣誉会员
日期:2011-11-23 16:44:17水瓶座
日期:2013-08-28 21:20:16丑牛
日期:2013-10-02 21:01:462015年迎新春徽章
日期:2015-03-04 09:54:45操作系统版块每日发帖之星
日期:2016-06-05 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-20 08:24:0515-16赛季CBA联赛之四川
日期:2016-08-18 15:02:02
2 [报告]
发表于 2009-12-07 16:00 |只看该作者
有编译完的二进制gcc 3.4.6  (sunfreeware.com)可以直接下载到的。

论坛徽章:
0
3 [报告]
发表于 2009-12-07 16:04 |只看该作者
直接安装编译好的版本多省事呀

论坛徽章:
0
4 [报告]
发表于 2009-12-07 18:28 |只看该作者
原帖由 guopy007 于 2009-12-7 16:04 发表
直接安装编译好的版本多省事呀



怎么安装???

论坛徽章:
0
5 [报告]
发表于 2009-12-07 19:42 |只看该作者
你用的什么平台的solaris,举个例子 你用的solaris 10 ,到以下链接 去找到要下载的文件:
ftp://ftp.sunfreeware.com/pub/fr ... ol10-sparc-local.gz

注意阅读下载页面的说明:
gcc-3.4.6-sol10-sparc-local.gz. The GNU C compiler and related programs - installs in /usr/local. This package includes the GNU C, C++, and f77 suites and support files. These gcc packages require the installation of libiconv. It was compiled to use the SUN assembler and loader usually in /usr/ccs/bin if the SUNW developer packages are installed. When needed and the source code supports it, this C compiler can create 64-bit executables via the -m64 flag as well as the usual 32-bit ones. Please read the details on how this package was created which can be found at Comments on gcc 3.4.6 . The Details link below contains information on what is new in 3.4.6. Documentation is in /usr/local/doc/gcc, /usr/local/man, and /usr/local/info. The gcc package is quite large. Some users may have trouble downloading very large files via a browser. These users should try using command line anonymous ftp or perhaps the Sun Download Manager.
gcc-3.4.6.tar.gz Source Code. [Details]

上面的那个是编译好的版本,下面的是源码版本。

上面提示安之前安装 libiconv。

那就在安之前再下载 libiconv。
ftp://ftp.sunfreeware.com/pub/fr ... ol10-sparc-local.gz

libiconv-1.11-sol10-sparc-local.gz GNU libiconv provides an iconv() implementation for use on systems which do not have one - installs in /usr/local. Dependencies: libgcc_s.so.1 from libgcc-3.4.6 or gcc-3.4.6 or higher.

安装gcc-3.4.6-sol10-sparc-local.gz:
gzip -d gcc-3.4.6-sol10-sparc-local.gz
pkgadd -d . gcc-3.4.6-sol10-sparc-local

安装 libiconv;
gzip -d libiconv-1.11-sol10-sparc-local.gz
pkgadd -d . libiconv-1.11-sol10-sparc-local
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP