dividiti / ck-caffe

Collective Knowledge workflow for Caffe to automate installation across diverse platforms and to collaboratively evaluate and optimize Caffe-based workloads across diverse hardware, software and data sets (compilers, libraries, tools, models, inputs):
http://cKnowledge.org
BSD 3-Clause "New" or "Revised" License
193 stars 40 forks source link

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

Open psyhtest opened 7 years ago

psyhtest commented 7 years ago
$ 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

gfursin commented 7 years ago

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 commented 7 years ago

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