LinuxSir.cn,穿越时空的Linuxsir!

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

第一下就遇到问题: C compiler cannot create executables

[复制链接]
发表于 2005-6-2 09:43:34 | 显示全部楼层 |阅读模式
configure: error: installation or configuration problem: C compiler cannot create executables.

Install bison and flex in chapter 5 then resolve this error .

--------
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -static -o objdump objdump.o budemang.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a ../libiberty/libiberty.a -ldl
bucomm.o(.text+0x8c5): In function `make_tempname':
/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/bucomm.c:425: warning: the use of `mktemp' is dangerous, better use `mkstemp'
/bin/sh /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../ylwrap "/mnt/lfs/tools/binutils-2.15.91.0.2/missing bison -y" /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/arparse.y y.tab.c arparse.c y.tab.h arparse.h -- -d
WARNING: `bison' is missing on your system. You should only need it if
you modified a `.y' file. You may need the `Bison' package
in order for those modifications to take effect. You can get
`Bison' from any GNU archive site.
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c arparse.carparse.c:1: warning: return type defaults to `int'
arparse.c:1: warning: function declaration isn't a prototype
/bin/sh /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../ylwrap "/mnt/lfs/tools/binutils-2.15.91.0.2/missing flex" /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/arlex.l lex.yy.c arlex.c --
WARNING: `flex' is missing on your system. You should only need it if
you modified a `.l' file. You may need the `Flex' package
in order for those modifications to take effect. You can get
`Flex' from any GNU archive site.
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c arlex.c
arlex.c:1: warning: return type defaults to `int'
arlex.c:1: warning: function declaration isn't a prototype
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/ar.c
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/not-ranlib.c
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/arsup.c
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/rename.c
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/binemul.c
gcc -DHAVE_CONFIG_H -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I. -D_GNU_SOURCE -I. -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils -I../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../bfd -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../include -I/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/../intl -I../intl -DLOCALEDIR="\"/tools/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /mnt/lfs/tools/binutils-2.15.91.0.2/binutils/emul_vanilla.c
/bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -all-static -o ar arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a -ldl
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -static -o ar arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a -ldl
arlex.o(.text+0x0): In function `main':
/mnt/lfs/sources/binutils-build/binutils/arlex.c:1: multiple definition of `main'
arparse.o(.text+0x0):/mnt/lfs/sources/binutils-build/binutils/arparse.c:1: first defined here
ar.o(.text+0xc30): In function `main':
/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/ar.c:342: multiple definition of `main'
arparse.o(.text+0x0):/mnt/lfs/sources/binutils-build/binutils/arparse.c:1: first defined here
/usr/bin/ld: Warning: size of symbol `main' changed from 16 in arparse.o to 3345 in ar.o
bucomm.o(.text+0x8c5): In function `make_tempname':
/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/bucomm.c:425: warning: the use of `mktemp' is dangerous, better use `mkstemp'
ar.o(.text+0x23): In function `mri_emul':
/mnt/lfs/tools/binutils-2.15.91.0.2/binutils/ar.c:148: undefined reference to `yyparse'
collect2: ld returned 1 exit status
make[3]: *** [ar] Error 1
make[3]: Leaving directory `/mnt/lfs/sources/binutils-build/binutils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/binutils-build/binutils'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build/binutils'
make: *** [all-binutils] Error 2
-------------


第一步以lfs用户身份编译就被 ../binutils-2.15.91.0.2/configure --prefix=/tools     --disable-nls  卡住了。郁闷
 楼主| 发表于 2005-6-2 13:16:45 | 显示全部楼层
profile must be en_US UTF-8 ??????
回复 支持 反对

使用道具 举报

发表于 2005-6-2 19:57:12 | 显示全部楼层
错误信息 贴全一点,包括config.log。
回复 支持 反对

使用道具 举报

发表于 2005-10-17 10:20:39 | 显示全部楼层
apt-get install libc6-dev
回复 支持 反对

使用道具 举报

发表于 2005-10-17 11:19:08 | 显示全部楼层

楼主,你是在virtual PC下做的吧!

我在virtual PC下做,错误和你的一样,第一步就卡住了。正准备刻盘,在真实机子上试试。
回复 支持 反对

使用道具 举报

发表于 2005-10-17 11:23:25 | 显示全部楼层
都说了解决方案了。

安装 bison和 flex
回复 支持 反对

使用道具 举报

发表于 2005-10-18 17:06:26 | 显示全部楼层
天!我将lfsLiveCD-X86-6.1.3刻好光盘,在实际硬盘分区上一次性就装好了!
现在已经可以重启进入lfs系统了!
在微软的virtual PC上却怎么也开始不了,一上来就出错,
就象楼主的一样C compiler cannot create executables
难道微软的virtual PC就是这样不支持linux ?
回复 支持 反对

使用道具 举报

发表于 2005-10-18 17:07:10 | 显示全部楼层
用了我两天时间啊!
回复 支持 反对

使用道具 举报

发表于 2005-10-19 13:23:14 | 显示全部楼层
要用 VMware,VPC 太老了。
回复 支持 反对

使用道具 举报

发表于 2005-10-23 15:33:27 | 显示全部楼层
可VMware太大啊!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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