NDK build error with cygwin - android

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

Related

webrtc_android native api not find the AppRTCMobile example

I'm on ubuntu 16.04 and try to install on my lollipop 5.1 tablet, native api webrtc example (AppRtcMobile example).
I successfully installed chromium on my lollipop device. Now after removing the folders used to install chromium on the lollipop device from the ubuntu pc I'm trying to compile an example project about webrtc using the grandle system or adb at the command line. But the compilation always stops at the same point.
Unfortunately, I'm new to git, ninja, fetch and gn, so I do not understand where the error is.
I follow the procedure that I describe below (as I understand that the commands work) and create 3 different installation directories so as to install even on devices other than "arm".
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/my-path/to/depot_tools
mkdir ~/webrTEST && cd ~/webrtcTEST
fetch --nohooks webrtc_android
gclient sync
./build/install-build-deps.sh
gn gen out/DebugArm --args='target_os="android" target_cpu="arm"'
gn gen out/DebugArm64 --args='target_os="android" target_cpu="arm64"'
gn gen out/DebugX64 --args='target_os="android" target_cpu="x64"'
ninja -C out/DebugArm
ninja -C out/DebugArm64
ninja -C out/DebugX64
. build/android/envsetup.sh
ninja -C out/DebugX64 AppRTCMobile
I try to study more than one "tutorial" and the offial guide too, but ninja retur everytime the same result:
myuser#mymachine:~~/webrtcTEST/src$ ninja -C out/DebugX64 AppRTCMobile
ninja: Entering directory `out/DebugX64'
ninja: no work to do.
Anyone can suggest my where is/sre my error?
regards
bkt
UPDATE:
using ls command not find AppRTCMobile but other app example or other ...
the command:
ninja -C out/DebugX64 :xxxx/xxxx/xxxx
work great ... so at these point the question change into:
where is the old AppRTCMobile example located or which is the new name of the example that allows me to android lollipop to use the server google appr.tc ??
Any how if in my manner of install the webrtc-android git there are some error please help my to find it.
regards
bkt
I did not understand the reason, but by deleting everything and re executing the procedure written in the application I got the desired result and I compiled AppRTCMobile.

ics-openvpn : how to compile on windows machine

I get the latest source code on here :ics-openvpn and I want to compile it under windows environment. As in README.txt said :
Do cd main;./misc/build-native.(sh|bat) in the root directory of the
project. After that build the project using "gradle build" (Or use
Android Studio). The project is converted to gradle and building with
Eclipse is no longer supported.
But the content of file build-native.bat is:
#echo on
echo Currently broken, feel free to fix and send me a patch, see .sh file
exit 1
call ndk-build APP_API=all -j 8
cd libs
mkdir ..\assets
mkdir ..\build\
for /D %%f in (*) do (
copy %%f\minivpn ..\assets\minivpn.%%f
del %%f\libcrypto.so
del %%f\libssl.so
mkdir ..\build\native-libs\%%f\
copy %%f\*.so ..\build\native-libs\%%f\
)
cd ..
it means that author notices that this bat file contains error, that cannot be build by this. I try to remove first three lines and run again, i meet these errors:
main//jni/Android.mk:11: lzo/Android.mk: no such file or directory
main/jni/android.mk : 12: snappy/Android.mk : no such file or
directory ...
so, my question is : can we build this library on windows (because author has notified that this build file is error), and if can, how ?
Thanks :)
It is just like the text says. It is broken because I don't develop on Windows. You can look at the build-native.sh fix the paths etc for Windows. The build problems are nothing difficult but someone has to take the 10 minutes and fix it.
I got all sorts of errors using Cygwin to build this.
You may have more luck using an actual Linux box or something like VirtualBox with an Ubuntu image.
This worked for me. You will need the Linux NDK (installation instructions here) and you'll need to install make with sudo apt-get install make.
Then run cd main;./misc/build-native.sh from the project root.

Issues building tess-two via osx command line

I am currently attempting to build tess-two for an OCR android application via command line as instructed on https://github.com/rmtheis/tess-two. This is done on my macbook, OSX 10.9.4.
In order to build tess-two, this must be typed into command line:
$ 1git clone git://github.com/rmtheis/tess-two tess
$ cd tess
$ cd tess-two
$ ndk-build
$ android update project --path .
$ ant release
I encountered a problem as soon as I enter:
$ android update project --path .
This is the error displayed:
-bash: android: command not found
I have spend many hours trying to remedy this, and so far nothing fruitful has come of it. I appreciate any suggestions. Thanks.
This means the android command is not in your PATH. Try typing which android. It should give you the location if it is within your PATH.
Usually android can be found in your SDK directory under tools
You've got two options:
run the command with your_sdk_path/tools/android update project --paht
add android to your PATH with
export PATH=$PATH:/your_sdk_path/tools
You must have downloaded Android Development Toolkit bundle first. https://developer.android.com/sdk/index.html?hl=sk#mac-bundle
Then add /sdk/tools to your path.
I hope you know how to configure your path. If you are not sure please have a look at this : http://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/

cygwin on windows does not recognize make -v not found

I'm following an android tutorial on ndk and I am trying to run the following command within cygwin
$make - v
but I get the following message:
bash: make: command not found
Can anyone help ?
Launch the setup. Search the packages for "make" and install them...
You should not use cygwin to run ndk-build in NDK version 6 and above. Use ndk-build.cmd from CMD prompt instead. Anyways, NDK contains its own rebuilt make executable on all platforms, which should be used with ndk build scripts.

Updating HelloJni example

This is probably a very easy question but since I am new to Cygwin and Ant, this annoyed me a lot.
Basically, I am trying to test hello-jni example that comes with NDK ( I use r8 currently).
I have set my paths and everything is working fine. However, when I simply cd to the sample directory and try to update the project, I get the following error.
Same error pops up when I actually append the path after -p
$ android.bat update project -p .
Error: The project either has no target set or the target is invalid.
Please provide a --target to the 'android.bat update' command.
ndk-build is working fine but whenever I try to install using Ant, I get the build.xml is missing error inevitably.
Thanks.
run this command
android update project -p . -s --target android-14

Categories

Resources