getting error when running ndk-build i cygwin - android

when i trying to running the command code ndk-build ,the error prompt out like this
leo#leo-PC /cygdrive
$ ndk-build
/bin/sh: NUL: No such file or directory
Error: Current working directory is a virtual Cygwin directory which does
not exist for a native Windows application.
Can't start native Windows application from here.
make: execvp: /cygdrive/c/Users/leo/Desktop/android/android-ndk-r9d/prebuilt/windows-x86_64/bin/awk.exe: Not a directory
Android NDK: Host 'awk' tool is outdated. Please define NDK_HOST_AWK to point to Gawk or Nawk !
/cygdrive/c/Users/leo/Desktop/android/android-ndk-r9d/build/core/init.mk:377: *** Android NDK: Aborting. . Stop.
i had following all the step here https://developer.vuforia.com/resources/dev-guide/step-1-setting-development-environment-android-sdk and also crated the windows path for them but i still facing this problem .

Related

Trouble cross compiling Python

I'm trying to cross compile Python 3.7.3 to run on Android. Before the updates to the NDK to remove gcc, I had been building Python 3.5.1 without any problems in this git project. https://github.com/GRRedWings/python3-android/tree/clang
The Python build recipe can be found here https://github.com/GRRedWings/python3-android/blob/clang/mk/python/3.7.3/build.sh, with many of the exports having been set in env of the root, and build_single.sh in the mk directory.
Trying to update the to the latest NDK, and running into issues, I was unable to get any support with the older version of Python. I'm hoping that someone who understand cross compiling and configure scripts might be able to point me in the right direction.
Here is my output when I call configure
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `.'
OUR TARGET IS aarch64-linux-android
configure: loading site script ./config.site
checking build system type... x86_64-pc-linux-gnu
checking host system type... aarch64-unknown-linux-android
checking for python3.7... no
checking for python3... python3
checking for python interpreter for cross build... configure: error: python3.7 interpreter not found
Makefile:34: recipe for target 'python-3.7.3' failed
make: *** [python-3.7.3] Error 1
So my question is, what and where should I be focusing. Should I be looking into the configure error saying python3.7 interpreter not found? Should I be looing in the config.log? The only error I see in there is about the interpreter.
Although it is an old question, I have solved it. It seems strange that if you do a cross-compiling, you need to install a local version of python with the same minor version. It is to say that if you want to build Python 3.7.x, you need to install a local version of Python 3.7.x on your build machine. I do it by using pyenv.

Compiling and installing OpenSSH android NDK

hi i am following this guide (https://wiki.openssl.org/index.php/Android) on compiling and installing OpenSSH for Android NDK and get the following error when i execute this command:
sudo -E make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib
The error below:
make[1]: Nothing to be done for `install'.
making install in tools...
installing libcrypto.a
/bin/sh: /arm-linux-androideabi-ranlib: No such file or directory
Am not sure where it is trying to find this file or what this file is?
I had to execute export ANDROID_TOOLCHAIN= /path/to/toolchain again as the setEnv-android.sh did not set the toolchain environment for some odd reason

Command failed: ./distribute.sh -m "kivy" -d

I am trying to follow the instructions on https://kivy.org/docs/guide/packaging-android-vm.html to create kivy android applications. I installed Kivy Buildozer VM and was following instructions on the Readme file. Created the buildozer.spec file using buildozer init command but buildozer android debug is failing with following output
(cd /media/sf_virtual_box/organizer/2nd_vid_tute/step07_padding/.buildozer/android/platform/python-for-android/build/python-install/bin; ln python2.7 python)
ln: failed to create hard link ‘python’ => ‘python2.7’: Operation not permitted
make: *** [bininstall] Error 1
Leaving ARM environment
cp: cannot stat ‘build/lib.*-2.7/_ctypes*.so’: No such file or directory
# Command failed: ./distribute.sh -m "kivy" -d "myapp1"
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
How can I fix this?
This will occur if the kivy project on the Virtual Machine is in a shared folder with the host machine.
(In my case the host is Windows.)
If this is the case, try copying the kivy project folder to /home/, and make sure this is not shared.
Make sure the permissions are set to 777.

How do you define the NDK installation that ndk-build uses?

How do you define the NDK installation that ndk-build uses? I used the r10e build for a good while, then updated my NDK and modified my $PATH to point to the new location, but when I build using the ndk-build command in Terminal it still uses the older android-ndk-r10e version.
I know this because I use the NDK_LOG=1 option when invoking ndk-build and it produces the following verbose information as it builds my project. Notice the references to "/NDKDev/android-ndk-r10e". That's my old installation.
~/Documents/MyNDKProject-- $ ndk-build NDK_LOG=1
HOST_OS=darwin
HOST_ARCH=x86_64
HOST_TAG=darwin-x86_64
GNUMAKE=/Users/user1/Documents/NDKDev/android-ndk-r10e/prebuilt/darwin-x86_64/bin/make (NDK prebuilt)
Android NDK: NDK installation path auto-detected: '/Users/user1/Documents/NDKDev/android-ndk-r10e'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: darwin
Android NDK: Host operating system detected: darwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to darwin-x86
Android NDK: Host tools prebuilt directory: /Users/user1/Documents/NDKDev/android-ndk-r10e/prebuilt/darwin-x86_64/bin
Android NDK: Host 'echo' tool: echo
. . .
Also note that when I enter echo $PATH at the Terminal prompt it gives:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin/:/sbin:/usr/local/bin:/Applications/android-sdk-macosx/ndk-bundle:/Applications/android-sdk-macosx
and where you see /Applications/android-sdk-macosx/ndk-bundle is exactly where it used to refer to the android-ndk-r10e path, so I'm certain I've updated my PATH successfully. So anyhow, IF the PATH environment variable is not what ndk-build uses to determine the NDK installation to use, what does it use, and how can I modify it so that it uses my new installation which is at:
/Applications/android-sdk-macosx/ndk-bundle
Fixed. The problem was that when the .bash_profile file is successfully sourced in a given Terminal session it does not have any effect on other instances of Terminal that are open. I had two instances of Terminal open and because I hadn't closed the one with which I was calling ndk-build the changes to .bash_profile weren't being applied.

NDK build error with cygwin

i am tying to build a tesseract project to use as a library for my project. I am getting this error with cygwin when trying to build on windows 7 with User Account Controls turned off.
$ /cygdrive/c/android-ndk-r8/ndk-build
SharedLibrary : liblept.so
C:/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libgnustl_static.a: No such file: Permission denied
collect2: ld returned 1 exit status
/cygdrive/c/android-ndk-r8/build/core/build-binary.mk:369: recipe for target `obj/local/armeabi/liblept.so' failed
make: *** [obj/local/armeabi/liblept.so] Error 1
please let me know what i should do to build the project.
Sorry It's my first time answering a question.
I was having a same issue as yours.
Then I solve it using cygwin bash with command: $ chmod -R 777 /cygdrive/c/android/workspace
C:/Android/workspace is my Eclipse work space.
Some one here gave me the insight
A lot of people have struggled with compiling tesseract under Windows, and Cygwin is normally suggested, however its often not necessary.
Have you tried looking at the tess-two project on github? Its tesseract wrapped with some handy android classes, compiling a running is simply a case of :
git clone git://github.com/rmtheis/tess-two tess
cd tess
cd tess-two
ndk-build
android update project --path .
ant release
I've been able to compile the above on 3 windows7 machines, a mac, and ubuntu without any issues.
if you're developing under windows, go to the file, and change it's premissions to full control.
it will be in /obj dir

Categories

Resources