arm-uclibc-gcc.exe: *** heap allocated but not at 0x690000错误的解决

上班啦^_^,遇到第一个问题。

背景是公司用的代码是一套很早的外国人写的,公司的牛人鼓捣很久下编译出来了,用的是arm-uclibc-gcc工具链(这里这么说对不对我也不清楚,我对GCC一窍不通)。IDE是keil3,操作系统是winXP。牛人说这个用别的IDE和系统编译不了。

我接手的时候用着很不爽,不管是操作系统还是IDE。后来牛人在虚拟机上测试说不用xp也能正常编译,于是我就把xp卸了装了win7,结果牛人说,他看错了,win7不能编译(哭)。

没办法,已经卸了,鼓捣着看吧,重新装了win7和keil5,重装工具链(工具链装完一定要重启下),然后测试,果然会出现很多错误,主要有.S文件编译.O文件错误,还有什么对地址分配错误(就是文章标题的错误)。

.S文件编译时提示的错误:

/cygdrive/c/Cygnus/arm-tools/bin/arm-uclibc-as: unrecognized option `--gdwarf-2'

地址分配的错误:

C:\Cygnus\arm-tools\bin\arm-uclibc-gcc.exe: *** heap allocated but not at 0x620000
      1 [main] arm-uclibc-gcc 4172 sync_with_child: child 4020(0x11C) died before initialization with status code 0x1
   1240 [main] arm-uclibc-gcc 4172 sync_with_child: *** child state waiting for longjmp

一个一个解决吧,.S文件编译的问题只查到一个帖子,老外的,说什么debug information会影响,很快找到keil的Options for Target下得output菜单栏里有这个选项,去掉后奇迹的发现可以了,老外还是很靠谱的。哈哈。

第二个问题找了很多没发现有人说,而且也不好描述这个问题,后来想xp下能用win7下不能用,会不会是编译器兼容性问题,于是根据错误信息,找到编译器exe文件,选择兼容性,改为兼容xp(改兼容性玩游戏的应该都知道,不多说),再次使了下,好了(内牛满面)。

算是新工作后解决的第一个问题吧,而且网上没有说什么解决的,虽然解决方法很简单(很弱智好么),但还是打个标记,自己记下吧。


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Using built-in specs. COLLECT_GCC=./arm-cortexa9_neon-linux-uclibcgnueabihf-gcc COLLECT_LTO_WRAPPER=/opt/toolchains/arm-cortexa9_neon-linux-uclibcgnueabihf-gcc-7.4.0/bin/../libexec/gcc/arm-cortexa9_neon-linux-uclibcgnueabihf/7.4.0/lto-wrapper Target: arm-cortexa9_neon-linux-uclibcgnueabihf Configured with: /home/abu/arm/u-boot-2019.04/.build/arm-cortexa9_neon-linux-uclibcgnueabihf/src/gcc/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-cortexa9_neon-linux-uclibcgnueabihf --prefix=/home/abu/x-tools/arm-cortexa9_neon-linux-uclibcgnueabihf --with-sysroot=/home/abu/x-tools/arm-cortexa9_neon-linux-uclibcgnueabihf/arm-cortexa9_neon-linux-uclibcgnueabihf/sysroot --enable-languages=c,c++,fortran --with-cpu=cortex-a9 --with-fpu=neon --with-float=hard --with-pkgversion='crosstool-NG 1.24.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --disable-libmpx --with-gmp=/home/abu/arm/u-boot-2019.04/.build/arm-cortexa9_neon-linux-uclibcgnueabihf/buildtools --with-mpfr=/home/abu/arm/u-boot-2019.04/.build/arm-cortexa9_neon-linux-uclibcgnueabihf/buildtools --with-mpc=/home/abu/arm/u-boot-2019.04/.build/arm-cortexa9_neon-linux-uclibcgnueabihf/buildtools --with-isl=/home/abu/arm/u-boot-2019.04/.build/arm-cortexa9_neon-linux-uclibcgnueabihf/buildtools --disable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++ -lm' --enable-threads=posix --enable-target-optspace --disable-plugin --with-libintl-prefix=/home/abu/arm/u-boot-2019.04/.build/arm-cortexa9_neon-linux-uclibcgnueabihf/buildtools --disable-multilib --with-local-prefix=/home/abu/x-tools/arm-cortexa9_neon-linux-uclibcgnueabihf/arm-cortexa9_neon-linux-uclibcgnueabihf/sysroot --enable-long-long Thread model: posix gcc version 7.4.0 (crosstool-NG 1.24.0)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值