Closed woreom closed 4 years ago
Hi @woreom, sorry for the issues you face. For the memory issues, you need to setup swap. It's mentioned in the guide you're following.
But in general it's better to just cross compile on a powerful machine. That's tested by our CI server and I added instructions to the website recently. Did you try it?
@leezu I have tried it but the first whl I made did not work, I'm trying to make it again.
also, after the result of #18501, I used ninja
to make mxnet although it resulted in the error
[1/2] Linking CXX executable im2rec
FAILED: im2rec
: && /usr/bin/g++ -Wall -Wno-sign-compare -O3 -fopenmp -O3 -DNDEBUG CMakeFiles/im2rec.dir/tools/im2rec.cc.o -o im2rec -Wl,-rpath,/mnt/USB/.mxnet/mxnet/build:/usr/local/lib /usr/lib/arm-linux-gnueabihf/libopenblas.so /usr/lib/arm-linux-gnueabihf/librt.so -llapack libmxnet.so 3rdparty/dmlc-core/libdmlc.a /usr/local/lib/libopencv_highgui.so.4.0.0 /usr/local/lib/libopencv_videoio.so.4.0.0 /usr/local/lib/libopencv_imgcodecs.so.4.0.0 /usr/local/lib/libopencv_imgproc.so.4.0.0 /usr/local/lib/libopencv_core.so.4.0.0 /usr/lib/gcc/arm-linux-gnueabihf/7/libgomp.so /usr/lib/arm-linux-gnueabihf/libpthread.so -lrt -ldl /usr/lib/arm-linux-gnueabihf/libopenblas.so /usr/lib/arm-linux-gnueabihf/librt.so -llapack && :
/usr/bin/ld: libmxnet.so: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: libmxnet.so: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: libmxnet.so: undefined reference to `__atomic_store_8'
/usr/bin/ld: libmxnet.so: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
[2/2] Linking CXX executable tests/mxnet_unit_tests
FAILED: tests/mxnet_unit_tests
: && /usr/bin/g++ -Wall -Wno-sign-compare -O3 -fopenmp -O3 -DNDEBUG tests/CMakeFiles/mxnet_unit_tests.dir/cpp/engine/engine_shutdown_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/engine/omp_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/engine/thread_local_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/engine/threaded_engine_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/kvstore/gpu_topology_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/misc/base.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/misc/libinfo_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/batchnorm_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/coreop_perf.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/dropout_perf.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/fully_conn_perf.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/krprod_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/mkldnn_operator_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/mkldnn_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/runner/core_op_runner_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/slice_channel_perf.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/tune/operator_tune_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/storage/storage_test.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/test_main.cc.o tests/CMakeFiles/mxnet_unit_tests.dir/cpp/thread_safety/thread_safety_test.cc.o -o tests/mxnet_unit_tests -Wl,-rpath,/mnt/USB/.mxnet/mxnet/build:/usr/local/lib lib/libgtest.a 3rdparty/dmlc-core/libdmlc.a /usr/lib/arm-linux-gnueabihf/libopenblas.so /usr/lib/arm-linux-gnueabihf/librt.so -llapack libmxnet.so 3rdparty/dmlc-core/libdmlc.a /usr/lib/gcc/arm-linux-gnueabihf/7/libgomp.so /usr/lib/arm-linux-gnueabihf/libpthread.so -lrt /usr/local/lib/libopencv_highgui.so.4.0.0 /usr/local/lib/libopencv_videoio.so.4.0.0 /usr/local/lib/libopencv_imgcodecs.so.4.0.0 /usr/local/lib/libopencv_imgproc.so.4.0.0 /usr/local/lib/libopencv_core.so.4.0.0 -ldl /usr/lib/arm-linux-gnueabihf/libopenblas.so /usr/lib/arm-linux-gnueabihf/librt.so -llapack && :
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/runner/core_op_runner_test.cc.o: in function `mxnet::test::OperatorRunner<mxnet::test::op::CoreOpProp, mxnet::test::op::CoreOpExecutor<float, float> >::TimingTest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, int, unsigned int, std::vector<mxnet::TShape, std::allocator<mxnet::TShape> > const&, bool) [clone .constprop.1100]':
core_op_runner_test.cc:(.text+0x487c): undefined reference to `__atomic_load_8'
/usr/bin/ld: core_op_runner_test.cc:(.text+0x48bc): undefined reference to `__atomic_load_8'
/usr/bin/ld: core_op_runner_test.cc:(.text+0x4a20): undefined reference to `__atomic_load_8'
/usr/bin/ld: core_op_runner_test.cc:(.text+0x4a38): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: core_op_runner_test.cc:(.text+0x4a44): undefined reference to `__atomic_load_8'
/usr/bin/ld: core_op_runner_test.cc:(.text+0x4a58): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `ACTIVATION_PERF_TimingCPU_Test::TestBody()':
activation_perf.cc:(.text+0x1bcc): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text+0x1c08): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text+0x1d70): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text+0x1d88): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: activation_perf.cc:(.text+0x1d94): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text+0x1da8): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `dmlc::LogCheckError dmlc::LogCheck_NE<std::atomic<unsigned long long>, unsigned int>(std::atomic<unsigned long long> const&, unsigned int const&)':
activation_perf.cc:(.text._ZN4dmlc11LogCheck_NEISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_[_ZN4dmlc11LogCheck_NEISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_]+0x1c): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN4dmlc11LogCheck_NEISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_[_ZN4dmlc11LogCheck_NEISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_]+0x84): undefined reference to `__atomic_load_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `dmlc::LogCheckError dmlc::LogCheck_EQ<std::atomic<unsigned long long>, unsigned int>(std::atomic<unsigned long long> const&, unsigned int const&)':
activation_perf.cc:(.text._ZN4dmlc11LogCheck_EQISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_[_ZN4dmlc11LogCheck_EQISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_]+0x1c): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN4dmlc11LogCheck_EQISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_[_ZN4dmlc11LogCheck_EQISt6atomicIyEjEENS_13LogCheckErrorERKT_RKT0_]+0x74): undefined reference to `__atomic_load_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `mxnet::test::perf::TimingInstrument::Info::Info(mxnet::test::perf::TimingInstrument::Info const&)':
activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument4InfoC2ERKS3_[_ZN5mxnet4test4perf16TimingInstrument4InfoC5ERKS3_]+0x34): undefined reference to `__atomic_load_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o:activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument4InfoC2ERKS3_[_ZN5mxnet4test4perf16TimingInstrument4InfoC5ERKS3_]+0x50): more undefined references to `__atomic_load_8' follow
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `mxnet::test::perf::TimingInstrument::stopTiming(int, unsigned int)':
activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument10stopTimingEij[_ZN5mxnet4test4perf16TimingInstrument10stopTimingEij]+0x1a4): undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument10stopTimingEij[_ZN5mxnet4test4perf16TimingInstrument10stopTimingEij]+0x450): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument10stopTimingEij[_ZN5mxnet4test4perf16TimingInstrument10stopTimingEij]+0x468): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument10stopTimingEij[_ZN5mxnet4test4perf16TimingInstrument10stopTimingEij]+0x47c): undefined reference to `__atomic_store_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument10stopTimingEij[_ZN5mxnet4test4perf16TimingInstrument10stopTimingEij]+0x490): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `mxnet::test::perf::TimingInstrument::startTiming(int, char const*)':
activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument11startTimingEiPKc[_ZN5mxnet4test4perf16TimingInstrument11startTimingEiPKc]+0xc0): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument11startTimingEiPKc[_ZN5mxnet4test4perf16TimingInstrument11startTimingEiPKc]+0x1a8): undefined reference to `__atomic_store_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `mxnet::test::perf::TimingInstrument::reset()':
activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5resetEv[_ZN5mxnet4test4perf16TimingInstrument5resetEv]+0xe0): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5resetEv[_ZN5mxnet4test4perf16TimingInstrument5resetEv]+0x108): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5resetEv[_ZN5mxnet4test4perf16TimingInstrument5resetEv]+0x2b8): undefined reference to `__atomic_store_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o: in function `void mxnet::test::perf::TimingInstrument::print<std::ostream>(std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x1a0): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x1b8): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x1e8): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x2b4): undefined reference to `__atomic_load_8'
/usr/bin/ld: activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x334): undefined reference to `__atomic_load_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/activation_perf.cc.o:activation_perf.cc:(.text._ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN5mxnet4test4perf16TimingInstrument5printISoEEvPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x368): more undefined references to `__atomic_load_8' follow
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/batchnorm_test.cc.o: in function `mxnet::test::perf::TimingInstrument::operator+=(mxnet::test::perf::TimingInstrument const&)':
batchnorm_test.cc:(.text._ZN5mxnet4test4perf16TimingInstrumentpLERKS2_[_ZN5mxnet4test4perf16TimingInstrumentpLERKS2_]+0x268): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: batchnorm_test.cc:(.text._ZN5mxnet4test4perf16TimingInstrumentpLERKS2_[_ZN5mxnet4test4perf16TimingInstrumentpLERKS2_]+0x274): undefined reference to `__atomic_load_8'
/usr/bin/ld: batchnorm_test.cc:(.text._ZN5mxnet4test4perf16TimingInstrumentpLERKS2_[_ZN5mxnet4test4perf16TimingInstrumentpLERKS2_]+0x288): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/coreop_perf.cc.o: in function `void RunCoreOpTimingTest<float>(bool, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, char const*, char const*) [clone .constprop.1096]':
coreop_perf.cc:(.text+0x2b84): undefined reference to `__atomic_load_8'
/usr/bin/ld: coreop_perf.cc:(.text+0x2bc0): undefined reference to `__atomic_load_8'
/usr/bin/ld: coreop_perf.cc:(.text+0x2d28): undefined reference to `__atomic_load_8'
/usr/bin/ld: coreop_perf.cc:(.text+0x2d40): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: coreop_perf.cc:(.text+0x2d4c): undefined reference to `__atomic_load_8'
/usr/bin/ld: coreop_perf.cc:(.text+0x2d60): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/dropout_perf.cc.o: in function `DROPOUT_PERF_TimingCPU_Test::TestBody()':
dropout_perf.cc:(.text+0x1fa4): undefined reference to `__atomic_load_8'
/usr/bin/ld: dropout_perf.cc:(.text+0x1fe0): undefined reference to `__atomic_load_8'
/usr/bin/ld: dropout_perf.cc:(.text+0x2148): undefined reference to `__atomic_load_8'
/usr/bin/ld: dropout_perf.cc:(.text+0x2160): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: dropout_perf.cc:(.text+0x216c): undefined reference to `__atomic_load_8'
/usr/bin/ld: dropout_perf.cc:(.text+0x2180): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/fully_conn_perf.cc.o: in function `FULLY_CONNECTED_FullyConnectedTimingCPU_Test::TestBody()':
fully_conn_perf.cc:(.text+0x20e8): undefined reference to `__atomic_load_8'
/usr/bin/ld: fully_conn_perf.cc:(.text+0x2124): undefined reference to `__atomic_load_8'
/usr/bin/ld: fully_conn_perf.cc:(.text+0x228c): undefined reference to `__atomic_load_8'
/usr/bin/ld: fully_conn_perf.cc:(.text+0x22a4): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: fully_conn_perf.cc:(.text+0x22b0): undefined reference to `__atomic_load_8'
/usr/bin/ld: fully_conn_perf.cc:(.text+0x22c4): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/slice_channel_perf.cc.o: in function `SLICE_CHANNEL_PERF_TimingCPU_Test::TestBody()':
slice_channel_perf.cc:(.text+0x1934): undefined reference to `__atomic_load_8'
/usr/bin/ld: slice_channel_perf.cc:(.text+0x194c): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: slice_channel_perf.cc:(.text+0x1958): undefined reference to `__atomic_load_8'
/usr/bin/ld: slice_channel_perf.cc:(.text+0x196c): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/tune/operator_tune_test.cc.o: in function `mxnet::test::tune::TuningTester<long long>::CalculateModeSort(mxnet::test::op::TimingDirection, bool) const':
operator_tune_test.cc:(.text._ZNK5mxnet4test4tune12TuningTesterIxE17CalculateModeSortENS0_2op15TimingDirectionEb[_ZNK5mxnet4test4tune12TuningTesterIxE17CalculateModeSortENS0_2op15TimingDirectionEb]+0x1f8): undefined reference to `__atomic_load_8'
/usr/bin/ld: operator_tune_test.cc:(.text._ZNK5mxnet4test4tune12TuningTesterIxE17CalculateModeSortENS0_2op15TimingDirectionEb[_ZNK5mxnet4test4tune12TuningTesterIxE17CalculateModeSortENS0_2op15TimingDirectionEb]+0x20c): undefined reference to `__atomic_load_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/tune/operator_tune_test.cc.o: in function `mxnet::test::tune::TuningTester<float>::CalculateModeSort(mxnet::test::op::TimingDirection, bool) const':
operator_tune_test.cc:(.text._ZNK5mxnet4test4tune12TuningTesterIfE17CalculateModeSortENS0_2op15TimingDirectionEb[_ZNK5mxnet4test4tune12TuningTesterIfE17CalculateModeSortENS0_2op15TimingDirectionEb]+0x1f8): undefined reference to `__atomic_load_8'
/usr/bin/ld: operator_tune_test.cc:(.text._ZNK5mxnet4test4tune12TuningTesterIfE17CalculateModeSortENS0_2op15TimingDirectionEb[_ZNK5mxnet4test4tune12TuningTesterIfE17CalculateModeSortENS0_2op15TimingDirectionEb]+0x20c): undefined reference to `__atomic_load_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/tune/operator_tune_test.cc.o: in function `mxnet::test::tune::TuningTester<mshadow::half::half_t>::CalculateModeSort(mxnet::test::op::TimingDirection, bool) const':
operator_tune_test.cc:(.text._ZNK5mxnet4test4tune12TuningTesterIN7mshadow4half6half_tEE17CalculateModeSortENS0_2op15TimingDirectionEb[_ZNK5mxnet4test4tune12TuningTesterIN7mshadow4half6half_tEE17CalculateModeSortENS0_2op15TimingDirectionEb]+0x1f8): undefined reference to `__atomic_load_8'
/usr/bin/ld: tests/CMakeFiles/mxnet_unit_tests.dir/cpp/operator/tune/operator_tune_test.cc.o:operator_tune_test.cc:(.text._ZNK5mxnet4test4tune12TuningTesterIN7mshadow4half6half_tEE17CalculateModeSortENS0_2op15TimingDirectionEb[_ZNK5mxnet4test4tune12TuningTesterIN7mshadow4half6half_tEE17CalculateModeSortENS0_2op15TimingDirectionEb]+0x20c): more undefined references to `__atomic_load_8' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
and libmxnet.so
was created so I installed it on my raspberry pi and got an error like this when importing it.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/mnt/USB/.mxnet/mxnet/python/mxnet/__init__.py", line 23, in <module>
from .context import Context, current_context, cpu, gpu, cpu_pinned
File "/mnt/USB/.mxnet/mxnet/python/mxnet/context.py", line 23, in <module>
from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
File "/mnt/USB/.mxnet/mxnet/python/mxnet/base.py", line 351, in <module>
_LIB = _load_lib()
File "/mnt/USB/.mxnet/mxnet/python/mxnet/base.py", line 342, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/lib/python3.7/ctypes/__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /mnt/USB/.mxnet/mxnet/python/mxnet/../../build/libmxnet.so: failed to map segment from shared object
@woreom are you trying to cross-compile now? I think you didn't specify the aarch64-linux-gnu-toolchain.cmake
file to cmake correctly?
@leezu this error is form compiling on raspberry pi, I have and am trying to cross-compile with no luck though because I'm not sure how to cross-compile with open-cv.
should I cross-compile opencv in the same location as Openblas ie /usr/local/aarch64-linux-gnu
@leezu ps I'm sorry for my bad english, I just get overwhelmed writing :))
@woreom yes, you can install the cross-compiled OpenCV to the same location as OpenBLAS.
Regarding above error: Please add the latomic as discussed in https://github.com/apache/incubator-mxnet/issues/18471#issuecomment-644292393 Currently I'm not sure why this line is needed for you on ARMv7 but our CI doesn't need it for ARMv7. Hopefully we can find a way to auto-detect it and users don't need to specify it.
Please also open a PR to update the Raspberry Pi install instructions to include information about this line.
I've had the same problem with the memory exhausting. It has to do with GNU compiler. The compiler is very memory hungry, especially when long chains off template code are involved. Even with 8 GByte of RAM, the compilation crashes. The solution is using the Clang compilers temporarily when installing MXNet on a 32-bits Raspberry Pi OS. The 64-bit OS didn't suffer from memory shortage. For a detailed discussion please look at https://qengineering.eu/install-mxnet-on-raspberry-pi-4.html
@Qengineering Thank you for your response, It seems that the CC compiler is the issue however I used GCC-4.9 to overcome it, I wanted to use OpenCV so I had to compile OpenCV with GCC-4.9, too (otherwise it won't work) also the latest python supported by raspbian is python3.7.3 which does not go well with mxnet and OpenCV, so I build python-3.7.4, again with GCC-4.9. I look around your post quit frequently they are really helpful, I can't believe I've missed this one and inflicted so much pain on myself :)))
Description
Okay this is the following of #18471 , I used the new instruction but I get an error still the latest would be
virtual memory exhausted: Cannot allocate memory ninja: build stopped: subcommand failed.
on the last 4 files (mxnet-1.6.0). I also tried other versions from 1.2.1 to 1.6.0 and all the prebuilds that were available (I think it was mxnet-1.5.0) . the all resulted in an error unfortunately I didn't save all the errors but here are some of them. version 1.6.0version 1.5.0
version 1.4.1
version 1.2.1
I need to finish my project and it's already passed its deadline. I kinda really need mxnet to finish it, I would appreciate it if you helped me with instructions on how to build, cross-compile or even make a prebuild that works on armv71. also, you can find more information on #18471