Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Error in building the code #4

Open
yxchng opened this issue Mar 14, 2019 · 1 comment
Open

Error in building the code #4

yxchng opened this issue Mar 14, 2019 · 1 comment

Comments

@yxchng
Copy link

yxchng commented Mar 14, 2019

I got the following error while building the code

Build command failed.
Error while executing process /home/yxchng/Android/Sdk/cmake/3.10.2.4988404/bin/cmake with arguments {--build /home/yxchng/git/new3/pytorch-android/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target native-lib}
[1/4] Building C object CMakeFiles/cpufeatures.dir/home/yxchng/Android/Sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c.o
[2/4] Linking C static library libcpufeatures.a
[3/4] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
FAILED: CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
/home/yxchng/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi22 --gcc-toolchain=/home/yxchng/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/yxchng/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dnative_lib_EXPORTS -I/home/yxchng/Android/Sdk/ndk-bundle/sources/android/cpufeatures -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -stdlib=libc++ -frtti -fexceptions -std=c++11 -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -MF CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -c ../../../../src/main/cpp/native-lib.cpp
In file included from ../../../../src/main/cpp/native-lib.cpp:8:
In file included from ../../../../src/main/cpp/caffe2/core/operator.h:18:
In file included from ../../../../src/main/cpp/caffe2/core/operator_gradient.h:7:
../../../../src/main/cpp/caffe2/utils/proto_utils.h:58:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
In file included from ../../../../src/main/cpp/native-lib.cpp:16:
In file included from ../../../../src/main/cpp/ATen/ATen.h:11:
../../../../src/main/cpp/ATen/Functions.h:3441:66: error: too few arguments to function call, expected 4, have 3
return detail::infer_type(self).as_strided(self, size, stride);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../../../src/main/cpp/ATen/core/Type.h:208:3: note: 'as_strided' declared here
virtual Tensor as_strided(const Tensor & self, IntList size, IntList stride, c10::optional<int64_t> storage_offset) const = 0;
^
In file included from ../../../../src/main/cpp/native-lib.cpp:16:
In file included from ../../../../src/main/cpp/ATen/ATen.h:11:
../../../../src/main/cpp/ATen/Functions.h:3444:67: error: too few arguments to function call, expected 4, have 3
return detail::infer_type(self).as_strided_(self, size, stride);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../../../src/main/cpp/ATen/core/Type.h:209:3: note: 'as_strided_' declared here
virtual Tensor & as_strided_(Tensor & self, IntList size, IntList stride, c10::optional<int64_t> storage_offset) const = 0;
^
In file included from ../../../../src/main/cpp/native-lib.cpp:16:
In file included from ../../../../src/main/cpp/ATen/ATen.h:11:
../../../../src/main/cpp/ATen/Functions.h:5243:37: error: no member named 'potrs' in 'at::TypeExtendedInterface'
return detail::infer_type(self).potrs(self, input2, upper);
~~~~~~~~~~~~~~~~~~~~~~~~ ^
1 warning and 3 errors generated.
ninja: build stopped: subcommand failed.

@cedrickchee
Copy link
Owner

What is the Android NDK version?

I have not tested with CMake 3.10.2. I'm using NDK r18 and CMake 3.6.

I'm not too sure what caused this error.

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

No branches or pull requests

2 participants