R – difficulty installing flex-2.5.33.tar.gz on linux (debian); ‘make’ fails

debianflex-lexerinstallationlinuxmakefile

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.

-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
    

Best Answer

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

It looks like you are missing the supplied scan.c.

From your make output it also looks like you are missing locale files or settings in your environment.

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.

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.

Related Topic