soumith / torch-android

Torch-7 for Android
BSD 3-Clause "New" or "Revised" License
275 stars 83 forks source link

build failed with ARCH=v7n and WITH_CUDA OFF #91

Open huyn opened 7 years ago

huyn commented 7 years ago

Building successfully with ARCH=v8 and WITH_CUDA OFF under macos, but failed with ARCH=v7n. What is the problem? Thanks

[ 53%] Linking C shared library ../../../../../../install/libs/armeabi-v7a/libTH.so
cd /Users/huyaonan/torch_project/torch-android/build/distro/pkg/torch/lib/TH && /usr/local/Cellar/cmake/3.7.2/bin/cmake -E cmake_link_script CMakeFiles/TH.dir/link.txt --verbose=1
/Users/huyaonan/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc  -fPIC -Wno-psabi --sysroot=/Users/huyaonan/android-ndk-r13b/platforms/android-21/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack -DDISABLE_POSIX_MEMALIGN -Werror=implicit-function-declaration -Werror=format -fopenmp -fopenmp -DTH_HAVE_THREAD -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG  -Wl,--no-undefined -Wl,-allow-shlib-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now  -shared -Wl,-soname,libTH.so -o ../../../../../../install/libs/armeabi-v7a/libTH.so CMakeFiles/TH.dir/THGeneral.c.o CMakeFiles/TH.dir/THHalf.c.o CMakeFiles/TH.dir/THAllocator.c.o CMakeFiles/TH.dir/THStorage.c.o CMakeFiles/TH.dir/THTensor.c.o CMakeFiles/TH.dir/THBlas.c.o CMakeFiles/TH.dir/THLapack.c.o CMakeFiles/TH.dir/THLogAdd.c.o CMakeFiles/TH.dir/THRandom.c.o CMakeFiles/TH.dir/THFile.c.o CMakeFiles/TH.dir/THDiskFile.c.o CMakeFiles/TH.dir/THMemoryFile.c.o CMakeFiles/TH.dir/THAtomic.c.o CMakeFiles/TH.dir/THVector.c.o  -L/Users/huyaonan/torch_project/torch-android/install/libs/armeabi-v7a -lm  "/Users/huyaonan/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libsupc++.a"
[ 53%] Built target TH
make: *** [all] Error 2
paramsen commented 7 years ago

Hi, you are using cmake 3.7.2 which could cause this. I just built v7 and v8 (both with and w/o CUDA) using cmake v3.2.2, give it a try.

huyn commented 7 years ago

Hi, @paramsen Thank your for your advice, I will have a try.