I'm trying to install 'flex'. I don't have a previous version of flex installed. I'm running a stripped down version of linux, so I don't have apt-get or yum. To install I untarred the flex package (flex-2.5.33.tar.gz) and ran ./configure (which works). However, then I ran make and it failed. I've attached the output of ./configure and make if that helps. What should I do? Thanks in advance.
我正在安装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
-
MAKE
使
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
3 个解决方案
#1
1
I downloaded a copy of flex-2.5.33. It contains both scan.l and 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
我下载了一份flex-2.5.33。它包含两个扫描。l和scan.c。-rw-r- r- 500/500 141838 -2。c -rw-r- r- 500/ 50020853 2006-02-14 13:28 flex-2.5.33/scan.l
It looks like you are missing the supplied scan.c.
看起来您缺少了所提供的scan.c。
From your make output it also looks like you are missing locale files or settings in your environment.
在您的make输出中,看起来您还缺少环境中的语言环境文件或设置。
If you are going to be doing any other development on this machine with gnu based tools, you might consider installing autoconf and automake. It looks like the Makefile is forcing a reconfigure because those items are not present, which may be causing some unspecified issue.
如果您打算在这台机器上使用基于gnu的工具进行任何其他开发,您可以考虑安装autoconf和automake。看起来Makefile正在强制重新配置,因为这些项不存在,这可能会导致一些未指定的问题。
Finally, you should consider having a second development machine where you can have a full development platform installed. That way you could compile/test there and see what 'normal' output should look like. Another alternative is to do your build on the development machine and install the results on your 'stripped down' target.
最后,您应该考虑使用第二个开发机器,在其中安装完整的开发平台。这样,您就可以在那里编译/测试,看看“正常”输出应该是什么样子。另一种选择是在开发机器上进行构建,并将结果安装到“剥离”目标上。
#2
0
This is kind of a shot in the dark, but try installing help2man and see if you get any farther?
这有点像瞎猜,但试试安装help2man,看看你能不能继续下去?
(Based this on http://rainforce.org/flex/flex-2-5-10.notes -- the thought process in that file isn't entirely clear, so it's hard to be sure, but it might be worth a try.)
(基于http://rainforce.org/flex/flex-2-5-10.notes——该文件中的思想过程并不完全清楚,因此很难确定,但可能值得一试。)
#3
0
The Make output shows that it tries first to regenerate certain files which are normally not regenerated by users who just want to compile from the sources. One of those files is scan.c from scan.l which requires pre-existing flex and of course it fails.
Make输出显示,它首先尝试重新生成某些文件,这些文件通常不会由只想从源编译的用户重新生成。其中一个文件是扫描。c扫描。我需要既存的flex,当然它失败了。
This shouldn't be the case with downloaded tarballs. One guess is that file stamps are wrong. Try in a fresh directory
下载的tarball不应该是这样的。一种猜测是文件戳是错误的。尝试一个新的目录
./configure
touch scan.c
make
If there is no scan.c file at all, then you have downloaded the wrong tarball or it is corrupted.
如果没有扫描。c文件,然后你下载了错误的tarball或者它被损坏了。
#1
1
I downloaded a copy of flex-2.5.33. It contains both scan.l and 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
我下载了一份flex-2.5.33。它包含两个扫描。l和scan.c。-rw-r- r- 500/500 141838 -2。c -rw-r- r- 500/ 50020853 2006-02-14 13:28 flex-2.5.33/scan.l
It looks like you are missing the supplied scan.c.
看起来您缺少了所提供的scan.c。
From your make output it also looks like you are missing locale files or settings in your environment.
在您的make输出中,看起来您还缺少环境中的语言环境文件或设置。
If you are going to be doing any other development on this machine with gnu based tools, you might consider installing autoconf and automake. It looks like the Makefile is forcing a reconfigure because those items are not present, which may be causing some unspecified issue.
如果您打算在这台机器上使用基于gnu的工具进行任何其他开发,您可以考虑安装autoconf和automake。看起来Makefile正在强制重新配置,因为这些项不存在,这可能会导致一些未指定的问题。
Finally, you should consider having a second development machine where you can have a full development platform installed. That way you could compile/test there and see what 'normal' output should look like. Another alternative is to do your build on the development machine and install the results on your 'stripped down' target.
最后,您应该考虑使用第二个开发机器,在其中安装完整的开发平台。这样,您就可以在那里编译/测试,看看“正常”输出应该是什么样子。另一种选择是在开发机器上进行构建,并将结果安装到“剥离”目标上。
#2
0
This is kind of a shot in the dark, but try installing help2man and see if you get any farther?
这有点像瞎猜,但试试安装help2man,看看你能不能继续下去?
(Based this on http://rainforce.org/flex/flex-2-5-10.notes -- the thought process in that file isn't entirely clear, so it's hard to be sure, but it might be worth a try.)
(基于http://rainforce.org/flex/flex-2-5-10.notes——该文件中的思想过程并不完全清楚,因此很难确定,但可能值得一试。)
#3
0
The Make output shows that it tries first to regenerate certain files which are normally not regenerated by users who just want to compile from the sources. One of those files is scan.c from scan.l which requires pre-existing flex and of course it fails.
Make输出显示,它首先尝试重新生成某些文件,这些文件通常不会由只想从源编译的用户重新生成。其中一个文件是扫描。c扫描。我需要既存的flex,当然它失败了。
This shouldn't be the case with downloaded tarballs. One guess is that file stamps are wrong. Try in a fresh directory
下载的tarball不应该是这样的。一种猜测是文件戳是错误的。尝试一个新的目录
./configure
touch scan.c
make
If there is no scan.c file at all, then you have downloaded the wrong tarball or it is corrupted.
如果没有扫描。c文件,然后你下载了错误的tarball或者它被损坏了。