论坛首页 移动开发技术论坛

arm-apple-darwin-gcc下编译ruby失败

浏览 6247 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-12-12  
iOS
虽然毕业时写过1年的unix c,但是对gcc这些东西还是了解很少

环境,windows2003+cygwin+arm-apple-darwin-gcc+llvm
过程:

1.装了cygwin。按照这篇指导装了iphone的toolchain.
http://code.google.com/p/iphone-dev/wiki/Building
嗯,能编helloworld了。

2.从官网下了ruby 1.8.6的code。
按照这篇指导编译 ruby:
http://www.caboo.se/articles/2007/8/24/compiling-ruby-for-the-iphone

按照上面的过程修改了。
运行
autoconf
CC=arm-apple-darwin-cc CPP=llvm-cpp ./configure --host=arm-apple-darwin --disable-ipv6
结果是这样的:
checking build system type... i686-pc-cygwin
checking host system type... arm-apple-darwin
checking target system type... arm-apple-darwin
checking for arm-apple-darwin-gcc... arm-apple-darwin-cc
checking for arm-apple-darwin-gcc... (cached) arm-apple-darwin-cc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

直接运行./configure --host=arm-apple-darwin --disable-ipv6
结果ok

make时报错:
/opt/iphone/bin/arm-apple-darwin-ld: Undefined symbols:
___eprintf
collect2: ld returned 1 exit status
make[1]: *** [ruby] Error 1
make[1]: Leaving directory `/ruby_source'
make: *** [all] Error 2


难道非要装个mac osx?4.7G的怪物。
   发表时间:2007-12-13  
arm-apple-darwin-gcc+llvm
arm不是嵌入式的处理器吗?arm的gcc和普通的gcc是不一样的。
编译出来的东西也不一样。arm由自己的一套指令,这个arm的gcc只时候iphone这样的东东来用。
darwin的gcc编译器...

直接用自带的gcc就可以编译了
0 请登录后投票
   发表时间:2007-12-13  
嗯,就是编给iphone用的。
但是我现在没iphone。想用cygwin探索一下。
按理说应该能编译不能运行的。
个人理解。
0 请登录后投票
   发表时间:2007-12-13  
不一样吧,要不arm也不用出自己的编译器。而且,arm也没必要去兼容所有的东西。所以,arm不支持一些库是很正常的。
0 请登录后投票
   发表时间:2007-12-17  
1. this error message can't be ignored:
>> configure: error: C compiler cannot create executables 

please check the 'config.log' file.

2. "___eprintf" is part of libc, make sure you have “-lc” at the end of LD command line(if you use ld), or try to use GCC as linker instead of LD.


for me, it looks like your toolchain is not build properly .... have you tried on Linux ?

0 请登录后投票
论坛首页 移动开发技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics