dlib-android icon indicating copy to clipboard operation
dlib-android copied to clipboard

OSError: [Errno 2] No such file or directory when python build.py

Open serrokitskiy opened this issue 8 years ago • 9 comments

I'm following your instructions, but when doing '$ python build.py' I get: 2017-07-15 13 10 52

$ vim ~/.bashrc 2017-07-15 13 04 45

when I try '$ ndk-build' I get 2017-07-15 13 13 27

serrokitskiy avatar Jul 15 '17 09:07 serrokitskiy

@serrokitskiy , It seems that you didn't set up ndk correctly. Can you go to your ndk home to check if there is 'ndk-build' binary? If not, I suggest that you can download ndk from here. Download NDK from official website https://developer.android.com/ndk/downloads/index.html

tzutalin avatar Jul 17 '17 02:07 tzutalin

@tzutalin , I downloaded the NDK from the site. But nothing changed((( 2017-07-17 08 00 35

Do I need to change the NDK_PATH in the script? 2017-07-17 08 01 47

serrokitskiy avatar Jul 17 '17 05:07 serrokitskiy

2017-07-17 08 51 16

i will try $ bash than $ ndk-build and than $ python build.py 2017-07-17 08 44 23

serrokitskiy avatar Jul 17 '17 05:07 serrokitskiy

Hi @serrokitskiy , You have built it successfully. You can ignore the error. The error is caused because you didn't setup Android SDK, it cannot Android 'adb' tool.

tzutalin avatar Jul 17 '17 07:07 tzutalin

@tzutalin , Good. And how can I test the work of this library? Is there any code with which I can do this?

serrokitskiy avatar Jul 17 '17 08:07 serrokitskiy

I've solved same problem. You need to add path to adb in bashrc like this. export PATH=$PATH:/Users/Beomseok/Library/Android/sdk/platform-tools

cheetah132 avatar Dec 13 '17 11:12 cheetah132

Have you solved this problem? I'm still confused about it, both using build.py and using cmakelist.txt.

CMake Error at CMakeLists.txt:36 (add_library): Cannot find source file:

dlib/dlib/threads/threads_kernel_shared.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

(py2) G:\AndroidProject\dlib-android-master>python build.py We will use ABI:armeabi-v7a binaries to test ndk build arguments:['ndk-build', '-j4', 'NDK_LOG=1', 'NDK_DEBUG=0', 'V=0'] Traceback (most recent call last): File "build.py", line 208, in ndk_build(args) File "build.py", line 76, in ndk_build ret = subprocess.call(build_cmd) File "G:\Anaconda\envs\py2\lib\subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "G:\Anaconda\envs\py2\lib\subprocess.py", line 394, in init errread, errwrite) File "G:\Anaconda\envs\py2\lib\subprocess.py", line 644, in _execute_child startupinfo) WindowsError: [Error 2]

ElliotQi avatar Jan 08 '20 07:01 ElliotQi

I have solved the problem,but faced with new one by using ndk-build -j 2 : clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [obj/local/arm64-v8a/libandroid_dlib.so] Error 1

ElliotQi avatar Jan 08 '20 08:01 ElliotQi

Hi! @ElliotQi I am having the same issue as you mentioned with calling ndk-build by build.py. could you please explain how you got it solved? Thanks in advance!!

Fpooyan avatar Jul 18 '20 05:07 Fpooyan