LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 890|回复: 9

gcc 第2次编译出问题了?急.......

[复制链接]
发表于 2004-12-2 09:30:36 | 显示全部楼层 |阅读模式
lfs:/mnt/lfs/sources/gcc-3.3.3/gcc$ mkdir ../gcc-build
lfs:/mnt/lfs/sources/gcc-3.3.3/gcc$ cd ../gcc-build
lfs:/mnt/lfs/sources/gcc-3.3.3/gcc-build$ ../gcc-3.3.2/configure --prefix=/tools \
> --with-local-prefix=/tools \
> --enable-clocale=gnu --enable-shared \
> --enable-threads=posix --enable-__cxa_atexit \
> --enable-languages=c,c++
bash: ../gcc-3.3.2/configure: No such file or directory
两个补丁在这操作前已经打过,正确吗?
出什么错误?
第一次编译的目录可以删除吗?
发表于 2004-12-2 09:48:50 | 显示全部楼层
你到底在编译gcc-3.3.3还是gcc-3.3.2??
 楼主| 发表于 2004-12-2 10:23:30 | 显示全部楼层
不好意西输入命令错了
gcc 第2次编译的目录是/mnt/lfs/sources/gcc-3.3.3/gcc-build还是/mnt/lfs/sources/gcc-build
发表于 2004-12-2 13:13:57 | 显示全部楼层
我的理解是 不存在/mnt/lfs/sources/gcc-3.3.3/gcc-build
不知道正确不?
 楼主| 发表于 2004-12-2 18:21:52 | 显示全部楼层
lfs:~$ cd /mnt/lfs/sources/gcc-3.3.3
lfs:/mnt/lfs/sources/gcc-3.3.3$ whereis CC
CC: /usr/bin/CC
lfs:/mnt/lfs/sources/gcc-3.3.3$ patch -Np1 -i ../gcc-3.3.3-no_fixincludes-1.patch
patching file gcc/Makefile.in
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file gcc/Makefile.in.rej
lfs:/mnt/lfs/sources/gcc-3.3.3$ patch -Np1 -i ../gcc-3.3.3-specs-1.patch
patching file gcc/config/alpha/linux-elf.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/alpha/linux-elf.h.rej
patching file gcc/config/arm/linux-elf.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/arm/linux-elf.h.rejpatching file gcc/config/i386/linux64.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/i386/linux64.h.rej
patching file gcc/config/i386/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/i386/linux.h.rej
patching file gcc/config/ia64/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/ia64/linux.h.rej
patching file gcc/config/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/linux.h.rej
patching file gcc/config/m68k/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/m68k/linux.h.rej
patching file gcc/config/mips/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/mips/linux.h.rej
patching file gcc/config/pa/pa-linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/pa/pa-linux.h.rej
patching file gcc/config/rs6000/linux64.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/rs6000/linux64.h.rej
patching file gcc/config/rs6000/sysv4.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/rs6000/sysv4.h.rej
patching file gcc/config/s390/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file gcc/config/s390/linux.h.rej
patching file gcc/config/sh/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/sh/linux.h.rej
patching file gcc/config/sparc/linux64.h
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file gcc/config/sparc/linux64.h.rej
patching file gcc/config/sparc/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/sparc/linux.h.rej
patching file gcc/config/xtensa/linux.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file gcc/config/xtensa/linux.h.rej
lfs:/mnt/lfs/sources/gcc-3.3.3$ cd /mnt/lfs/sources/gcc-build
lfs:/mnt/lfs/sources/gcc-build$ ../gcc-3.3.3/configure --prefix=/tools \
> --with-local-prefix=/tools \
>  --enable-clocale=gnu --enable-shared \
> --enable-threads=posix --enable-__cxa_atexit \
>  --enable-languages=c,c++
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /mnt/lfs/sources/gcc-build using "mt-frag"
/tools/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol_skip@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_start_profile@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_check_map_versions@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_get_origin@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_dst_substitute@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_init@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_dst_count@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_signal_error@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_debug_printf@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_map_object_deps@GLIBC_PRIVATE'/tools/lib/libc.so.6: undefined reference to `_dl_unload_cache@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_relocate_object@GLIBC_PRIVATE'/tools/lib/libc.so.6: undefined reference to `_dl_catch_error@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_lookup_symbol_skip@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_lookup_symbol@GLIBC_PRIVATE'
/tools/lib/libc.so.6: undefined reference to `_dl_map_object@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.
发表于 2004-12-2 20:47:04 | 显示全部楼层
lfs:/mnt/lfs/sources/gcc-3.3.3$ whereis CC
CC: /usr/bin/CC
我认为这地方有问题.
是不是应该是/mnt/lfs/tools/bin/CC ?
 楼主| 发表于 2004-12-2 22:02:47 | 显示全部楼层
不清楚.我刚学LINUX不到两个月,好想学LFS,可是这区回贴的太少.
发表于 2004-12-3 07:25:19 | 显示全部楼层
CC怎么能大写?:)。。


还有:
lfs:/mnt/lfs/sources/gcc-3.3.3/gcc$ mkdir ../gcc-build
lfs:/mnt/lfs/sources/gcc-3.3.3/gcc$ cd ../gcc-build
lfs:/mnt/lfs/sources/gcc-3.3.3/gcc-build$ ../gcc-3.3.2/configure --prefix=/tools \
> --with-local-prefix=/tools \
> --enable-clocale=gnu --enable-shared \
> --enable-threads=posix --enable-__cxa_atexit \
> --enable-languages=c,c++
你这里的路径好像错了,仔细看book,gcc-build和gcc-x.x.x应该是同级目录。呵呵。
发表于 2004-12-3 15:42:54 | 显示全部楼层
lfs:/mnt/lfs/sources/gcc-3.3.3$ cd /mnt/lfs/sources/gcc-build
lfs:/mnt/lfs/sources/gcc-build$ ../gcc-3.3.3/configure --prefix=/tools \
> --with-local-prefix=/tools \
> --enable-clocale=gnu --enable-shared \
> --enable-threads=posix --enable-__cxa_atexit \
> --enable-languages=c,c++
版主你看错了,我这是按文档输入命令的啊?
以下是错误:*** The command 'gcc -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler
发表于 2004-12-4 00:07:04 | 显示全部楼层
你之前装得的glibc有问题。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表