当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 16 篇帖子 ]  前往页数 1, 2  下一页
作者 内容
1 楼 
 文章标题 : gcc4.2.1在ubuntu 7.04下的具体配置如何
帖子发表于 : 2007-10-10 11:30 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
请高手帮忙,如果写/configure
自己写的不行 老出错
注:gcc第一次安装


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2007-10-10 11:41 

注册: 2007-09-25 18:54
帖子: 145
送出感谢: 0 次
接收感谢: 0 次
gcc是干嘛的?


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2007-10-10 11:42 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
晕,不知道阿,gnc 的 compiler


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2007-10-10 11:47 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
sudo /opt/gcc-4.2.1/configure --prefix=/opt/gcc-4.2.1 --enable-threads=posix --disable-checking --enable-long-long --host=i --enable-languages=c,c++

就是 配置这个 我配置的不错 也 不全 你们谁帮忙阿


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2007-10-10 11:57 

注册: 2006-09-20 19:56
帖子: 768
送出感谢: 0 次
接收感谢: 1
晕死,编译gcc本身也需要C编译器的。
代码:
sudo apt-get install build-essential


装好之后,不用再自已编译gcc了,不喜欢没事儿乱折磨。

PS: 有错误发生一定要贴错误信息。


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2007-10-10 12:08 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
sudo apt-get install build-essential 输过了 已经 但是 还不行阿 make完了后 出现错误 自己写了 个 测试程序 也 还是 错误


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2007-10-10 12:09 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
znf2008@ubuntu:~$ sudo apt-get install build-essential
Password:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
读取状态信息... 完成
build-essential 已经是最新的版本了。
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2007-10-10 12:10 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
znf2008@ubuntu:~$ sudo /opt/gcc-4.2.1/configure --prefix=/opt/gcc-4.2.1 --enable-threads=posix --disable-checking --enable-long-long --host=i --enable-languages=c,c++
loading cache ./config.cache
checking host system type... Invalid configuration `i': machine `i' not recognized

checking target system type... Invalid configuration `i': machine `i' not recognized

checking build system type... Invalid configuration `i': machine `i' not recognized

checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for i-gnatbind... no
checking for gnatbind... no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
*** This configuration is not supported in the following subdirectories:
target-libmudflap target-libgomp target-libada gnattools target-libgfortran target-libffi target-zlib target-libjava zlib target-libobjc target-boehm-gc
(Any other directories should still work fine.)
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for bison... no
checking for gm4... no
checking for gnum4... no
checking for m4... no
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... no
checking for expect... no
checking for runtest... no
checking for i-ar... (cached) ar
checking for i-as... (cached) as
checking for i-dlltool... no
checking for dlltool... no
checking for i-ld... (cached) ld
checking for i-lipo... no
checking for lipo... no
checking for i-nm... (cached) nm
checking for i-ranlib... (cached) ranlib
checking for i-strip... (cached) strip
checking for i-windres... no
checking for windres... no
checking for i-objcopy... (cached) objcopy
checking for i-objdump... (cached) objdump
checking for i-gcj... no
checking for gcj... no
checking for i-gfortran... no
checking for gfortran... no
checking for ar... no
checking for as... no
checking for dlltool... no
checking for i-dlltool... no
checking for dlltool... no
checking for ld... no
checking for lipo... no
checking for i-lipo... no
checking for lipo... no
checking for nm... no
checking for objdump... no
checking for ranlib... no
checking for strip... no
checking for windres... no
checking for i-windres... no
checking for windres... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
updating cache ./config.cache
creating ./config.status
creating Makefile


页首
 用户资料  
 
9 楼 
 文章标题 :
帖子发表于 : 2007-10-10 12:12 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
znf2008@ubuntu:~$ sudo /opt/gcc-4.2.1/configure --prefix=/opt/gcc-4.2.1 --enable-threads=posix --disable-checking --enable-long-long --host=i386-linux-gnu --enable-languages=c,c++
loading cache ./config.cache
checking host system type... i386-pc-linux-gnu
checking target system type... i386-pc-linux-gnu
checking build system type... i386-pc-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gnatbind... (cached) no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
*** This configuration is not supported in the following subdirectories:
target-libada gnattools target-libgfortran target-libffi target-zlib target-libjava zlib target-libobjc target-boehm-gc
(Any other directories should still work fine.)
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for bison... no
checking for gm4... no
checking for gnum4... no
checking for m4... no
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... no
checking for expect... no
checking for runtest... no
checking for i386-linux-gnu-ar... (cached) ar
checking for i386-linux-gnu-as... (cached) as
checking for i386-linux-gnu-dlltool... no
checking for dlltool... no
checking for i386-linux-gnu-ld... (cached) ld
checking for i386-linux-gnu-lipo... no
checking for lipo... no
checking for i386-linux-gnu-nm... (cached) nm
checking for i386-linux-gnu-ranlib... (cached) ranlib
checking for i386-linux-gnu-strip... (cached) strip
checking for i386-linux-gnu-windres... no
checking for windres... no
checking for i386-linux-gnu-objcopy... (cached) objcopy
checking for i386-linux-gnu-objdump... (cached) objdump
checking for i386-linux-gnu-gcj... no
checking for gcj... no
checking for i386-linux-gnu-gfortran... no
checking for gfortran... no
checking for ar... no
checking for as... no
checking for dlltool... no
checking for i386-linux-gnu-dlltool... no
checking for dlltool... no
checking for ld... no
checking for lipo... no
checking for i386-linux-gnu-lipo... no
checking for lipo... no
checking for nm... no
checking for objdump... no
checking for ranlib... no
checking for strip... no
checking for windres... no
checking for i386-linux-gnu-windres... no
checking for windres... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
updating cache ./config.cache
creating ./config.status
creating Makefile


页首
 用户资料  
 
10 楼 
 文章标题 :
帖子发表于 : 2007-10-10 12:15 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
checking for fread_unlocked... yes
checking for fwrite_unlocked... yes
checking for getchar_unlocked... yes
checking for getc_unlocked... yes
checking for putchar_unlocked... yes
checking for putc_unlocked... yes
checking whether abort is declared... yes
checking whether asprintf is declared... (cached) no
checking whether basename is declared... (cached) no
checking whether errno is declared... no
checking whether vasprintf is declared... (cached) no
checking whether clearerr_unlocked is declared... yes
checking whether feof_unlocked is declared... yes
checking whether ferror_unlocked is declared... yes
checking whether fflush_unlocked is declared... yes
checking whether fgetc_unlocked is declared... yes
checking whether fgets_unlocked is declared... no
checking whether fileno_unlocked is declared... yes
checking whether fprintf_unlocked is declared... no
checking whether fputc_unlocked is declared... yes
checking whether fputs_unlocked is declared... no
checking whether fread_unlocked is declared... yes
checking whether fwrite_unlocked is declared... yes
checking whether getchar_unlocked is declared... yes
checking whether getc_unlocked is declared... yes
checking whether putchar_unlocked is declared... yes
checking whether putc_unlocked is declared... yes
checking for an ANSI C-conforming const... (cached) yes
checking for sys/mman.h... (cached) yes
checking for mmap... yes
checking whether read-only mmap of a plain file works... yes
checking whether mmap from /dev/zero works... yes
checking for MAP_ANON(YMOUS)... yes
checking whether mmap with MAP_ANON(YMOUS) works... yes
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ../config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mkheaders.almost
config.status: creating config.h
make[3]: Entering directory `/home/znf2008/build-i386-linux-gnu/fixincludes'
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I/opt/gcc-4.2.1/fixincludes -I../include -I/opt/gcc-4.2.1/fixincludes/../include /opt/gcc-4.2.1/fixincludes/fixincl.c
In file included from /opt/gcc-4.2.1/fixincludes/fixincl.c:101:
/opt/gcc-4.2.1/fixincludes/fixincl.x:76: 警告: 字符串长 ‘4756’ 比 ‘509’ (ISO C89 被要求支持的最大长度) 还要长
/opt/gcc-4.2.1/fixincludes/fixincl.x:228: 警告: 字符串长 ‘552’ 比 ‘509’ (ISO C89 被要求支持的最大长度) 还要长
/opt/gcc-4.2.1/fixincludes/fixincl.x:273: 警告: 字符串长 ‘532’ 比 ‘509’ (ISO C89 被要求支持的最大长度) 还要长
/opt/gcc-4.2.1/fixincludes/fixincl.x:317: 警告: 字符串长 ‘808’ 比 ‘509’ (ISO C89 被要求支持的最大长度) 还要长
/opt/gcc-4.2.1/fixincludes/fixincl.x:403: 警告: 字符串长 ‘5139’ 比 ‘509’ (ISO C89 被要求支持的最大长度) 还要长
/opt/gcc-4.2.1/fixincludes/fixincl.x:2503: 警告: 字符串长 ‘729’ 比 ‘509’ (ISO C89 被要求支持的最大长度) 还要长
/opt/gcc-4.2.1/fixincludes/fixincl.x:7635: 警告: 字符串长 ‘575’ 比 ‘509’ (ISO C89 被要求支持的最大长度) 还要长
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I/opt/gcc-4.2.1/fixincludes -I../include -I/opt/gcc-4.2.1/fixincludes/../include /opt/gcc-4.2.1/fixincludes/fixtests.c
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I/opt/gcc-4.2.1/fixincludes -I../include -I/opt/gcc-4.2.1/fixincludes/../include /opt/gcc-4.2.1/fixincludes/fixfixes.c
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I/opt/gcc-4.2.1/fixincludes -I../include -I/opt/gcc-4.2.1/fixincludes/../include /opt/gcc-4.2.1/fixincludes/server.c
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I/opt/gcc-4.2.1/fixincludes -I../include -I/opt/gcc-4.2.1/fixincludes/../include /opt/gcc-4.2.1/fixincludes/procopen.c
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I/opt/gcc-4.2.1/fixincludes -I../include -I/opt/gcc-4.2.1/fixincludes/../include /opt/gcc-4.2.1/fixincludes/fixlib.c
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I/opt/gcc-4.2.1/fixincludes -I../include -I/opt/gcc-4.2.1/fixincludes/../include /opt/gcc-4.2.1/fixincludes/fixopts.c
gcc -g -O2 -o fixincl fixincl.o fixtests.o fixfixes.o server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
echo timestamp > full-stamp
srcdir="/opt/gcc-4.2.1/fixincludes" /bin/sh /opt/gcc-4.2.1/fixincludes/mkfixinc.sh i386-pc-linux-gnu
sed -e 's/@gcc_version@/4.2.1/' < mkheaders.almost > mkheadersT
mv -f mkheadersT mkheaders
make[3]: Leaving directory `/home/znf2008/build-i386-linux-gnu/fixincludes'
make[3]: Entering directory `/home/znf2008/libcpp'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/znf2008/libcpp'
make[3]: Entering directory `/home/znf2008/libdecnumber'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/znf2008/libdecnumber'
make[3]: Entering directory `/home/znf2008/gcc'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/znf2008/gcc'
make[2]: Leaving directory `/home/znf2008'
make[2]: Entering directory `/home/znf2008'
make[3]: Entering directory `/home/znf2008'
rm -f stage_current
make[3]: Leaving directory `/home/znf2008'
make[2]: Leaving directory `/home/znf2008'
make[2]: Entering directory `/home/znf2008'
Configuring stage 2 in ./intl
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure: former value: /home/znf2008/./prev-gcc/xgcc -B/home/znf2008/./prev-gcc/ -B/opt/gcc-4.2.1/i386-ubuntu-linux/bin/
configure: current value: /home/znf2008/./prev-gcc/xgcc -B/home/znf2008/./prev-gcc/ -B/opt/gcc-4.2.1/i386-linux-gnu/bin/
configure: error: `build_alias' has changed since the previous run:
configure: former value: i386-ubuntu-linux
configure: current value: i386-linux-gnu
configure: error: `host_alias' has changed since the previous run:
configure: former value: i386-ubuntu-linux
configure: current value: i386-linux-gnu
configure: error: `target_alias' has changed since the previous run:
configure: former value: i386-ubuntu-linux
configure: current value: i386-linux-gnu
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [configure-stage2-intl] 错误 1
make[2]: Leaving directory `/home/znf2008'
make[1]: *** [stage2-bubble] 错误 2
make[1]: Leaving directory `/home/znf2008'
make: *** [all] 错误 2


页首
 用户资料  
 
11 楼 
 文章标题 :
帖子发表于 : 2007-10-10 12:52 

注册: 2006-09-20 19:56
帖子: 768
送出感谢: 0 次
接收感谢: 1
1、装了build-essential之后,就已经有gcc了,不用自己编译;
2、贴出你的测试程序;
3、如果build-essential依赖的gcc版本不是你想要的,那么源里还有你试图编译的4.2.1版。


页首
 用户资料  
 
12 楼 
 文章标题 :
帖子发表于 : 2007-10-10 13:00 
头像

注册: 2005-12-28 1:16
帖子: 3916
地址: 火星
系统: Ubuntu 12.10 X64
送出感谢: 1
接收感谢: 0 次
gcc需要使用特定版本的gcc才能编译


_________________
目前负债150多万


页首
 用户资料  
 
13 楼 
 文章标题 :
帖子发表于 : 2007-10-10 13:00 

注册: 2006-09-20 19:56
帖子: 768
送出感谢: 0 次
接收感谢: 1
host参数也明显错误,host参数指定系统平台,估计你原意是i386。


页首
 用户资料  
 
14 楼 
 文章标题 :
帖子发表于 : 2007-10-10 13:11 

注册: 2006-09-20 19:56
帖子: 768
送出感谢: 0 次
接收感谢: 1
对了,7.10前段时间gcc升级了一次,解决了无法编译gcc4.2.x的一个bug,不知道7.04下的包有没有升级,我没有7.04。
去package.ubuntu上gutsy分支下载最新的gcc的deb包,configure时不用写host参数,再试试。
至于什么测试程序错误,100%是你自己程序的错。


页首
 用户资料  
 
15 楼 
 文章标题 :
帖子发表于 : 2007-10-10 13:28 

注册: 2007-10-10 11:24
帖子: 45
送出感谢: 0 次
接收感谢: 0 次
谢谢 14楼的高手 :lol:


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 16 篇帖子 ]  前往页数 1, 2  下一页

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 4 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译