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

rk3399用clang编译 #7

Closed
corleonechensiyu opened this issue May 6, 2019 · 5 comments
Closed

rk3399用clang编译 #7

corleonechensiyu opened this issue May 6, 2019 · 5 comments

Comments

@corleonechensiyu
Copy link

corleonechensiyu commented May 6, 2019

pi@NanoPi-M4:/MNN/build$ cmake .. -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/clang
-- >>>>>>>>>>>>>
-- MNN BUILD INFO:
-- System: Linux
-- Processor: aarch64
-- DEBUG: OFF
-- Metal: OFF
-- OpenCL: OFF
-- OpenGL: OFF
-- Vulkan: OFF
-- OpenMP: ON
-- Hideen: TRUE
-- [*] searching .c
-- [
] searching .cc
-- [
] searching .cpp
-- [
] searching *.s .S
-- [
] Checking OpenMP
-- Found OpenMP_C: -fopenmp=libomp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp=libomp (found version "3.1")
-- Found OpenMP: TRUE (found version "3.1")
-- /home/pi/MNN/build/benchmark
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/MNN/build
pi@NanoPi-M4:
/MNN/build$ make -j4
Scanning dependencies of target MNN
[ 0%] Building C object CMakeFiles/MNN.dir/source/core/MNNMemoryUtils.c.o
[ 0%] Building CXX object CMakeFiles/MNN.dir/source/core/AutoTime.cpp.o
[ 1%] Building CXX object CMakeFiles/MNN.dir/source/core/Backend.cpp.o
[ 1%] Building CXX object CMakeFiles/MNN.dir/source/core/BackendFactory.cpp.o
[ 1%] Building CXX object CMakeFiles/MNN.dir/source/core/BufferAllocator.cpp.o
[ 2%] Building CXX object CMakeFiles/MNN.dir/source/core/Execution.cpp.o
[ 2%] Building CXX object CMakeFiles/MNN.dir/source/core/Interpreter.cpp.o
[ 3%] Building CXX object CMakeFiles/MNN.dir/source/core/Pipeline.cpp.o
[ 3%] Building CXX object CMakeFiles/MNN.dir/source/core/Schedule.cpp.o
[ 3%] Building CXX object CMakeFiles/MNN.dir/source/core/Session.cpp.o
[ 4%] Building CXX object CMakeFiles/MNN.dir/source/core/SizeComputer.cpp.o
[ 4%] Building CXX object CMakeFiles/MNN.dir/source/core/Tensor.cpp.o
[ 5%] Building CXX object CMakeFiles/MNN.dir/source/core/TensorUtils.cpp.o
[ 5%] Building CXX object CMakeFiles/MNN.dir/source/core/WrapExecution.cpp.o
[ 5%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUArgMax.cpp.o
[ 6%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUAsString.cpp.o
[ 6%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBackend.cpp.o
[ 7%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBatchMatMul.cpp.o
[ 7%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBatchToSpaceND.cpp.o
[ 7%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBinary.cpp.o
[ 8%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCast.cpp.o
[ 8%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConcat.cpp.o
[ 9%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConst.cpp.o
[ 9%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConvolution.cpp.o
[ 9%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConvolutionDepthwise.cpp.o
[ 10%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCrop.cpp.o
[ 10%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCropAndResize.cpp.o
[ 11%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDeconvolution.cpp.o
[ 11%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDeconvolutionDepthwise.cpp.o
[ 11%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDequantize.cpp.o
[ 12%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDetectionOutput.cpp.o
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
CONV_SETUP_KERNELSIZE(4);
^
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:36:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int dst_depth_quad = UP_DIV(output->channel(), KB)...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:36:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int dst_depth_quad = UP_DIV(output->channel(), KB)...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:38:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int src_z_step = input->width() * input->height() * KB...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:38:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int src_z_step = input->width() * input->height() * KB...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:39:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int src_batch_step = input->stride(0)...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:39:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int src_batch_step = input->stride(0)...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:42:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int dst_batch_step = output->stride(0)...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:42:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int dst_batch_step = output->stride(0)...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:56:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int strideX_step = strideX * KB...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:56:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int strideX_step = strideX * KB...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:57:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int weight_sy_step = KB * KB * kernel_width...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:57:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int weight_sy_step = KB * KB * kernel_width...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:58:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int weight_sz_step = KB * KB * kernel_width * kernel_height...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:58:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int weight_sz_step = KB * KB * kernel_width * kernel_height...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: unknown type name
'__unused'
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:59:5: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int weight_z_step = kernel_height * kernel_width * src_depth_qua...
^
/home/pi/MNN/include/MNNDefine.h:23:19: note: expanded from macro 'MNNUnused'
#define MNNUnused __unused
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: error: expected
unqualified-id
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:59:15: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
MNNUnused int weight_z_step = kernel_height * kernel_width * src_depth_qua...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:155:71: error: use of undeclared
identifier 'dst_depth_quad'; did you mean 'src_depth_quad'?
...= [this, width, height, count, tileCount, threadNumber, dst_depth_quad, kernelCo...
^~~~~~~~~~~~~~
src_depth_quad
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: note: 'src_depth_quad'
declared here
CONV_SETUP_KERNELSIZE(4);
^
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:37:9: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
int src_depth_quad = UP_DIV(input->channel(), KB)...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:156:53: error: use of undeclared
identifier 'src_z_step'
padX, padY, src_height, src_width, src_z_step, dilateX, dilateY...
^
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:168:39: error: use of undeclared
identifier 'dst_depth_quad'; did you mean 'src_depth_quad'?
for (int dz = 0; dz < dst_depth_quad; ++dz) {
^~~~~~~~~~~~~~
src_depth_quad
/home/pi/MNN/source/backend/cpu/CPUDeconvolution.cpp:148:5: note: 'src_depth_quad'
declared here
CONV_SETUP_KERNELSIZE(4);
^
/home/pi/MNN/source/backend/cpu/compute/ConvOpt.h:37:9: note: expanded from macro
'CONV_SETUP_KERNELSIZE'
int src_depth_quad = UP_DIV(input->channel(), KB)...
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
CMakeFiles/MNN.dir/build.make:710: recipe for target 'CMakeFiles/MNN.dir/source/backend/cpu/CPUDeconvolution.cpp.o' failed
make[2]: *** [CMakeFiles/MNN.dir/source/backend/cpu/CPUDeconvolution.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/MNN.dir/all' failed
make[1]: *** [CMakeFiles/MNN.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

@corleonechensiyu
Copy link
Author

使用aarch64-linux-gnu-gcc/g++ 没问题
(为啥不建一个qq群呀,学生不用钉钉。。。)

@deepbreath
Copy link

使用aarch64-linux-gnu-gcc/g++ 没问题
(为啥不建一个qq群呀,学生不用钉钉。。。)

阿里用腾讯QQ?

@li-qing
Copy link
Contributor

li-qing commented May 7, 2019

unused在较低版本的clang中无法直接使用,后续会改成__attribute((unused)).

@li-qing li-qing closed this as completed May 7, 2019
@liushuan
Copy link

liushuan commented Jun 5, 2019

为什么用的 交叉编译呢? 本地编译是否可以呢?

@alohali
Copy link

alohali commented Sep 16, 2019

使用aarch64-linux-gnu-gcc/g++ 没问题
(为啥不建一个qq群呀,学生不用钉钉。。。)

阿里用腾讯QQ?

做开源这就狭隘了
不行建个支付宝群= =!

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

No branches or pull requests

5 participants