Android NDK - Building Limbo Android returns fatal error: config.h: No such file or directory - android

I'm trying to rebuild Limbo Android. I'm on Linux Mint.
All I changed was android-config.mak NDK_ROOT, exported variables NDK_ROOT. I've also exported NDK_MODULE_PATH to /home/pathtoandroidndk/sources, as per README instructions.
From terminal I do cd limbo-android/jni and then make.
Building returns this error:
jni/glib/glib/./libcharset/localcharset.c:22:20: fatal error: config.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi-v7a/objs-debug/glib-2.0/./libcharset/localcharset.o] Error 1
make: Leaving directory `/home/me/limbo-android'
I've tried modifing Android.mk following instructions from Android NDK - Additional Include Directories and Unable to find header files - Android NDK, without success.
I came to conclusion that each module inside limbo-android needs it's own config.h file, while libcharset does not have one.
How do I solve this error? Is there a generic config.h (the one from NDK maybe?)
NOTE: I can build it without any problems on Windows 8.1 using mingw.

Related

Compiling React Native project with local fork - NDK_PROJECT_PATH

I'm trying to compile my React Native Android project using a local fork of react-native. I've followed the building from source guide and completed all steps (not using Android Studio).
When I try to run react-native run-android (from project root as normal), I get:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ReactAndroid:buildReactNdkLib'.
> Process 'command '/usr/local/opt/android-ndk/ndk-build'' finished with non-zero exit value 2
When I run ndk-build (from project root), I get:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
/usr/local/Cellar/android-ndk/r12b/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
Another SO thread pointed me in the direction of running ndk-build from ./android/app/src and create a jni directory there (I didn't have one), but I'm unsure how to obtain or create jni/Android.mk correctly or if this will even help me. I've tried creating jni/Application.mk with contents APP_BUILD_SCRIPT := Android.mk and jni/Android.mk with the setup described in that SO question. Running ndk-build from android/app/src exits with the following error:
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: Android.mk
/usr/local/Cellar/android-ndk/r12b/build/core/add-application.mk:198: *** Android NDK: Aborting... . Stop.
I have the Android SDK and NDK installed with Homebrew and I have the following exports:
ANDROID_HOME=/usr/local/opt/android-sdk
ANDROID_SDK=/usr/local/opt/android-sdk
ANDROID_NDK=/usr/local/opt/android-ndk
ANDROID_NDK_HOME=/usr/local/opt/android-ndk
I feel like I'm close, but have no idea how to continue.
I think the issue is with android-ndk version. We need to use ndk version specified by react-native documentation. I tried with the latest version of andrid-ndk. I was not able to build the project, got similar error while running react-native run-android.
Then I tried with android-ndk-r10e version. It worked fine, I was able to build the project successfully.
Also you may find this react-native github issue discussion useful.
I'm trying to compile React Native UIExplorer for Android.And I have same issue.
Then I run ndk-build ,I get:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
/usr/local/Cellar/android-ndk/r13b/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
My android-ndk version is /android-ndk/r13b/,So I download android-ndk-r10e .
I use the most direct way:
$ cd /usr/local/Cellar/android-ndk/r13b
$ rm -rf ./*
$ mv YourUnZipPath/android-ndk-r10e/* ./
Then It worked fine, I was able to build the project successfully.

Trying to android ndk and cygwin

i am trying to build andriod - cocos2d-x-2.2.5 project which just a simple hello world project but when i try to run by entering ./build-native.sh in cygwin i got following warning and i am not able to proceed further.
$ ./build_native.sh
NDK_ROOT = C:\android-ndk-r10d
COCOS2DX_ROOT = /cygdrive/c/cocos2d-x-2.2.5/cocos2d-x-2.2.5/projects/helloWorld/proj.android/../../..
APP_ROOT = /cygdrive/c/cocos2d-x-2.2.5/cocos2d-x-2.2.5/projects/helloWorld/proj.android/..
APP_ANDROID_ROOT = /cygdrive/c/cocos2d-x-2.2.5/cocos2d-x-2.2.5/projects/helloWorld/proj.android
Using prebuilt externals
make: Entering directory '/cygdrive/c/cocos2d-x-2.2.5/cocos2d-x-2.2.5/projects/helloWorld/proj.android'
/cygdrive/c/android-ndk-r10d/build/core/build-all.mk:89: Android NDK: ***WARNING: There are no modules to build in this project!***
make: Leaving directory '/cygdrive/c/cocos2d-x-2.2.5/cocos2d-x-2.2.5/projects/helloWorld/proj.android'
This error:
WARNING: There are no modules to build in this project!
can happen if you haven't created the symbolic link in the release NDK directory.
You can read more about the issue here.
How to create symbolic links when using cygwin is addressed in this SO post:
How to make symbolic link with cygwin

setting Android NDK giving error : Your APP_BUILD_SCRIPT points to an unknown file

I'm running a sample application given in android-ndk, i have done basic settings like setting NDK Path at windows->preferences->android->NDK . Adding native support into project, included directories at c/c++ genereal-> paths and symbols -> includes but project is still showing error , if i clean the project it will generate error shown below . Any one knows what this errors means and what is the solution for this?
**** Clean-only build of configuration Default for project HelloJni ****
F:\android-ndk-r9-windows-x86\android-ndk-r9\ndk-build.cmd clean
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ;F:\android-ndk-r9-windows-x86\android-ndk-r9/jni/Android.mk
F:/android-ndk-r9-windows-x86/android-ndk-r9/build/core/add-application.mk:176: *** Android NDK: Aborting... . Stop.
**** Build Finished ****
Seems like ndk-build looks for jni/Android.mk under NDK directory and it is clearly wrong. Before running ndk-build, you should change your directory to project directory. For ease of use, add NDK directory to Path in your environment variables first, then change your directory to project directory and run ndk-build then. Like (assuming NDK directory is added to environment variables):
cd F:\path\to\project
ndk-build

PowerVR Android sample: makefile not working

I'm having a hard time setting up PowerVR SDK for Android on Windows 8 64, assuming I met all requirements:
Android SDK (fresh Eclipse)
Android NDK
Cygwin (with make)
PowerVR Android SDK 3.0
I can perfectly make and run an Android NDK sample. However, the same process fails for building any PowerVR sample (from the SDK). Here's the output when I try to run the makefile:
$ ndk
Compile++ thumb : OGLES2Texturing <= OGLES2Texturing.cpp
arm-linux-androideabi-g++.exe: error: C:/cygwin///cygdrive/c/Users/stfn/workspaces/android/03_Texturing/jni/OGLES2Texturing.cpp: No such file or directory
arm-linux-androideabi-g++.exe: fatal error: no input files
compilation terminated.
/cygdrive/c/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target `obj/local/armeabi/objs/OGLES2Texturing//cygdrive/c/Users/stfn/workspaces/android/03_Texturing/jni/OGLES2Texturing.o' failed
make: * [obj/local/armeabi/objs/OGLES2Texturing//cygdrive/c/Users/stfn/workspaces/android/03_Texturing/jni/OGLES2Texturing.o] Error 1
I suppose the error should be related to a wrong path given to the compiler. To me it looks like a mixture of standard Windows and Cygwin/Unix paths: * C:/cygwin///cygdrive/c/Users/stfn/...*
If been through so many makefiles now trying to resolve this issue but I just don't know where else to look. This is the first time I tried messing with the NDK. I'm afraid this could be my last.
Any help would be greatly appreciated
1.in the Android.mk file, for the PVRSDKDIR, set the path of your project folder in your workspace.
2.Copy the build, tools, and shell folders from the powervr sdk folder to your project folder

trying to build webkit from android externals

I've been trying to build Android WebKit from source (from here https://github.com/android/platform_external_webkit), but haven't had any success so far. I've run make and ndk-build from the root directory of my repo copy and from from the Source directory inside it, with the following results:
make from the root directory (makes sense, because there is no Makefile),
make: *** No targets specified and no makefile found. Stop.
make from the /Source directory:
make[1]: Entering directory `/webkit/Source/JavaScriptGlue'
../Makefile.shared:2: ../../Makefile.shared: No such file or directory
make[1]: *** No rule to make target `../../Makefile.shared'. Stop.
make[1]: Leaving directory `/webkit/Source/JavaScriptGlue'
make: *** [all] Error 2
ndk-build from root and ./Source:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
<NDK>/build/core/build-local.mk:130: *** Android NDK: Aborting . Stop.
Can anyone advise as to what I'm doing wrong? I've read mention of Android needing to be compiled as a whole, but since this is 'external', I thought it would compile standalone. Am I wrong about that? Or is there some configuration step I've missed? Or anything else?
Thanks for the help.
This doesn't allow you to get a build fully working, I suspect you did the same as me and cloned to a folder called webkit.
If you rename that to jni and then run ndk-build from the folder containing jni, it does at least get past the problem you mention. I now get the error:
jni/Android.mk:314: external/stlport/libstlport.mk: No such file or directory
Android NDK: Trying to define local module 'webcore' in jni/Source/WebKit/Android.mk.
Android NDK: But this module was already defined by jni/Source/WebKit/Android.mk.
/cygdrive/e/android-ndk-r7/build/core/build-module.mk:34: *** Android NDK: Aborting. . Stop.
I'm still trying to figure out how to solve this new error.

Categories

Resources