4

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
UndercoverCoder
  • 953
  • 3
  • 13
  • 28
  • Please read the site guidelines, you need to provide a minimal but complete example. Also, before tagging your question with anything, make sure that tag actually applies. – Ulrich Eckhardt Jan 13 '18 at 12:11
  • 1
    @UlrichEckhardt -The book I linked is the example. I unfortunately can't type the entire book as that would be too long. Hence why I linked it instead.... The question was aimed at those familiar with Linux From Scratch. Hence why I used the tag `lfs`. This is as specific as I could get. – UndercoverCoder Jan 13 '18 at 12:16
  • @UlrichEckhardt - I also put 'Linux From Scratch' in the question title. I don't know how much more specific I have to be (don't mean to sound rude btw) – UndercoverCoder Jan 13 '18 at 12:18
  • 1
    I'm also not trying to be rude. However, firstly, remove tags from the topic, they bloat it up unnecessarily. Then, read the description of the "linux" tag: Nothing here is specific to Linux, it could occur on any other system, too. OTOH, I'm guessing a bit, because you don't have a minimal example, and that's what is really missing. Take the code and extract one. This makes sure that all necessary info but no superfluous info is present. Putting a link out and asking others to locate the relevant info there simply makes your question off-topic according to the SO rules. – Ulrich Eckhardt Jan 13 '18 at 12:22
  • 2
    The message you cited seems to stated a package was missing. Did you install `flex` like detailed in [the follow up](http://lists.linuxfromscratch.org/pipermail/lfs-support/2013-November/045899.html)? – jww Jan 13 '18 at 14:06
  • @jww - Thank you for commenting. I just installed `flex`, I'm assuming I'll have to recompile every package again. – UndercoverCoder Jan 13 '18 at 14:32
  • 2
    @UlrichEckhardt I think you misunderstood what the question is about. The OP did not write any code, so there's nothing to post a minimal example of. The OP is trying to build a Linux system from scratch and as part of that is compiling bison, which is apparently failing at the `make check` stage. – sepp2k Jan 13 '18 at 15:45
  • @UlrichEckhardt it's clear you know nothing about linux from scratch, so please don't comment. there is nothing wrong with this question. – rsm Jan 14 '18 at 05:24
  • Pretty arrogant to assume that from me, @rsm, effectively you call me too stupid to follow a link. Still, SO is about programming-related questions. There's code involved, sure, but the OP isn't doing the programming. To some extent one could argue that all they do is follow predefined steps, like playing a game, and you wouldn't call that programming either, would you? This is basically a bug report concerning some program (with parts of the program being instructions executed manually), but SO is the wrong place to ask support questions! – Ulrich Eckhardt Jan 14 '18 at 08:44

1 Answers1

8

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.

rsm
  • 2,530
  • 4
  • 26
  • 33