LinuxSir.cn,穿越时空的Linuxsir!

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

重新编译GCC出现错误

[复制链接]
发表于 2008-5-13 22:04:44 | 显示全部楼层 |阅读模式
在一台小机器上装gentoo ,CPU是VIA C3 的,用机器自己编译,龟速实在无法忍受,i686的光盘都不能引导,只能用install-x86-minimal-2008.0_beta2,然后用stage3+portage装,因为stage3-x86里面默认的gcc是i486的,看了下wiki,这个U可以用i586,所以想把gcc重新编译一下,但总是遇到这个错误:

          -o insn-attrtab.o
{standard input}: Assembler messages:
{standard input}:36407: Warning: end of file not at end of a line; newline inserted
xgcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[2]: *** [insn-attrtab.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/gcc'
make: *** [profiledbootstrap] Error 2
*
* ERROR: sys-devel/gcc-4.1.2 failed.
* Call stack:
*               ebuild.sh, line   49:  Called src_compile
*             environment, line 4530:  Called toolchain_src_compile
*             environment, line 5001:  Called gcc_src_compile
*             environment, line 2883:  Called gcc_do_make
*             environment, line 2713:  Called die
* The specific snippet of code:
*       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
*  The die message:
*   emake failed with profiledbootstrap
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.1.2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.1.2/temp/environment'.
*

* Messages for package sys-devel/gcc-4.1.2:

* This profile has not been tested thoroughly and is not considered to be
* a supported server profile at this time.  For a supported server
* profile, please check the Hardened project (http://hardened.gentoo.org).
* This profile is merely a convenience for people who require a more
* minimal profile, yet are unable to use hardened due to restrictions in
* the software being used on the server. This profile should also be used
* if you require GCC 4.1 or Glibc 2.4 support. If you don't know if this
* applies to you, then it doesn't and you should probably be using
* Hardened, instead.
*
* ERROR: sys-devel/gcc-4.1.2 failed.
* Call stack:
*               ebuild.sh, line   49:  Called src_compile
*             environment, line 4530:  Called toolchain_src_compile
*             environment, line 5001:  Called gcc_src_compile
*             environment, line 2883:  Called gcc_do_make
*             environment, line 2713:  Called die
* The specific snippet of code:
*       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
*  The die message:
*   emake failed with profiledbootstrap
*

再贴一下我的make.conf:
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=c3 -m3dnow -mmmx -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j4"


LDFLAGS="-Wl,-O1 -Wl,--as-needed"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="sis   vesa"
#ALSA_CARDS=""
LINGUAS="zh_CN zh en_US"

FEATURES="sandbox ccache parallel-fetch  "
CCACHE_SIZE="2G"
CCACHE_DIR="/var/tmp/ccache/"
#DISTCC_DIR="${PORTAGE_TMPDIR}/portage/.distcc"
DISTCC_DIR="/var/tmp/portage/.distcc"

USE="-X acpi -alsa -arts avi apache2  bzip2  cjk -cups cvs dbus  esd ffmpeg flash ftp gif hal  immqt-bc jpeg  lirc mad midi mmx  mp3 mpeg mplayer msn mysql nls nptl nptlonly ogg opengl oss png posix pcre  -qt quicktime readline real samba spell  session  svg svga truetype truetype-fonts udev unicode usb userlocales utf8 vcd win32codecs xine xv -doc -gtk -gtk2 -gnome -ipv6  -kde
-gnome  vhosts zh_CN
ssl
php libwww xml"

ACCEPT_KEYWORDS="x86"

FETCHCOMMAND="/usr/bin/wget -t inf  -T 60 --passive-ftp \${URI} -P \${DISTDIR}"
RESUMECOMMAND="/usr/bin/wget  -c -t inf  -T 60 --passive-ftp \${URI} -P \${DISTDIR}"

SYNC="rsync://mirror.averse.net/gentoo-portage"
  GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo http://linux.ntcu.net/ftp/dists/gentoo \
  http://ftp.ncnu.edu.tw/Linux/Gentoo http://mirror.gentoo.gr.jp"


实在是很无奈了,我现在是在虚拟机里面直接用整个IDE硬盘,装好系统后再把硬盘装回去,没办法,出此下策,用其他方法我还没那实力,
发表于 2008-5-13 22:17:18 | 显示全部楼层
将根文件系统直接通过nfs export出来,用另一台比较强的机器mount后直接chroot编译。chroot中编译的时候CFLAGS保守一点(如-Os -pipe)

你现在系统中的gcc已经是i686的了,因此仍然会出问题的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-13 22:59:00 | 显示全部楼层
stage3我用的是x86的,gcc为i486的,我是在xp下装的vmware,然后用usb装ide的数据线接ide硬盘,接着新建虚拟机,用整个硬盘,我试过,直接在小机器上chroot安装系统的时候,升级重新gcc,也是遇到这个问题,我前段时间在这个机器上重新编译GCC,没问题啊,后来因为机器引导有问题,启动的时候就停在grub loading,一直不出现菜单,但是用usb线接在其他机器上,引导没点问题,这段时间比较烦,直接给它重装得了
回复 支持 反对

使用道具 举报

发表于 2008-5-13 23:13:57 | 显示全部楼层
sorry,那就有点不解了,vmware下就不用试着去编了,没准比c3更慢
gcc为i486的没有什么关系啊,影响的应该只是gcc的速度吧,这个需要更了解gcc的人解释一下,不过i486-gcc一样可以生成为c3优化的代码。
另外cflags其实可以保守一点的,不想出问题最好-Os -pipe好了,上面的问题也有可能是有cflags导致的。

我有类似的via的板子,c3(longhaul or samuel?),其中一种是i586,另外一种支持i686(貌似是c3-2),不过我都在另外一台机器上编译(4核4G内存),采用的也是gentoo-uclibc最后做成tiny gentoo(这样的板子用个64M CF卡就足够了)

还是没怎么回答你的问题,权当交流一下吧;)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-14 06:29:30 | 显示全部楼层
very thanks,我的U是samuel 2的,精英的主板,这个U直接焊接在主板上了,我拿来做动物机,功耗小
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-15 13:49:39 | 显示全部楼层
最后用了~x86的gcc,编译了一个晚上,早上起来一看,编译完了,没错误
回复 支持 反对

使用道具 举报

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

本版积分规则

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