Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipe for target 'setquant.c' failed #16

Open
matteo-pellegrini opened this issue Jul 25, 2017 · 1 comment
Open

recipe for target 'setquant.c' failed #16

matteo-pellegrini opened this issue Jul 25, 2017 · 1 comment

Comments

@matteo-pellegrini
Copy link

I have very basic programming skills, so forgive me if this is a trivial issue. When launching "make", I get this error message:

make[1]: Entering directory '/home/matteo/Downloads/morpheus-master/src/gkdict' flex -t setquant.l > setquant.c /bin/sh: 1: flex: not found <builtin>: recipe for target 'setquant.c' failed make[1]: *** [setquant.c] Error 127 rm setquant.c make[1]: Leaving directory '/home/matteo/Downloads/morpheus-master/src/gkdict' makefile:2: recipe for target 'all' failed make: *** [all] Error 2

I understand that the file "setquant.c" is missing, but I have just downloaded the folder without changing anything, so I don't know why.
Anyone knows how to solve it?
Thanks in advance

@christiancasey
Copy link

Definitely not a trivial issue. I had the same problem and it took me forever to figure it out.

All of the .l files are Flex libraries, not standard C source code. Those have to be precompiled by Flex in order to work properly, which means that you need to have Flex installed. Here's a handy guide. (I used Homebrew, but I don't think it matters. Basically you need to install Flex however works best for you.) If you don't have Flex installed, you get that error, which doesn't do anything to indicate the problem. It's very confusing.

Assuming you're using OS X like I am, the problem once you do have Flex installed is that the Flex libraries are named differently. You need to find and change every line in all makefiles that has -lfl to -ll. Then it should find the right Flex files and compile properly.

You may have other problems, such as the error generated when functions without a return type are automatically treated as int fn() by newer versions of gcc. I fixed this by changing CC=gcc to CC=gcc -Wno-return-type in all of the make files. That flag prevents an error from being generated by the many functions that contain return; somewhere, but no return type. I also tried changing all return; to return 0;, but that creates a host of new problems. Ignoring the error is your best bet.

All of that said, after successfully compiling and running cruncher, I've still failed to get the libraries to compile properly. I suspect that it's a similar sort of problem (very old code on new computers), but I haven't been able to find a solution. I'm opening a new issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants