[Clfs-dev] Bison and Flex Hard Coded Paths

Martin Ward macros_the_black at ntlworld.com
Tue Aug 13 13:43:47 PDT 2013


On 12/08/13 17:37, Martin Ward wrote:
> On 12/08/13 15:34, Martin Ward wrote:
>>
>> 10.27.1
>>
>> Bison 2.7.1, still need ac_cv_prog_lex_is_flex=yes on the command 
>> line other wise it won't configure
>> Bison 3.0 is even worse, not only that, couldn't get it to 
>> cross-compile, seems to run an architecture dependant to get generate 
>> doc/help files, but also needs ac_cv_prog_lex_is_flex=yes to succeed, 
>> but complains about a hard coded m4 invocation(cross-tools) from 
>> flex(installed in tools) in generating some test files
>>
>>
>> cheers
>>
>> martin
>>
>>
>> _______________________________________________
>> Clfs-dev mailing list
>> Clfs-dev at lists.cross-lfs.org
>> http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org
>>
> Replying to myself
>
> It does look like both bison and flex hard codes the path of m4 into 
> the binary, the only reason I found this out was trying to get Bison 
> 3,0 to cross-compile, didn't work so went back to to 2.7.1. However in 
> the final phase tried again with 3.0, but I normally rename 
> /cross-tools, and found after that when trying to do a make check, it 
> couldn't find m4, even though I had just installed it bit of detective 
> work, found out both bison and flex embed the path of m4 into the 
> binary!!!
>
> The solution seems to fix it is by appending ac_cv_path_M4=m4 to both 
> bison and flex configure lines although flex seems to be the culprit 
> in this case
>
> The M4 in cross tools is good enough to pass all the autoconf tests..
>
>
> regards
>
> Martin
>
> _______________________________________________
> Clfs-dev mailing list
> Clfs-dev at lists.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org
>
More stuff further investigation see 
https://lists.yoctoproject.org/pipermail/poky/2012-January/007403.html 
and others

Running strings -a | grep m4 on the bison and flex executables did 
indeed show hard coded paths embedded

Rather   than appending ac_cv_path_M4=m4 to the configure lines in the 
tempphase, just make sure that m4 is cross-compiled before either bison 
or flex, this should then at least get the right version , .i.e 
/tools/bin/m4 to be run when needed


regards

martin





More information about the Clfs-dev mailing list