Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No usable M4 in $PATH or /usr5bin

As part of a long, sordid story whose end goal is simply to get GMP installed for use with code::blocks in Windows, I am trying to configure gmp. I do this with the following command:

./configure --prefix=${gmp_install}

Everything starts out well enough. After a few minutes and a bit of progress, everything grinds to a halt and I get this message:

configure: error: No usable M4 in $PATH or /usr5bin

I don't even know what M4 is, but I discover that it is some sort of macro processor. So I download it, and add the folder to my Path variable. Then I start the configure again, but same result.

Is there something that I need to do to M4 to get it working? I'm truly at a loss. Thanks for your help.

like image 483
AndroidDev Avatar asked Jul 06 '12 20:07

AndroidDev


4 Answers

If you're using debian based OS, do sudo apt-get install m4. If internet isn't there or you have just the package of m4, copy it in /opt, configure it and later on change the $PATH value to the one you have now.

like image 108
Abhineet Sharma Avatar answered Oct 06 '22 07:10

Abhineet Sharma


Assuming you are on MSYS2 (You seem to have a sh), you can install m4 via pacman -S m4.

Be careful that if you run configure through a shell, that you don't pick WSL's bash accidentally (which is in %System32%/bash.exe). Which is what happened in our build system...

like image 39
Sebastian Graf Avatar answered Oct 06 '22 08:10

Sebastian Graf


If you are using cygwin, the setup installer has a working package of m4. Then there's no need to download m4 or change $PATH.

like image 23
qwr Avatar answered Oct 06 '22 07:10

qwr


I came up with your same problem, I solved it by running the Mingw package installer, and search for msys-m4 in the list, select all and then Apply Changes, it should let you ./configure just fine :)

like image 45
Raúl Sanpedro Avatar answered Oct 06 '22 09:10

Raúl Sanpedro