免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: 黑色幽默jun
打印 上一主题 下一主题

[系统安装] 关于制作crosscompiler [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-10-17 22:00 |显示全部楼层 |倒序浏览
小弟最近在学习安装soclib,其中需要安装crosscompiler。有两个问题想请教。
1.小弟按照soclib官网上的教程安装http://www.soclib.fr/trac/dev/wiki/CrossCompiler,可是在安装GCC时出现了如下错误,cannot compute suffix of object files。我在网上找了很久也没有解决这个问题,想请问一下应该如何解决。
2.后来我就在网上找别的安装教程想制作一个linux的头文件,再执行完make menuconfig后在include/linux里面没有找到autoconf.h文件,怎么也没有。请教各位大神指导一下是为什么。

论坛徽章:
0
2 [报告]
发表于 2012-10-20 15:24 |显示全部楼层
回复 4# dooros


    非常感谢,我按照你给的教程安装了,所有错误都解决了,但是我运行soclib里面自带的例子的时候还是出现了错误,我也不知道是因为安装的内核不符合程序的要求还是环境变量没有设置好。请问你这个是arm核的吗?mips核和arm核的区别就是在安装的时候配置configure文件的设置不同吗?非常感谢你的帮助~

论坛徽章:
0
3 [报告]
发表于 2012-10-20 16:23 |显示全部楼层
回复 4# dooros


    有没有什么可以测试的程序可以给我测试一下呢?需要用到arm核的。

论坛徽章:
0
4 [报告]
发表于 2012-10-20 18:24 |显示全部楼层
回复 8# dooros


    那是不是说如果我要制作mips核的只要把这里的arm改成mips就行了呢?
   $ cp arch/arm/configs/s3c2410_defconfig ./.config
    $ make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
    $ make ARCH=arm CROSS_COMPILE=arm-linux-
    其他需要的软件的安装包都不要变得吗?

论坛徽章:
0
5 [报告]
发表于 2012-10-21 12:10 |显示全部楼层
回复 11# dooros


    额,小弟是新手,请问CFLS是什么?能否给个链接~感激不尽~

论坛徽章:
0
6 [报告]
发表于 2012-10-23 09:26 |显示全部楼层
回复 14# dooros


    谢谢啦,正在研究中,如果遇到问题再向你请教~~

论坛徽章:
0
7 [报告]
发表于 2012-10-23 16:58 |显示全部楼层
回复 16# dooros


    你好,我按照这个网址的教程安装mips核crosscompiler http://cross-lfs.org/view/CLFS-1.2.0/mips/index.html,之前都是没有问题的,在安装到eglibc,即这一步时http://cross-lfs.org/view/CLFS-1.2.0/mips/cross-tools/eglibc.html出现了问题。
   我在执行以下命令的时候
       BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
    AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
    ../eglibc-2.13/configure --prefix=/tools \
    --host=${CLFS_TARGET} --build=${CLFS_HOST} \
    --disable-profile --enable-add-ons \
    --with-tls --enable-kernel=2.6.0 --with-__thread \
    --with-binutils=/cross-tools/bin --with-headers=/tools/include \
    --cache-file=config.cache
  系统出现以下错误:
configure: loading cache config.cache
checking build system type... i686-cross-linux-gnu
checking host system type... mips-unknown-linux-gnu
checking for mips-unknown-linux-gnu-gcc... mips-unknown-linux-gnu-gcc
checking for suffix of object files... configure: error: in `/home/klj/cross-tools/eglibc-build':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.


这是我的config.log
configure:1884: loading cache config.cache
configure:2034: checking build system type
configure:2052: result: i686-cross-linux-gnu
configure:2074: checking host system type
configure:2089: result: mips-unknown-linux-gnu
configure:2120: checking for mips-unknown-linux-gnu-gcc
configure:2147: result: mips-unknown-linux-gnu-gcc
configure:2419: checking for C compiler version
configure:2427: mips-unknown-linux-gnu-gcc --version >&5
../eglibc-2.13/configure: line 2429: mips-unknown-linux-gnu-gcc: command not found
configure:2431: $? = 127
configure:2438: mips-unknown-linux-gnu-gcc -v >&5
../eglibc-2.13/configure: line 2440: mips-unknown-linux-gnu-gcc: command not found
configure:2442: $? = 127
configure:2449: mips-unknown-linux-gnu-gcc -V >&5
../eglibc-2.13/configure: line 2451: mips-unknown-linux-gnu-gcc: command not found
configure:2453: $? = 127
configure:2457: checking for suffix of object files
configure:2483: mips-unknown-linux-gnu-gcc -c   conftest.c >&5
../eglibc-2.13/configure: line 2485: mips-unknown-linux-gnu-gcc: command not found
configure:2487: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2501: error: in `/home/klj/cross-tools/eglibc-build':
configure:2504: error: cannot compute suffix of object files: cannot compile
See `config.log' for more detail

这个问题之前我也遇到过,网上查找了很多方法都没有解决,不知道你有没有遇到过,可不可以给我一些帮助。

论坛徽章:
0
8 [报告]
发表于 2012-10-23 18:03 |显示全部楼层
回复 18# dooros


    就是做到了这一步的时候http://cross-lfs.org/view/CLFS-1.2.0/mips/cross-tools/eglibc.html
在执行配置文件,运行下面这个命令的时候:
BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
    AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
    ../eglibc-2.13/configure --prefix=/tools \
    --host=${CLFS_TARGET} --build=${CLFS_HOST} \
    --disable-profile --enable-add-ons \
    --with-tls --enable-kernel=2.6.0 --with-__thread \
    --with-binutils=/cross-tools/bin --with-headers=/tools/include \
    --cache-file=config.cache

论坛徽章:
0
9 [报告]
发表于 2012-10-23 18:58 |显示全部楼层
回复 18# dooros


    你好,麻烦你了,这个问题我通过查找网上的一些资料解决了,设置了一下环境变量PATH就可以了~

论坛徽章:
0
10 [报告]
发表于 2012-10-30 12:41 |显示全部楼层
回复 18# dooros


    你好,我又有新的问题来请教你了。
    还是在安装eglibc的时候,我在make install的时候出现了以下错误:
make[4]: Entering directory `/home/klj/cross-tools/eglibc-2.13/string'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/home/klj/cross-tools/eglibc-2.13/string'
make subdir=time -C ../time ..=../ objdir=/home/klj/cross-tools/eglibc-build -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-setitimer.os'
make[4]: Entering directory `/home/klj/cross-tools/eglibc-2.13/time'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/home/klj/cross-tools/eglibc-2.13/time'
make[3]: Leaving directory `/home/klj/cross-tools/eglibc-2.13/elf'
make[2]: Leaving directory `/home/klj/cross-tools/eglibc-2.13/elf'
/usr/bin/install -c -m 644 /home/klj/cross-tools/eglibc-build/libc.a /tools/lib/libc.a
/usr/bin/install: cannot remove `/tools/lib/libc.a': Permission denied
make[1]: *** [/tools/lib/libc.a] Error 1
make[1]: Leaving directory `/home/klj/cross-tools/eglibc-2.13'
make: *** [install] 错误 2

   如果我切换到root账户来执行这个命令就会出现另一个错误:
mv: `/tools/libexec/getconf/.new' and `/tools/libexec/getconf/.new' are the same file
mv: `/tools/libexec/getconf/.new' and `/tools/libexec/getconf/.new' are the same file
mv: `/tools/libexec/getconf/.new' and `/tools/libexec/getconf/.new' are the same file
make[2]: *** [/tools/libexec/getconf] Error 1
make[2]: Leaving directory `/home/klj/cross-tools/eglibc-2.13/posix'
make[1]: *** [posix/subdir_install] Error 2
make[1]: Leaving directory `/home/klj/cross-tools/eglibc-2.13'
make: *** [install] 错误 2
我在网上找了很久也没找到解决方法,所以来请教一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP