Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caffe-Android-Lib build issue #3

Closed
karthikeyan-kandasamy opened this issue Mar 26, 2015 · 2 comments
Closed

Caffe-Android-Lib build issue #3

karthikeyan-kandasamy opened this issue Mar 26, 2015 · 2 comments

Comments

@karthikeyan-kandasamy
Copy link

I need to build the Caffe-Android-Lib for this purpose I have followed the README.md instruction in
https://github.com/sh1r0/caffe-android-lib this link. I have successfully cloned the repo by this
git clone --recursive https://github.com/sh1r0/caffe-android-lib.git command
then I moved to the caffe-android-lib folder and have run this command
./build.py $(NDK_PATH) but it showed the error as below

inflating: OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCVModules_armeabi-relea se.cmake
Traceback (most recent call last): File "D:\Jamal\Others\Caffe_library\caffe-android-lib\build.py", line 113, in <module> main(sys.argv[1:]) File "D:\Jamal\Others\Caffe_library\caffe-android-lib\build.py", line 105, in main setup() File "D:\Jamal\Others\Caffe_library\caffe-android-lib\build.py", line 54, in s etup shutil.rmtree(OPENCV_TEMP_DIR) File "C:\Python34\lib\shutil.py", line 478, in rmtree return _rmtree_unsafe(path, onerror) File "C:\Python34\lib\shutil.py", line 373, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "C:\Python34\lib\shutil.py", line 371, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 5] Access is denied: 'OpenCV-2.4.9-android-sdk\\LICEN SE'
D:\Jamal\Others\Caffe_library\caffe-android-lib>

I have used the Windows7 64 bit machine & android-ndk-r8b

@sh1r0
Copy link
Owner

sh1r0 commented Mar 26, 2015

I have never built on Windows, but it seems that the error was caused by deletion. The file, OpenCV-2.4.9-android-sdk\\LICEN SE, could not be removed. Perhaps, you can have a check on that file. (FYI, I use ndk r9 on Mac & Ubuntu.)

Regarding the android demo app, please refer to your original issue.

@sh1r0 sh1r0 closed this as completed Mar 31, 2015
@karthikeyan-kandasamy
Copy link
Author

Now I tried to build the caffe android libby using Mac osx 10.9.5 & android-ndk-r10d
steps I followed
1.git clone --recursive https://github.com/sh1r0/caffe-android-lib.git cloned the source from this command
2.In terminal moved inside to this directory caffe-android-lib
3. Run the ./build.py $(NDK_PATH) script

{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural

\f0\fs22 \cf0 \CocoaLigature0 ownloading boost 1.55.0 please wait...
curl: (3) malformed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 357 100 357 0 0 52 0 0:00:06 0:00:06 --:--:-- 93
`\

\ <title>302 Found</title>\ \ \

302 Found

\ The resource was found at http://liquidtelecom.dl.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2;\ you should be redirected automatically.\ \ \ \ Failed to download boost! Please download boost 1.55.0 manually\ and save it in this directory as boost_1_55_0.tar.bz2\ Android NDK: WARNING:/Users/hubmaci7/Pictures/Hubino/Jamal/caffe/caffe-android-lib/caffe-mobile/jni/Android.mk:caffe: non-system libraries in linker flags: -lboost_random-gcc-mt-1_55 -lboost_math_tr1-gcc-mt-1_55 -lboost_system-gcc-mt-1_55 -lboost_thread-gcc-mt-1_55 -lboost_date_time-gcc-mt-1_55 \ Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES \ Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the \ Android NDK: current module \ [armeabi-v7a] Compile++ arm : caffe <= caffe.pb.cc\ [armeabi-v7a] Compile++ arm : caffe <= blob.cpp\ [armeabi-v7a] Compile++ arm : caffe <= common.cpp\ In file included from /Users/hubmaci7/Pictures/Hubino/Jamal/caffe/caffe-android-lib/caffe-mobile/jni/caffe/src/caffe/common.cpp:6:0:\ /Users/hubmaci7/Pictures/Hubino/Jamal/caffe/caffe-android-lib/caffe-mobile/jni/caffe/include/caffe/util/rng.hpp:7:45: fatal error: boost/random/mersenne_twister.hpp: No such file or directory\ #include "boost/random/mersenne_twister.hpp"\ ^\ compilation terminated.\ make: *** [/Users/hubmaci7/Pictures/Hubino/Jamal/caffe/caffe-android-lib/caffe-mobile/obj/local/armeabi-v7a/objs/caffe/caffe/src/caffe/common.o] Error 1\ Hubs-Mac-mini:caffe-android-lib hubmaci7$ \ }`

It showed error on downloading a boost.
So I downloaded boost_1_55_0.tar.bz2 manually and included into caffe-android-lib directory and extracted it. again
Run the ./build.py $(NDK_PATH) script
showed the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants