Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I wanted to compile some Software (doesn't really matter what it was). Then, the make reported: yacc: command not found. I figured that this is some sort of a language and i figured that I had to download Bison. But now what all are all these programs? If the make reports, that it is looking for yacc, why shouldn't I install it rather than Bison?
Some sites told me, if I am using Linux, I have yacc. But on my machine (Mandrake 8.1), i don't seem to have it.
Thank you for helping
Well it used to be lex and yacc but they kinda got outdated so now they have been replaced be flex and bison. Some programs still look for the older versions though. The easiest ways around it is to create two scripts which call the newer programs.
Create yacc by typing the following as root in a terminal:
cat > /usr/bin/yacc << "EOF"
#!/bin/sh
# Begin /usr/bin/yacc
exec /usr/bin/bison -y "$@"
# End /usr/bin/yacc
EOF
chmod 755 /usr/bin/yacc
Do the same for lex:
cat > /usr/bin/lex << "EOF"
#!/bin/sh
# Begin /usr/bin/lex
There is a version of both lex and yacc for Linux. Most GNU based software use flex and Bison. Be careful trying to use one for the other because the program options are not the same. In SuSE, these programs are in the development section.
I thought passing the -y to bison solved all the problems of things not being the same. It says in the helpfiles that a shell script with bison -y $* can substitute yacc. Would there be any other reasons why that would not be enough. I have those scripts on several machines and never had any problems. But maybe that's because most of them all use bison instead of yacc anyways.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.