Giter Site home page Giter Site logo

How to build caffe.so? about caffe-mobile HOT 4 CLOSED

lei9wang avatar lei9wang commented on July 22, 2024
How to build caffe.so?

from caffe-mobile.

Comments (4)

solrex avatar solrex commented on July 22, 2024 1

@lei9wang See src/jni/CMakeLists.txt, you should link android lib log.

from caffe-mobile.

lei9wang avatar lei9wang commented on July 22, 2024

I change STATIC to SHARED, then run ./tools/build_android.sh, the error as following:

95%] Linking CXX shared library ../../lib/libcaffe.so
CMakeFiles/caffe.dir/blob.cpp.o:blob.cpp:function caffe::LogMessage::print(): error: undefined reference to '__android_log_print'
CMakeFiles/caffe.dir/blob.cpp.o:blob.cpp:function caffe::Blob::sumsq_diff() const: error: undefined reference to '__android_log_print'
CMakeFiles/caffe.dir/blob.cpp.o:blob.cpp:function caffe::Blob::scale_diff(int): error: undefined reference to '__android_log_print'
CMakeFiles/caffe.dir/common.cpp.o:common.cpp:function caffe::cluster_seedgen(): error: undefined reference to '__android_log_print'
collect2: error: ld returned 1 exit status
src/caffe/CMakeFiles/caffe.dir/build.make:1632: recipe for target 'lib/libcaffe.so' failed
make[2]: *** [lib/libcaffe.so] Error 1
CMakeFiles/Makefile2:156: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

anyone can help give a guide?

from caffe-mobile.

lei9wang avatar lei9wang commented on July 22, 2024

I remove the __android_log_print temporarily, then Compiled successfully, thanks

from caffe-mobile.

lei9wang avatar lei9wang commented on July 22, 2024

@solrex ,thanks for your guide,
it's okay, refer to src/jni/CMakeLists.txt, I link android lib log in src/caffe/CMakeLists.txt

from caffe-mobile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.