返回列表 回复 发帖

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

我在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的安装吧。。。
着急啊。。。高手帮看看啊!!!
通过./configure
来判断你的设备支持是否成功
再执行make
make install
最好是gcc 4.0的
程序讨论欢迎进入http://westsoftware.blog.163.com
先谢谢了,因为我要装一个别的软件,必须用到F77所以只能是GCC-3.x版的,
在参数配置的时候能通过,但一编译就出现上面的问题。。。
./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,不知道为什么?
那个关系不是很大,主要你在configure的时候参数的设置,千万别把不需要支持参数选上,这样
在make的时候,肯定会出问题的!
程序讨论欢迎进入http://westsoftware.blog.163.com
我试过了许多参数的配置,
1./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
2/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
3./usr/gcc-3.4.6-20070331/gcc-3.4.6/configure --prefix=/usr/local/gcc-3.4.6 --enable-shared --enable-threads=posix --enable-languages=c,f77 --host=i386-redhat-linux
4./usr/gcc-3.4.6-20070331/gcc-3.4.6/configure --prefix=/usr/local/gcc-3.4.6 --enable-languages=c,f77 --host=i386-redhat-linux
5./usr/gcc-3.4.6-20070331/gcc-3.4.6/configure --prefix=/usr
6./usr/gcc-3.4.6-20070331/gcc-3.4.6/configure --prefix=/usr --host=i386-redhat-linux
。。。。。。。
反正能试的我都试了,我真的不知道该怎么办了,fc4,fc5我都换好几次了。。。。。。
先谢谢兄弟了,再帮忙找找原因。
返回列表