Armbian 编译MNN

cd /path/to/MNN
./schema/generate.sh

用以上命令进行编译,但是会在报错:

-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for strtof_l
-- Looking for strtof_l - found
fatal: No annotated tags can describe '73ad3413cc41a18b5097bef9d7ad40aafdde6b8f'.
However, there were unannotated tags: try --tags.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/anonymouslycn/MNN/3rd_party/flatbuffers/tmp
Scanning dependencies of target flatc
[  8%] Building CXX object CMakeFiles/flatc.dir/src/idl_parser.cpp.o
[  8%] Building CXX object CMakeFiles/flatc.dir/src/code_generators.cpp.o
[ 16%] Building CXX object CMakeFiles/flatc.dir/src/reflection.cpp.o
[ 16%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_text.cpp.o
[ 20%] Building CXX object CMakeFiles/flatc.dir/src/util.cpp.o
[ 25%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_cpp.cpp.o
[ 29%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_dart.cpp.o
[ 33%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_general.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
CMakeFiles/flatc.dir/build.make:86: recipe for target 'CMakeFiles/flatc.dir/src/idl_parser.cpp.o' failed
make[3]: *** [CMakeFiles/flatc.dir/src/idl_parser.cpp.o] Error 4
make[3]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/flatc.dir/all' failed
make[2]: *** [CMakeFiles/flatc.dir/all] Error 2
CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/flatc.dir/rule' failed
make[1]: *** [CMakeFiles/flatc.dir/rule] Error 2
Makefile:175: recipe for target 'flatc' failed
make: *** [flatc] Error 2


仔细看了一下,似乎是一个模块编译不过去,然后找到这个模块,进行单独编译,但是要在./schema/generate.sh修改,把rm去掉

arm的gcc和x86的就是不一样啊开了多线程就会报错!!!

anonymouslycn@aml:~/MNN/build$ make -j 4
*** done ***
[  0%] Built target MNN_SCHEMA
[  1%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBatchMatMul.cpp.o
[  1%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBatchToSpaceND.cpp.o
[  1%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBinary.cpp.o
[  1%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCast.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
CMakeFiles/MNN.dir/build.make:590: recipe for target 'CMakeFiles/MNN.dir/source/backend/cpu/CPUCast.cpp.o' failed
make[2]: *** [CMakeFiles/MNN.dir/source/backend/cpu/CPUCast.cpp.o] Error 4
make[2]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
CMakeFiles/MNN.dir/build.make:542: recipe for target 'CMakeFiles/MNN.dir/source/backend/cpu/CPUBatchToSpaceND.cpp.o' failed
make[2]: *** [CMakeFiles/MNN.dir/source/backend/cpu/CPUBatchToSpaceND.cpp.o] Error 4

^CCMakeFiles/MNN.dir/build.make:566: recipe for target 'CMakeFiles/MNN.dir/source/backend/cpu/CPUBinary.cpp.o' failed
make[2]: *** [CMakeFiles/MNN.dir/source/backend/cpu/CPUBinary.cpp.o] Interrupt
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/MNN.dir/all' failed
make[1]: *** [CMakeFiles/MNN.dir/all] Interrupt
Makefile:129: recipe for target 'all' failed
make: *** [all] Interrupt

怎么办呢,那就单线程呗。。。

anonymouslycn@aml:~/MNN/build$ make
*** done ***
[  0%] Built target MNN_SCHEMA
[  1%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBatchToSpaceND.cpp.o
[  1%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUBinary.cpp.o
[  1%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCast.cpp.o
[  2%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConcat.cpp.o
[  2%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConst.cpp.o
[  2%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConv2DBackPropFilter.cpp.o
[  3%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConvInt8.cpp.o
[  3%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConvolution.cpp.o
[  3%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConvolution3D.cpp.o
[  4%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUConvolutionDepthwise.cpp.o
[  4%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCosineSimilarity.cpp.o
[  4%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCrop.cpp.o
[  5%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUCropAndResize.cpp.o
[  5%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDeconvolution.cpp.o
[  5%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDeconvolutionDepthwise.cpp.o
[  6%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDepthToSpace.cpp.o
[  6%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDepthwiseConvInt8.cpp.o
[  6%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDequantize.cpp.o
[  7%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUDetectionOutput.cpp.o
[  7%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUEltwise.cpp.o
[  7%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUEltwiseInt8.cpp.o
[  8%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUElu.cpp.o
[  8%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUExpandDims.cpp.o
[  8%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUFill.cpp.o
[  9%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUFloatToInt8.cpp.o
[  9%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUGather.cpp.o
[  9%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUGatherV2.cpp.o
[ 10%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUInnerProduct.cpp.o
[ 10%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUInstanceNorm.cpp.o
[ 10%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUInt8ToFloat.cpp.o
[ 11%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUInterp.cpp.o
[ 11%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPULRN.cpp.o
[ 11%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPULSTM.cpp.o
[ 12%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUMatMul.cpp.o
[ 12%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUMoments.cpp.o
[ 12%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUNonMaxSuppressionV2.cpp.o
[ 13%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUNormalize.cpp.o
[ 13%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUOPRegister.cpp.o
[ 14%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUPack.cpp.o
[ 14%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUPadding.cpp.o
[ 14%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUPermute.cpp.o
[ 15%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUPool.cpp.o
[ 15%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUPoolGrad.cpp.o
[ 15%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUPoolInt8.cpp.o
[ 16%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUPriorbox.cpp.o
[ 16%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUProposal.cpp.o
[ 16%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUQuanConvolutionDepthwise.cpp.o
[ 17%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUQuantizedAdd.cpp.o
[ 17%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUQuantizedAvgPool.cpp.o
[ 17%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUQuantizedConcat.cpp.o
[ 18%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUQuantizedLogistic.cpp.o
[ 18%] Building CXX object CMakeFiles/MNN.dir/source/backend/cpu/CPUQuantizedMaxPool.cpp.o


你可能感兴趣的:(其他技术)