LinuxSir.cn,穿越时空的Linuxsir!

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

emerge xorg-x11出错[已解决]

[复制链接]
发表于 2006-7-7 21:36:12 | 显示全部楼层 |阅读模式
当我使用emerge xorg-x11时,编译到freeglut-2.4.0时有这样的错误:
make  all-recursive
make[1]: Entering directory `/var/tmp/portage/freeglut-2.4.0/work/freeglut-2.4.0'
Making all in src
make[2]: Entering directory `/var/tmp/portage/freeglut-2.4.0/work/freeglut-2.4.0/src'
source='freeglut_callbacks.c' object='libglut_la-freeglut_callbacks.lo' libtool=yes \
depfile='.deps/libglut_la-freeglut_callbacks.Plo' tmpdepfile='.deps/libglut_la-freeglut_callbacks.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include    -O2 -mcpu=i686 -pipe -Wall -pedantic -Werror -c -o libglut_la-freeglut_callbacks.lo `test -f freeglut_callbacks.c || echo './'`freeglut_callbacks.cmkdir .libs
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -O2 -mcpu=i686 -pipe -Wall -pedantic -Werror -c freeglut_callbacks.c -MT libglut_la-freeglut_callbacks.lo -MD -MP -MF .deps/libglut_la-freeglut_callbacks.TPlo  -fPIC -DPIC
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
mv -f libglut_la-freeglut_callbacks.o .libs/libglut_la-freeglut_callbacks.lo
mv: cannot stat `libglut_la-freeglut_callbacks.o': No such file or directory
make[2]: *** [libglut_la-freeglut_callbacks.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/freeglut-2.4.0/work/freeglut-2.4.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/freeglut-2.4.0/work/freeglut-2.4.0'
make: *** [all] Error 2

!!! ERROR: media-libs/freeglut-2.4.0 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  ebuild.sh, line 609:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.



这是什么问题呢?
 楼主| 发表于 2006-7-10 16:18:47 | 显示全部楼层
解决的方法如下:
在make.conf中把CFLAGS设置为合适的值,默认情况下为
[HTML]CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
[/HTML]
我把它更改为:
[HTML]CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe "
CXXFLAGS="${CFLAGS}"
[/HTML]
更多的资料请参见:
1、gentoo bugs#134586
2、gentoo-wiki的文章:CLFAGS
3、gentoo-wiki的文章:safe-cflags
回复 支持 反对

使用道具 举报

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

本版积分规则

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