helpAutoconf - Support: sr #110269, AC_PROG_LEX failing

 
 

sr #110269: AC_PROG_LEX failing

Submitted by:  None
Submitted on:  Wed 15 Jul 2020 04:04:43 PM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Thu 16 Jul 2020 04:56:47 PM UTC, comment #6: 

Thanks for the bug report and detailed analysis. I looked into the commit that you mentioned, and the problem seems to be that it introduced an AC_MSG_ERROR which causes 'configure' to fail entirely, whereas what it should do is give up on 'flex'. In your case you have a cross-build where 'flex' (on your build platform) is available but the 'flex' library (on your host platform) is not, and this causes the AC_MSG_ERROR to trigger.

For your particular case I expect it's better for 'configure' to behave as if 'flex' does not exist, so I installed the attached patch into Autoconf master on Savannah. Please give it a try.

I am boldly marking this bug report as "done" but will change its status back if the patch doesn't fix things for you.

(file #49491)

Paul Eggert <eggert>
Project Administrator
Thu 16 Jul 2020 11:17:01 AM UTC, comment #5: 

I can confirm that reverting that commit 'fixes' the issue, and all of the projects that were failing in AC_PROG_LEX are now building fine.

Ross Burton <rossburton>
Thu 16 Jul 2020 09:07:51 AM UTC, comment #4: 

I can replicate this with a minimal configure.ac:

AC_INIT([argh], [1])
AC_PROG_LEX
AC_OUTPUT([])

Flex and its headers are present.

The config.log files are effectively identical until "checking lex library", autoconf 2.69 reports none needed but 2.70b reports not found.

Looks like this was introduced by "Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)".

Ross Burton <rossburton>
Wed 15 Jul 2020 08:54:46 PM UTC, comment #3: 

Which suggests to me the problem can be isolated to _AC_PROG_LEX_YYTEXT_DECL.

Ross Burton <rossburton>
Wed 15 Jul 2020 08:53:43 PM UTC, comment #2: 

For reference, building with autoconf 2.69 produces this output:

checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed

Ross Burton <rossburton>
Wed 15 Jul 2020 04:17:02 PM UTC, comment #1: 

gmp fails in the same way.

Ross Burton <rossburton>
Wed 15 Jul 2020 04:04:43 PM UTC, original submission:  

Both Flex and gdbm use AC_PROG_LEX and fail the same way with autoconf 2.70beta but worked with 2.69.

| checking for flex... flex
| checking for lex output file root... lex.yy
| checking for lex library... not found
| configure: error: required lex library not found

The config.log shows it trying a few options:

configure:12442: checking for lex library
configure:12457: aarch64-poky-linux-gcc  -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot -o conftest  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0=/usr/src/debug/flex/2.6.4-r0                      -fdebug-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0=/usr/src/debug/flex/2.6.4-r0                      -fdebug-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot-native=   -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now conftest.c   >&5
/usr/src/debug/flex/2.6.4-r0/build/conftest.l:17: undefined reference to `yywrap'

configure:12457: aarch64-poky-linux-gcc  -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
-Werror=format-security --sysroot=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot -
o conftest  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-
poky-linux/flex/2.6.4-r0=/usr/src/debug/flex/2.6.4-r0                      -fdebug-prefix-map=/home/ross/Yocto/bui
ld/tmp/work/armv8a-poky-linux/flex/2.6.4-r0=/usr/src/debug/flex/2.6.4-r0                      -fdebug-prefix-map=/
home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot=                      -fdebug-prefix
-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot-native=   -Wl,-O1 -Wl,--hash-s
tyle=gnu -Wl,--as-needed -Wl,-z,relro,-z,now conftest.c -lfl  >&5
/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/.
./../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/10.1.0/ld: cannot find -lfl

configure:12457: aarch64-poky-linux-gcc  -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot -o conftest  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0=/usr/src/debug/flex/2.6.4-r0                      -fdebug-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0=/usr/src/debug/flex/2.6.4-r0                      -fdebug-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot-native=   -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now conftest.c -ll  >&5
/home/ross/Yocto/build/tmp/work/armv8a-poky-linux/flex/2.6.4-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/10.1.0/ld: cannot find -ll

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eggert (Updated the item)
  • -email is unavailable- added by rossburton (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-16 eggert Open/ClosedOpen => Closed
    2020-07-16 eggert Attached File- => Added 0001-Fix-AC_PROG_LEX-regression.patch, #49491
        StatusNone => Done

    Back to the top


    Powered by Savane 3.5