输入下面命令
../gcc-3.4.3/configure --prefix=/tools
--libexecdir=/tools/lib--with-local-prefix=/tools --disable-nls--enab
le-shared --enable-languages=c
输出
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectorie
s:
target-libstdc++-v3 target-libf2c target-libffi target-boehm-gc t
arget-zlib target-libjava zlib fastjar target-libobjc
(Any other directories should still work fine.)
/tools/bin/ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not f
ound (try using -rpath or -rpath-link)
/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRI VATE'
/lib/libc.so.6: undefined reference to `__libc_stack_end@GLIBC_2.1'
/lib/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVAT E'
/lib/libc.so.6: undefined reference to `___tls_get_addr@GLIBC_2.3'
/lib/libc.so.6: undefined reference to `_r_debug@GLIBC_2.0'
/lib/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
我该怎么做
Post by d00m3d
楼上发问前,请说明:
1. 你的 host 系统
2. 你在做哪一版的 LFS
3. 用哪一版的 LFS 手册,做到哪一节 Post by 终极幻想
[QUOTE]输入下面命令
../gcc-3.4.3/configure --prefix=/tools[color="Red"]
--libexecdir=/tools/lib--with-local-prefix=/tools--disable-nls--enab
le-shared --enable-languages=c
是抄错了,还是你命令打错了?[/QUOTE]
Post by 味精
HOST:more /proc/version
Linux version 2.6.15.3 (KanKer@MagicLinux) (gcc version 3.4.4 20050721
(Red Hat 3.4.4-1mgc)) #1 Fri Feb 10 01:51:55 CST 2006
是MAGICLINUX2.0
GCC:gcc -v
Reading specs from /usr/lib/gcc/i686-magic-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i686-magic-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-1mgc) Post by 味精
是抄的命令;
是6.1.tar,手册是金步国的2006.6.1的最终正式版
也看了几位大侠的贴 Post by 味精
昨晚编译了两个包,binutils和gcc,可是gcc安装不了,是一个文件夹无权创建,结果没装关机睡觉了,今天想继续,出问题了,
You must set the environment variable CC to a working compiler
这个variable CC怎么设
以前做过两次5.1的,都是在chroot时过不去,没人指点就没做了,希望这次在几位大侠的帮助下能成功 Post by 味精
是抄的命令;
是6.1.tar,手册是金步国的2006.6.1的最终正式版 Post by 味精
export
declare -x HOME="/home/lfs"
declare -x LC_ALL=" OSIX"
declare -x LFS="/mnt/lfs"
declare -x OLDPWD
declare -x PATH="/tools/bin:/bin:/usr/bin"
declare -x PS1="\\u:\\w\\\$"
declare -x PWD="/home/lfs"
declare -x SHLVL="1"
declare -x TERM="xterm" [quote]Post by 味精
î改了à次总有à个乱码,不å道是我显示的îØ是??? “是抄的命䔓Ñ步ý(csfrank)的手册2006.6.1” 看不到你写什麽,乱码问题请參考这里解决
http://www.linuxsir.cn/bbs/showthread.php?t=259968[/QUOTE]
Post by d00m3d
还未看懂幻想老大给你的提示吗?
那句 configure 是要一次性输入的,或者按手册加上 " \"来分行
还有些空格漏打了! Post by 味精
想偷懒,从GCC开始,不行,只好又从Binutils从新开始,反正也才编译了一个包,结果连Binutils都不能编译了,出错“checking whether the C compiler (gcc ) works... no”,一狠心从头开始,连lfs用户都删除了从新加,可以make Binutils了可以又不能安装了还是“Permission denied”和昨晚Gcc一样的错
命令:make
OK
接着:make install
/bin/sh ../binutils-2.15.94.0.2.2/mkinstalldirs /tools--disable-nls /tools--disable-nls
mkdir -p -- /tools--disable-nls /tools--disable-nls
mkdir: cannot create directory `/tools--disable-nls': Permission denied
mkdir: cannot create directory `/tools--disable-nls': Permission denied Post by 味精
原来上面的“/tools--disable-nls”少了个空格;应是 “/tools --disable-nls”没把参数路径分开 Post by 味精
在用youbest的速成手册安装,有点疑问。
cp -Rv include/asm-i386 /tools/include/asm
cp -Rv include/linux /tools/include
为什么不改成
mv -Rv include/asm-i386 /tools/include/asm
mv -Rv include/linux /tools/include |