Reputation: 1511
I'm following the instructions from LFS but with a twist: I'm only following parts of Section 5 - Constructing a Temporary System to the extent that I can build my own GCC, reason being that this is a work machine, and I don't have root privileges. It was going all right until I ran into an error configuring glibc
:
configure: error:
*** These critical programs are missing or too old: as GNU ld make bison compiler
*** Check the INSTALL file for required versions.
After some investigation, it turns out that I'm not satisfying this condition that's required for LFS:
/usr/bin/yacc is a symbolic link to bison or a small script that executes bison.
Turns out that there is no such file at /usr/bin/yacc
(although bison
does exist). However, because I don't have root privileges at work, I can't create a symbolic link there. Is there a workaround here?
Upvotes: 5
Views: 26837
Reputation: 33694
Current glibc versions need the bison program to build (and not yacc). You can download the bison source and build them like this:
wget https://ftp.gnu.org/gnu/bison/bison-3.2.tar.gz
tar xf bison-3.2.tar.gz
cd bison-3.2
./configure --prefix=$HOME/install
make
make install
Then you can put the $HOME/install/bin
directory on the command search path:
PATH=$HOME/install/bin:$PATH
At this point, glibc's configure
script should pick up that bison version.
Older versions of glibc (before 2.27) ship the bison-generated files as part of the sources, so that bison is optional. Apparently the instructions you are following have not been updated to reflect the new requirement for bison.
Upvotes: 8