我正在尝试安装'flex'。我没有安装以前版本的flex。我正在运行一个简化版的linux,所以我没有apt-get或yum。要安装我解压缩flex包(flex-2.5.33.tar.gz)并运行./configure(可以工作)。然而,然后我跑了make,它失败了。我已经附加了./configure的输出,如果这有帮助的话。我该怎么办?提前谢谢。
-Nick
CONFIGURE
meshLium-AX:/mnt/sda/flex-2.5.33# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether NLS is requested... yes checking for msgfmt... no checking for gmsgfmt... : checking for xgettext... no checking for msgmerge... no checking for style of include used by make... GNU checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking dependency style of gcc... gcc3 checking build system type... i586-pc-linux-gnu checking host system type... i586-pc-linux-gnu checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking whether NLS is requested... yes checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking for bison... no checking for byacc... no checking for flex... no checking for lex... no checking for yywrap in -lfl... no checking for yywrap in -ll... no checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ANSI C... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking dependency style of g++... none checking whether ln -s works... no, using cp -p checking for ranlib... ranlib checking for bison... bison checking for help2man... help2man checking for gm4... no checking for gnum4... no checking for m4... /usr/local/bin/m4 checking for GNU m4... yes checking for indent... indent configure: WARNING: no indent program found: make indent target will not function checking for log in -lm... yes checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for unistd.h... (cached) yes checking stdbool.h usability... yes checking stdbool.h presence... yes checking for stdbool.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking sys/params.h usability... no checking sys/params.h presence... no checking for sys/params.h... no checking cunistd usability... no checking cunistd presence... no checking for cunistd... no checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking regex.h usability... yes checking regex.h presence... yes checking for regex.h... yes checking for size_t... yes checking whether __func__ is declared... yes configure: creating ./config.status config.status: creating flex.spec config.status: creating Makefile config.status: creating doc/Makefile config.status: creating examples/Makefile config.status: creating examples/fastwc/Makefile config.status: creating examples/manual/Makefile config.status: creating m4/Makefile config.status: creating po/Makefile.in config.status: creating tools/Makefile config.status: creating tests/Makefile config.status: creating tests/TEMPLATE/Makefile config.status: creating tests/test-array-nr/Makefile config.status: creating tests/test-array-r/Makefile config.status: creating tests/test-basic-nr/Makefile config.status: creating tests/test-basic-r/Makefile config.status: creating tests/test-bison-yylloc/Makefile config.status: creating tests/test-bison-yylval/Makefile config.status: creating tests/test-c-cpp-nr/Makefile config.status: creating tests/test-c-cpp-r/Makefile config.status: creating tests/test-header-nr/Makefile config.status: creating tests/test-header-r/Makefile config.status: creating tests/test-include-by-buffer/Makefile config.status: creating tests/test-include-by-push/Makefile config.status: creating tests/test-include-by-reentrant/Makefile config.status: creating tests/test-multiple-scanners-nr/Makefile config.status: creating tests/test-multiple-scanners-r/Makefile config.status: creating tests/test-noansi-nr/Makefile config.status: creating tests/test-noansi-r/Makefile config.status: creating tests/test-prefix-nr/Makefile config.status: creating tests/test-prefix-r/Makefile config.status: creating tests/test-pthread/Makefile config.status: creating tests/test-string-nr/Makefile config.status: creating tests/test-string-r/Makefile config.status: creating tests/test-yyextra/Makefile config.status: creating tests/test-lineno-nr/Makefile config.status: creating tests/test-lineno-r/Makefile config.status: creating tests/test-linedir-r/Makefile config.status: creating tests/test-debug-r/Makefile config.status: creating tests/test-debug-nr/Makefile config.status: creating tests/test-mem-nr/Makefile config.status: creating tests/test-mem-r/Makefile config.status: creating tests/test-posix/Makefile config.status: creating tests/test-posixly-correct/Makefile config.status: creating tests/test-table-opts/Makefile config.status: creating tests/test-c++-basic/Makefile config.status: creating tests/test-bison-nr/Makefile config.status: creating tests/test-reject/Makefile config.status: creating tests/test-c++-multiple-scanners/Makefile config.status: creating tests/test-top/Makefile config.status: creating tests/test-rescan-nr/Makefile config.status: creating tests/test-rescan-r/Makefile config.status: creating config.h config.status: executing default-1 commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: executing depfiles commands
请
meshLium-AX:/mnt/sda/flex-2.5.33# make cd . && /bin/sh /mnt/sda/flex-2.5.33/missing --run aclocal-1.7 -I m4 /mnt/sda/flex-2.5.33/missing: line 46: aclocal-1.7: command not found WARNING: `aclocal-1.7' is missing on your system. You should only need it if you modified `acinclude.m4' or `configure.in'. You might want to install the `Automake' and `Perl' packages. Grab them from any GNU archive site. cd . && \ /bin/sh /mnt/sda/flex-2.5.33/missing --run automake-1.7 --gnits Makefile /mnt/sda/flex-2.5.33/missing: line 46: automake-1.7: command not found WARNING: `automake-1.7' is missing on your system. You should only need it if you modified `Makefile.am', `acinclude.m4' or `configure.in'. You might want to install the `Automake' and `Perl' packages. Grab them from any GNU archive site. cd . && /bin/sh /mnt/sda/flex-2.5.33/missing --run autoconf /bin/sh ./config.status --recheck running /bin/sh ./configure --no-create --no-recursion checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether NLS is requested... yes checking for msgfmt... no checking for gmsgfmt... : checking for xgettext... no checking for msgmerge... no checking for style of include used by make... GNU checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking build system type... i586-pc-linux-gnu checking host system type... i586-pc-linux-gnu checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking whether NLS is requested... yes checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking for bison... no checking for byacc... no checking for flex... no checking for lex... no checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl.exe... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking dependency style of g++... none checking whether ln -s works... no, using cp -p checking for ranlib... ranlib checking for bison... bison checking for help2man... help2man checking for gm4... no checking for gnum4... no checking for m4... /usr/local/bin/m4 checking for GNU m4... yes checking for indent... indent configure: WARNING: no indent program found: make indent target will not function checking for log in -lm... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for unistd.h... (cached) yes checking stdbool.h usability... yes checking stdbool.h presence... yes checking for stdbool.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking sys/params.h usability... no checking sys/params.h presence... no checking for sys/params.h... no checking cunistd usability... no checking cunistd presence... no checking for cunistd... no checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking regex.h usability... yes checking regex.h presence... yes checking for regex.h... yes checking for size_t... yes checking whether __func__ is declared... yes configure: creating ./config.status cd . && /bin/sh ./config.status Makefile depfiles config.status: creating Makefile config.status: WARNING: 'Makefile.in' seems to ignore the --datarootdir setting config.status: executing depfiles commands cd . && /bin/sh /mnt/sda/flex-2.5.33/missing --run autoheader perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). touch ./conf.in cd . && /bin/sh ./config.status config.h config.status: creating config.h make all-recursive make[1]: Entering directory `/mnt/sda/flex-2.5.33' Making all in . make[2]: Entering directory `/mnt/sda/flex-2.5.33' if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT libmain.o -MD -MP -MF ".deps/libmain.Tpo" \ -c -o libmain.o `test -f 'libmain.c' || echo './'`libmain.c; \ then mv -f ".deps/libmain.Tpo" ".deps/libmain.Po"; \ else rm -f ".deps/libmain.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT libyywrap.o -MD -MP -MF ".deps/libyywrap.Tpo" \ -c -o libyywrap.o `test -f 'libyywrap.c' || echo './'`libyywrap.c; \ then mv -f ".deps/libyywrap.Tpo" ".deps/libyywrap.Po"; \ else rm -f ".deps/libyywrap.Tpo"; exit 1; \ fi rm -f libfl.a ar cru libfl.a libmain.o libyywrap.o ranlib libfl.a if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT ccl.o -MD -MP -MF ".deps/ccl.Tpo" \ -c -o ccl.o `test -f 'ccl.c' || echo './'`ccl.c; \ then mv -f ".deps/ccl.Tpo" ".deps/ccl.Po"; \ else rm -f ".deps/ccl.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT dfa.o -MD -MP -MF ".deps/dfa.Tpo" \ -c -o dfa.o `test -f 'dfa.c' || echo './'`dfa.c; \ then mv -f ".deps/dfa.Tpo" ".deps/dfa.Po"; \ else rm -f ".deps/dfa.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT ecs.o -MD -MP -MF ".deps/ecs.Tpo" \ -c -o ecs.o `test -f 'ecs.c' || echo './'`ecs.c; \ then mv -f ".deps/ecs.Tpo" ".deps/ecs.Po"; \ else rm -f ".deps/ecs.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT gen.o -MD -MP -MF ".deps/gen.Tpo" \ -c -o gen.o `test -f 'gen.c' || echo './'`gen.c; \ then mv -f ".deps/gen.Tpo" ".deps/gen.Po"; \ else rm -f ".deps/gen.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" \ -c -o main.o `test -f 'main.c' || echo './'`main.c; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; \ else rm -f ".deps/main.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT misc.o -MD -MP -MF ".deps/misc.Tpo" \ -c -o misc.o `test -f 'misc.c' || echo './'`misc.c; \ then mv -f ".deps/misc.Tpo" ".deps/misc.Po"; \ else rm -f ".deps/misc.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT nfa.o -MD -MP -MF ".deps/nfa.Tpo" \ -c -o nfa.o `test -f 'nfa.c' || echo './'`nfa.c; \ then mv -f ".deps/nfa.Tpo" ".deps/nfa.Po"; \ else rm -f ".deps/nfa.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I. -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -I./intl -g -O2 -MT parse.o -MD -MP -MF ".deps/parse.Tpo" \ -c -o parse.o `test -f 'parse.c' || echo './'`parse.c; \ then mv -f ".deps/parse.Tpo" ".deps/parse.Po"; \ else rm -f ".deps/parse.Tpo"; exit 1; \ fi /bin/sh /mnt/sda/flex-2.5.33/missing --run flex `test -f scan.l || echo './'`scan.l /mnt/sda/flex-2.5.33/missing: line 46: flex: command not found 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. sed '/^#/ s|\.c|scan.c|' .c >scan.c sed: can't read .c: No such file or directory make[2]: *** [scan.c] Error 2 make[2]: Leaving directory `/mnt/sda/flex-2.5.33' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/mnt/sda/flex-2.5.33' make: *** [all] Error 2
答案 0 :(得分:1)
我下载了一份flex-2.5.33。它包含scan.l和scan.c.
-rw-r - r-- 500/500 141838 2006-02-20 20:45 flex-2.5.33 / scan.c
-rw-r - r-- 500/500 20853 2006-02-14 13:28 flex-2.5.33 / scan.l
看起来你错过了提供的scan.c.
从你的make输出看起来你也缺少你的语言环境文件或设置 环境。
如果您要使用基于gnu的工具在此计算机上进行任何其他开发,您可以考虑安装autoconf和automake。看起来Makefile正在强制进行重新配置,因为这些项目不存在,这可能会导致一些未指定的问题。
最后,你应该考虑使用第二台开发机器来装满 安装开发平台。这样你就可以在那里编译/测试,看看“正常”输出应该是什么样子。另一种方法是在开发机器上进行构建,并将结果安装在“精简”目标上。
答案 1 :(得分:0)
这是一个黑暗中的镜头,但尝试安装help2man,看看你是否进一步了?
(基于此http://rainforce.org/flex/flex-2-5-10.notes - 该文件中的思维过程并不完全清楚,因此很难确定,但可能值得一试。)
答案 2 :(得分:0)
Make输出显示它首先尝试重新生成某些文件,这些文件通常不会被只想从源编译的用户重新生成。其中一个文件是来自scan.l的scan.c,它需要预先存在的flex,当然它会失败。
下载的tarball不应该是这种情况。一个猜测是文件标记是错误的。尝试新目录
./configure
touch scan.c
make
如果根本没有scan.c文件,那么您下载了错误的tarball或者它已损坏。
答案 3 :(得分:0)
文件 scan.c
是源包的一部分,但如果以某种方式被删除,它必须从 scan.l
(通过 make scan.c
)重建,它使用 flex
(尚未安装)。
因此,最简单的解决方案是从 scan.c
文件中重新提取 flex*.tar.bz2
。