Can't build Android Project on MAC. getting this error: ERROR: Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it.

Can't build Android Project on MAC. getting this error: ERROR: Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it.
0.0 0

#1

I am trying to make a new Android c++ project.

I am running the “./build_native.sh” from the terminal and this is what I get….

Marcs-Mac-mini:proj.android marcrenaud$ ./build_native.sh
NDK_ROOT = /Users/marcrenaud/documents/AndroidNDK
COCOS2DX_ROOT = /Users/marcrenaud/documents/workspace/cocos2d-x/idroid/proj.android/…/…
APP_ROOT = /Users/marcrenaud/documents/workspace/cocos2d-x/idroid/proj.android/…
APP_ANDROID_ROOT = /Users/marcrenaud/documents/workspace/cocos2d-x/idroid/proj.android
Using prebuilt externals
ERROR: Cannot find ‘make’ program. Please install Cygwin make package
or define the GNUMAKE variable to point to it.

Marcs-Mac-mini:proj.android marcrenaud$

I find this strange because I am running this on a MAC. Not in windows.

I’ve been stuck on this for a while.


#2

More info.

I selected option 2, Android 2.2 when creating the new project.

I’m using the latest version of cocos2d-x

I’m using ndk-r7

and latest sdk

I’ve folowed all the steps to start a new project and am now trying to do the first compile using the ./build_native.sh


#3

It seems that android build script can not find “make”.
May be you should do as it suggested, define the GNUMAKE variable to point to “make”.


#4

Thanks Minggo Zhang for the quick reply.

I’m not even sure what “make” means. This is my first time using a Mac.

Is it the folder where the build for the NDK is?

Sorry for my igniorance.

And thanks again for your help.


#5

I thought Cygwin was a windows application. I can’t seem to install it on a mac to resolve this.


#6

I made the GNUMAKE variable point to the Android.mk file in cocos2dx folder and i now get a new errors. Command not found?

I then tried the Android.mk and Application.mk in the /jni/ folder of the project and I still get command not found errors.

What am i doing wrong? Which .mk file should I target?

Marcs-Mac-mini:proj.android marcrenaud$ ./build_native.sh

NDK_ROOT = /Users/marcrenaud/Documents/AndroidNDK
COCOS2DX_ROOT = /Users/marcrenaud/documents/workspace/idroid/idroid/proj.android/…/…
APP_ROOT = /Users/marcrenaud/documents/workspace/idroid/idroid/proj.android/…
APP_ANDROID_ROOT = /Users/marcrenaud/documents/workspace/idroid/idroid/proj.android
Using prebuilt externals
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 1: call: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 1: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 3: CLEAR_VARS: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 3: include: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 5: LOCAL_MODULE: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 7: LOCAL_MODULE_FILENAME: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 9: LOCAL_SRC_FILES: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 132: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 132: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 132: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 132: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 132: LOCAL_EXPORT_C_INCLUDES: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 138: LOCAL_EXPORT_LDLIBS: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 142: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 142: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 142: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 142: LOCAL_PATH: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 142: LOCAL_C_INCLUDES: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 147: LOCAL_LDLIBS: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 152: LOCAL_WHOLE_STATIC_LIBRARIES: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 153: LOCAL_WHOLE_STATIC_LIBRARIES: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 154: LOCAL_WHOLE_STATIC_LIBRARIES: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 155: LOCAL_WHOLE_STATIC_LIBRARIES: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 158: LOCAL_CFLAGS: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 159: LOCAL_EXPORT_CFLAGS: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 161: BUILD_STATIC_LIBRARY: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 161: include: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 163: call: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 164: call: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 165: call: command not found
/Users/marcrenaud/Documents/workspace/idroid/cocos2dx/Android.mk: line 166: call: command not found

Marcs-Mac-mini:proj.android marcrenaud$


#7

ok got it.

It was looking for the “make” file in the AndroidNDK/prebuilt/darwin-x86/bin

so i resolved it by setting the value in the terminal:

export GNUMAKE=“/Users/marcrenaud/Documents/AndroidNDK/prebuilt/darwin-x86/bin/make”

in case someone else runs into this problem.


#8

Hi! thank you for your sharing