Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux From Scratch error in Bison-3.0.4 'make check'

So I'm following the Linux From Scratch book and am in chapter 5.17 Bison-3.0.4.

The book instructs us to do a make check after make to test the result of the compiled Bison package.

Initially, I was getting the following error:

make[3]: Entering directory `/sources/bison-3.0'
  LEX      examples/calc++/calc++-scanner.cc
  CXX      
examples/calc++/examples_calc___calc__-calc++-scanner.o
g++: error: ./examples/calc++/calc++-scanner.cc: No such file or directory
g++: fatal error: no input files
compilation terminated.
make[3]: *** 
[examples/calc++/examples_calc___calc__-calc++-scanner.o] Error 1
make[3]: Leaving directory `/sources/bison-3.0'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/sources/bison-3.0'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/sources/bison-3.0'
make: *** [check] Error 2

But got a solution on this website. Which told me to do the following before issuing make check:

cp Makefile Makefile.bak
sed -i '/calc++/d' Makefile
make check

This solved the issue and all checks were getting a green ok apart from the following three FAILED checks:

430: Variants lalr1.cc parse.assert api.token.constructor FAILED (c++.at:374)
431: Variants lalr1.cc parse.assert api.token.constructor api.token.prefix={TOK_} FAILED (c++.at:375)
432: Variants lalr1.cc parse.assert api.token.constructor api.token.prefix={TOK_} %locations FAILED (c++.at:376)

I tried searching on Google but get nothing.

Any ideas?

like image 512
UndercoverCoder Avatar asked Jan 28 '23 21:01

UndercoverCoder


1 Answers

It's common mistake. As stated in Chapter 4.6. About the Test Suites:

Experience has shown that there is little to be gained from running the test suites in Chapter 5. There can be no escaping the fact that the host system always exerts some influence on the tests in that chapter, often causing inexplicable failures. Because the tools built in Chapter 5 are temporary and eventually discarded, we do not recommend running the test suites in Chapter 5 for the average reader. The instructions for running those test suites are provided for the benefit of testers and developers, but they are strictly optional.

Solution is simple - don't run tests for packages compiled in Chapter 5. They will fail and it doesn't mean anything. Tests are important in Chapter 6 when you build your real system.

like image 97
rsm Avatar answered Jan 31 '23 11:01

rsm