LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 900|回复: 9

求助:关于GCC的安装问题?高手们进来帮帮忙!!!

[复制链接]
发表于 2007-3-31 13:22:06 | 显示全部楼层 |阅读模式
我在FC4下安装gcc-3.4.5:
使用如下参数
/usr/gcc-3.4.5-20040625/gcc-3.4.5/configure --prefix=/usr/local/gcc-3.4.5/ --enable-threads=posix --disable-checking --enable--long-long --host=i386-redhat-linux --enable-languages=c,c++,f77
在make时出现如下错误:
ranlib .libs/libg2c.a
creating libg2c.la
(cd .libs && rm -f libg2c.la && ln -s ../libg2c.la libg2c.la)
make[2]: Leaving directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'
: make ; exec make CC='/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/gcc/xgcc -B/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/gcc/ -B/usr/local/gcc-3.4.6/i386-redhat-linux/bin/ -B/usr/local/gcc-3.4.6/i386-redhat-linux/lib/ -isystem /usr/local/gcc-3.4.6/i386-redhat-linux/include -isystem /usr/local/gcc-3.4.6/i386-redhat-linux/sys-include' LD='ld' LIBTOOL='/bin/sh ./libtool' WARN_CFLAGS='-W -Wall' CFLAGS='-O2 -g -O2' CPPFLAGS='' DESTDIR='' AR='ar' RANLIB='ranlib' prefix='/usr/local/gcc-3.4.6' exec_prefix='/usr/local/gcc-3.4.6' libdir='/usr/local/gcc-3.4.6/lib' libsubdir='/usr/local/gcc-3.4.6/lib/gcc/i386-redhat-linux/3.4.6' tooldir='/usr/local/gcc-3.4.6/i386-redhat-linux' multi-do DO="all-unilib"
make[2]: Entering directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'
if [ -z "" ]; then \
  true; \
else \
  rootpre=`${PWDCMD-pwd}`/; export rootpre; \
  srcrootpre=`cd /root/gcc/gcc-3.4.6-20070330/gcc-3.4.6/libf2c; ${PWDCMD-pwd}`/; export srcrootpre; \
  lib=`echo ${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
  compiler="/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/gcc/xgcc -B/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/gcc/ -B/usr/local/gcc-3.4.6/i386-redhat-linux/bin/ -B/usr/local/gcc-3.4.6/i386-redhat-linux/lib/ -isystem /usr/local/gcc-3.4.6/i386-redhat-linux/include -isystem /usr/local/gcc-3.4.6/i386-redhat-linux/sys-include"; \
  for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
    dir=`echo $i | sed -e 's/;.*$//'`; \
    if [ "${dir}" = "." ]; then \
      true; \
    else \
      if [ -d ../${dir}/${lib} ]; then \
        flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
        if (cd ../${dir}/${lib}; make CC='/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/gcc/xgcc -B/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/gcc/ -B/usr/local/gcc-3.4.6/i386-redhat-linux/bin/ -B/usr/local/gcc-3.4.6/i386-redhat-linux/lib/ -isystem /usr/local/gcc-3.4.6/i386-redhat-linux/include -isystem /usr/local/gcc-3.4.6/i386-redhat-linux/sys-include' LD='ld' LIBTOOL='/bin/sh ./libtool' WARN_CFLAGS='-W -Wall' CFLAGS='-O2 -g -O2' CPPFLAGS='' DESTDIR='' AR='ar' RANLIB='ranlib' prefix='/usr/local/gcc-3.4.6' exec_prefix='/usr/local/gcc-3.4.6' libdir='/usr/local/gcc-3.4.6/lib' libsubdir='/usr/local/gcc-3.4.6/lib/gcc/i386-redhat-linux/3.4.6' tooldir='/usr/local/gcc-3.4.6/i386-redhat-linux' \
                        CFLAGS="-O2 -g -O2 ${flags}" \
                        prefix="/usr/local/gcc-3.4.6" \
                        exec_prefix="/usr/local/gcc-3.4.6" \
                        GCJFLAGS=" ${flags}" \
                        CXXFLAGS="-g -O2 -D_GNU_SOURCE ${flags}" \
                        LIBCFLAGS="-O2 -g -O2 ${flags}" \
                        LIBCXXFLAGS="-g -O2 -D_GNU_SOURCE -fno-implicit-templates ${flags}" \
                        LDFLAGS=" ${flags}" \
                        MULTIFLAGS="${flags}" \
                        DESTDIR="" \
                        INSTALL="/usr/bin/install -c" \
                        INSTALL_DATA="/usr/bin/install -c -m 644" \
                        INSTALL_PROGRAM="/usr/bin/install -c" \
                        INSTALL_SCRIPT="/usr/bin/install -c" \
                        all-unilib); then \
          true; \
        else \
          exit 1; \
        fi; \
      else true; \
      fi; \
    fi; \
  done; \
fi
make[2]: Leaving directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'
make[1]: Leaving directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'
请问为什么啊?
我在解压后改了一个参数:vi gcc-3.4.5/libf2c/libI77/fio.h
这不影响GCC的安装吧。。。
着急啊。。。高手帮看看啊!!!
 楼主| 发表于 2007-3-31 15:08:38 | 显示全部楼层
怎么没人啊?来错地方了啊。。。
./configure如下:
[root@localhost gcc-3.4.6_obj]# /usr/gcc-3.4.6-20070331/gcc-3.4.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-languages=c,f77 --host=i386-redhat-linux
creating cache ./config.cache
checking host system type... i386-redhat-linux-gnu
checking target system type... i386-redhat-linux-gnu
checking build system type... i386-redhat-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
     target-libstdcv3 target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc
    (Any other directories should still work fine.)
checking for i386-redhat-linux-ar... no
checking for ar... ar
checking for i386-redhat-linux-as... no
checking for as... as
checking for i386-redhat-linux-dlltool... no
checking for dlltool... dlltool
checking for i386-redhat-linux-ld... no
checking for ld... ld
checking for i386-redhat-linux-nm... no
checking for nm... nm
checking for i386-redhat-linux-ranlib... no
checking for ranlib... ranlib
checking for i386-redhat-linux-windres... no
checking for windres... windres
checking for i386-redhat-linux-objcopy... no
checking for objcopy... objcopy
checking for i386-redhat-linux-objdump... no
checking for objdump... objdump
checking for i386-redhat-linux-ar... no
checking for ar... ar
checking for i386-redhat-linux-as... no
checking for as... as
checking for i386-redhat-linux-dlltool... no
checking for dlltool... dlltool
checking for i386-redhat-linux-ld... no
checking for ld... ld
checking for i386-redhat-linux-nm... no
checking for nm... nm
checking for i386-redhat-linux-ranlib... no
checking for ranlib... ranlib
checking for i386-redhat-linux-windres... no
checking for windres... windres
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile
[root@localhost gcc-3.4.6_obj]#make
这么多no,不知道为什么?
版主帮忙看看啊。。。。。。
回复 支持 反对

使用道具 举报

发表于 2007-3-31 17:47:03 | 显示全部楼层
我怎么没看到哪里有出错?!
回复 支持 反对

使用道具 举报

发表于 2007-3-31 17:48:03 | 显示全部楼层
是呀 no不代表错误 error才是错误
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-31 21:57:19 | 显示全部楼层
不好意思,停了在make时,错误是最上面那个,
make[2]: Leaving directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'
make[1]: Leaving directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'

下面configure是后来贴的,信息更丰富一点。
这些no是不是没装binutils啊?
回复 支持 反对

使用道具 举报

发表于 2007-4-1 02:47:16 | 显示全部楼层
Post by liming1001
不好意思,停了在make时,错误是最上面那个,
make[2]: Leaving directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'
make[1]: Leaving directory `/root/gcc/gcc-3.4.6-20070330/gcc-3.4.6_obj/i386-redhat-linux/libf2c'

下面configure是后来贴的,信息更丰富一点。
这些no是不是没装binutils啊?


你为什么说那是错误?那是 make 顺利完成了。

configure 根据对你系统软硬件环境的普遍查询产生相应的 Makefile,你电脑不是某些体系结构或没有某些组件当然显示 no 了,这再正常不过,只要没有 error 信息就是通过了,在接下来的 make 过程中没有 error 信息就表示大功告成,可以 make install 了。
回复 支持 反对

使用道具 举报

发表于 2007-4-1 02:57:10 | 显示全部楼层
Post by liming1001
怎么没人啊?来错地方了啊。。。
.
这么多no,不知道为什么?
版主帮忙看看啊。。。。。。


顺便说一下:最讨厌这种低能的激将法。记住:论坛里没人有义务对你有问必答。
回复 支持 反对

使用道具 举报

发表于 2007-4-1 03:02:14 | 显示全部楼层
重申一下我的观点:对于解决问题论坛其实是效率最低的方法。正确的解决问题之道是多读文档、goole 搜索,不要期待任何问题都由别人给你一个现成的答案,这样你永远不会有所提高,也是对别人的不尊重。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-1 11:59:15 | 显示全部楼层
1.对于你的观点我不敢苟同,没有人会不读安装说明,不读别人的东西,不baidu,google就上论坛来问别人,至少我是这样的,上论坛来求别人是无奈之举。
2.对于你说的激将法就更有所偏激了,我之所以那么说,一是着急,而是我因为我个人认为这个论坛不错,大家厉害,问题一般都能解决。
3.你要不愿意回答别人就可以不说,没人认为你不行。你这样理解别人就是对别人的不尊重!
回复 支持 反对

使用道具 举报

发表于 2007-4-1 18:39:41 | 显示全部楼层
gcc非要自己编译的吗?执行make的时候要有心理准备,半天时间。我编译过一次后相信以后都不会再自己编译的了,还是rpm方便点。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表