编译出现internal compiler error。应该怎么解决啊?
当我在用gcc 4.0.4编译一个wimax 驱动时,出现了internal compiler error.但同样的代码,同样的编译过程,在另一个不同的环境(gcc 4.3.2, ubuntu 8.10)中编译却正常。
编译出错的环境消息如下:
root@not a tty[build]# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
root@not a tty[build]# uname -a
Linux xxx 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux
root@not a tty[build]#
错误消息如下:
root@1[wimax-i2400m-v1.4.1]# make KDIR=/work/trunk_work/core/build/kernel-linux-2.6.27.7
make -C /work/trunk_work/core/build/kernel-linux-2.6.27.7-HPCM00 M=/work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1
make[1]: Entering directory `/work/trunk_work/core/build/kernel-linux-2.6.27.7-HPCM00'
I: executing compile-time config scripts
I: enabling debugfs_create_size_t compatibility
I: enabling genl_unregister_mc_group() compatibility
I: compile-time version is v1.4.1-v1.4.1
I: Installed new build configuration file include/config.h
I: Installed new build configuration file include/linux/wimax/version.h
I: Installed new build configuration file .tmp.config.mk
LD /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/built-in.o
LD /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/built-in.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/sdio.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/sdio-tx.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/sdio-fw.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/sdio-rx.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/usb-compat.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/usb-fw.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/usb-notif.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/usb-tx.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/usb-rx.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/usb.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/control.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/driver.o
CC [M] /work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/fw.o
/work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/fw.c: In function ¡®i2400m_fw_dnload¡¯:
/work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/fw.c:1051: internal compiler error: in splice_child_die, at dwarf2out.c:5346
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
make[4]: *** [/work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m/fw.o] Error 1
make[3]: *** [/work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax/i2400m] Error 2
make[2]: *** [/work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1/drivers/net/wimax] Error 2
make[1]: *** [_module_/work/trunk_work/core/driver/2.6.27.7/wimax-i2400m-v1.4.1] Error 2
make[1]: Leaving directory `/work/trunk_work/core/build/kernel-linux-2.6.27.7'
make: *** [all] Error 2
root@1[wimax-i2400m-v1.4.1]#
我去看地fw.c代码,好像也没有看出什么不特别的地方。可就是出现了这个郁闷的错误。这种问题以前没有遇到过。想查出问题的根源也感觉无从下手。有没有人遇到过类似的问题啊?给点解决办法的思路吧。万分感谢了。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
已经告诉你了,gcc的bug,看看别人发现没有,再看看有没有解决方法。没有?提交你的bug。
详细情况,看那个链接
要不...你自己调试gcc?
要不你先把那里的代码贴出来看看
他编译wimax驱动的时候的问题,有的时候是会出问题,有可能是gcc的bug,不过,追踪bug,首先要熟悉gcc,还是直接去buglist上找找比较好,maillist上也可以看看,没有就问。
我想的是,改写代码,让它编译过去。
干一件事情不可本末倒置,先想想看可以不可以解决眼前的问题。
等到有时间有精力了再来解决别的问题。
[ 本帖最后由 cjaizss 于 2009-2-8 00:18 编辑 ]