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

"ck compile program:caffe-time" fails with Android NDK LLVM compiler #50

Open
psyhtest opened this issue Feb 1, 2017 · 2 comments
Open

Comments

@psyhtest
Copy link
Member

psyhtest commented Feb 1, 2017

$ ck compile program:caffe-time --target_os=android21-arm64

***************************************************************************************
Current directory: /home/anton/CK_REPOS/ck-caffe/program/caffe-time/tmp
***************************************************************************************

  -----------------------------------
  Resolving software dependencies ...

*** Dependency 1 = compiler (C++ compiler):

More than one environment found for "C++ compiler" with tags="compiler,lang-cpp" and setup={"target_os_bits": "64", "host_os_uoa": "linux-64", "targe
t_os_uoa": "android21-arm64"}:

0) Android NDK LLVM compiler - v3.8.256229 (64bits,android,compiler,host-os-linux-64,lang-c,lang-cpp,llvm,ndk,target-os-android21-arm64,v3,v3.8,v3.8.
256229 (1596e477e94d532c))
                                  - Depends on "ndk-gcc" (env UOA=efb43e42afb91d7b, tags="compiler,gcc,ndk", version=4.9.x)

1) Android NDK GCC compiler - v4.9.x (64bits,android,compiler,gcc,host-os-linux-64,lang-c,lang-cpp,ndk,target-os-android21-arm64,v4,v4.9,v4.9.0 (efb4
3e42afb91d7b))

Select one of the options for "C++ compiler" with tags="compiler,lang-cpp" and setup={"target_os_bits": "64", "host_os_uoa": "linux-64", "target_os_u
oa": "android21-arm64"} or press Enter for 0: 0

<...>

Executing prepared batch file tmp-cRTifS.sh ...

clang++ -c  -fPIE -pie -target aarch64-linux-android -gcc-toolchain /home/anton/data/android-ndk-r13b/toolchains/aarch64-linux-android-4.9/prebuilt/l
inux-x86_64 --sysroot=/home/anton/data/android-ndk-r13b/platforms/android-21/arch-arm64   -I../ -DANDROID_USE_OPENMP=ON -DBLAS=Open -DCPU_ONLY=ON -DU
SE_LMDB=OFF -DUSE_OPENCV=ON    -I/home/anton/data/android-ndk-r13b/toolchains/llvm/prebuilt/linux-x86_64/include -I/home/anton/CK_TOOLS/lib-caffe-bvl
c-master-cpu-trunk-android-ndk-4.9.x-android21-arm64/install/include -I/home/anton/CK_TOOLS/lib-gflags-2.2.0-android-ndk-4.9.x-android21-arm64/instal
l/include -I/home/anton/CK_TOOLS/lib-glog-development-android-ndk-4.9.x-android21-arm64/install/include -I/home/anton/CK_TOOLS/lib-openblas-0.2.19-an
droid-ndk-4.9.x-android21-arm64/install/include -I/home/anton/CK_TOOLS/lib-protobuf-3.1.0-android-ndk-4.9.x-android21-arm64/install/include -I/home/a
nton/CK_TOOLS/lib-opencv-development-android-ndk-4.9.x-android21-arm64/install/sdk/native/jni/include -I/home/anton/CK_TOOLS/lib-boost-1.62.0-android
-ndk-4.9.x-android21-arm64/install/include -I/home/anton/CK_TOOLS/lib-boost-1.62.0-android-ndk-4.9.x-android21-arm64/install/include -I/home/anton/CK
_TOOLS/lib-caffe-bvlc-master-cpu-trunk-android-ndk-4.9.x-android21-arm64/install/.build_release/src  ../caffe.cpp  -o caffe.o
clang++: warning: argument unused during compilation: '-pie'
../caffe.cpp:6:10: fatal error: 'cstring' file not found
#include <cstring>
         ^
1 error generated.
***************************************************************************************

Full log:
caffe-time.android21-arm64.llvm.txt

@psyhtest psyhtest assigned psyhtest and gfursin and unassigned psyhtest Feb 1, 2017
@psyhtest psyhtest added the bug label Feb 1, 2017
@gfursin
Copy link
Contributor

gfursin commented Feb 1, 2017

No, we do not support LLVM yet to compile whole Caffe. We need to use GCC. LLVM can currently compile only some sub packages. I would not yet bother with that right now. However, I didn't force GCC in CK, since on Windows it will be MVSC ...

@psyhtest
Copy link
Member Author

psyhtest commented Feb 2, 2017

Yeah, it was wishful thinking on my behalf :). Changing the labels to enhancement and help wanted.

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

No branches or pull requests

3 participants