How to set the GNUMAKE variable for ndk-build to work

I am trying to make ndk-build work in Cygwin on windows. According to the NDK documentation (specifically INSTALL.htm), "NDK requires that GNU Make 3.81 or later be available for your development."

I have Gnu Make installed on my computer.

So far so good.

Inside Cygwin bash, I connected to the root directory of the Android NDK. Now, when I enter the following command (without parameters right now, to see if the command works):

$. / Ndk-build
ERROR: unable to find make program. Please install the Cygwin make package or define the GNUMAKE variable to point to it.

So, I'm trying to set the GNUMAKE variable, but no luck:

$ export GNUMAKE = '/ cygdrive / c \ Program Files \ GnuWin32 \ bin'
ERROR: the GNUMAKE variable is defined as an invalid name: / cygdrive / c \ Program Files \ GnuWin32 \ bin Correct it to point to a valid make executable (for example, usr / bin / make)

I even tried installing it in usr / bin / make, as it suggests, but with the same invalid name error.

Does anyone know how to solve this?

I am using Windows 7, NDK r5, Cygwin 1.7.1

+8
android android-ndk cygwin makefile gnu-make
source share
8 answers

I had a problem with GNUMake when installing ndk in a folder with a space in it (I originally put it in the program file directory). I moved everything to C: / android / android-ndk and C: / android / android-sdk and updated the path settings to include these directories.

+7
source share

This is a common mistake. This means that the problem was somehow with the make command, but the error message itself is hidden. To help diagnose the problem, open the ndk_build script in the ndk directory and change these lines:

ABS_GNUMAKE=`which $GNUMAKE 2> /dev/null` ... GNUMAKE=`which make 2> /dev/null` 

to them:

 ABS_GNUMAKE=`which $GNUMAKE` ... GNUMAKE=`which make` 

And then you will get a more detailed error message. Note that this may not even be a problem with the make command, it may be a problem with the which command. Make sure you have cygwin installed.

+1
source share

Not a problem with make, but installing cygwin in an ndk-demo script, the make path was found using the command, basically, which installation command is missing in cygwin.

Solution: Restart cygwin installation, select utils (install)

Check: the $ that do should provide you with the path of the make command at the cygwin prompt.

Regards, Vasu

+1
source share

delete the GNUMAKE environment variable close the cygwin terminal open the cygwin terminal again ... go along the path where u want to build .. and now build it ... I'm sure hope you build successfully .. I do ..

+1
source share

The answer with moving the NDK to the directory without spaces is definitely right. After that, you can probably run ndk-build from the Cygwin shell.
However, executing ndk-build from the Windows commmand line (for example, "bash ndk-build") will probably cause the same strange error with "incorrect GNU make".
It is reproduced with NDK 6b.
And I hope it is fixed in the latest version of NDK ...

0
source share

ERROR: unable to find make program. Please install the Cygwin make package or define the GNUMAKE variable to point to it.

While trying to install Cygwin, I skipped the installation of MAKE PACKAGE

You just need to search in the search field, and it will display the branches that include the devel branch , and from the selected divvel package I will make a package.

Everything is fixed.

0
source share

I worked a lot on the error in the gygwin terminal "gnumake variable defines an invalid name", and after that I understand that we just delete this error by deleting the GNUMAKE path in the environment variable in both the system and user variables, if u created his hope for his help ....

mycomputer> system properties> advanced system settings> environment variable

0
source share

The problem here is the name of the GNUMAKE variable. The name indicated was

/cygdrive/c\Program Files\GnuWin32\bin change it to /cygdrive/c/Program Files/GnuWin32/bin/make

use only verbally. Sometimes a place in the folder structure is not performed

Happy coding.

0
source share

All Articles