Subject: use nblex instead of lex
To: None <>
From: Jeremy C. Reed <>
List: tech-toolchain
Date: 02/08/2005 16:08:55
(Please carbon-copy me on replies.)

binutils complains:

checking for lex... no
checking for flex... /home/reed/netbsd/src/gnu/dist/binutils/missing flex
checking for yywrap in -ll... no
checking lex output file root... 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.

and ld (configure-ld) fails:

checking for flex... no
checking for lex... no
/home/reed/netbsd/src/gnu/dist/binutils/ld/configure: line 4417: flex:
command n
ot found
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root...
igure: line 4505: lex: command not found
configure: error: cannot find output from lex; giving up

I do have /home/reed/netbsd/src/tooldir.Linux-2.6.9-unknown/bin/nblex
which was built earlier.

I tried editing tools/binutils/Makefile (to define
LEX=${TOOLDIR}/bin/${_TOOL_PREFIX}lex) and gnu/dist/binutils/
to make sure LEX was used but no luck.

Such as:

--- tools/binutils/Makefile     14 Jan 2005 07:46:56 -0000      1.9
+++ tools/binutils/Makefile     9 Feb 2005 00:08:15 -0000
@@ -35,6 +35,7 @@
                        CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
                        MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
                        XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
+                       LEX=${TOOLDIR}/bin/${_TOOL_PREFIX}lex \
                        LIBS=-lintl \
                        ac_cv_prog_cc_cross=yes \
                        ac_cv_func_strcoll_works=yes \

--- gnu/dist/binutils/       8 Dec 2004 13:38:07 -0000
+++ gnu/dist/binutils/       8 Feb 2005 23:49:11 -0000
@@ -467,6 +467,7 @@
        'CXX=$(CXX)' \
        'DLLTOOL=$(DLLTOOL)' \
        'LD=$(LD)' \
+       'LEX=$(LEX)' \
        'NM=$(NM)' \
        'RANLIB=$(RANLIB)' \

(But that did not help.)

I see LEX is defined in share/mk/

Any ideas on how to get my nblex tool to be used?

 Jeremy C. Reed

 	  	 	 technical support & remote administration