Open TeXniKK opened 6 years ago
@mxnet-label-bot add [Build, CMake, ARM]
Thank you for submitting the issue! I'm labeling it so the MXNet community members can help resolve it.
Yes, interesting issue. @leleamol
@TeXniKK try to do the following as a workaround:
op.h
file.@lebeg , thanks for suggestion. I've slightly modified it, because removal of whole section will cause dependency failure of several MXNet modules.
This patch helped as a workaround:
index adff533..df8fa39 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -299,6 +299,8 @@ include_directories("3rdparty/tvm/include")
include_directories("3rdparty/dmlc-core/include")
include_directories("3rdparty/dlpack/include")
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/nnvm/include/nnvm DESTINATION ${CMAKE_INSTALL_INCLUDEDI$
+
# commented out until PR goes through
#if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dlpack)
# add_subdirectory(3rdparty/dlpack)
diff --git a/cpp-package/CMakeLists.txt b/cpp-package/CMakeLists.txt
index f7fbc77..fbe8c86 100644
--- a/cpp-package/CMakeLists.txt
+++ b/cpp-package/CMakeLists.txt
@@ -12,10 +12,12 @@ if(USE_CPP_PACKAGE)
MAIN_DEPENDENCY mxnet
DEPENDS mxnet ${CMAKE_CURRENT_SOURCE_DIR}/scripts/OpWrapperGenerator.py
COMMAND echo "Running: OpWrapperGenerator.py"
- COMMAND python OpWrapperGenerator.py $<TARGET_FILE:mxnet>
+# COMMAND python OpWrapperGenerator.py $<TARGET_FILE:mxnet>
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts
)
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet-cpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
if(NOT DO_NOT_BUILD_EXAMPLES)
add_subdirectory(example)
endif()
diff --git a/cpp-package/include/mxnet-cpp/op.h b/cpp-package/include/mxnet-cpp/op.h
new file mode 100644
index 0000000..69409cd
--- /dev/null
+++ b/cpp-package/include/mxnet-cpp/op.h
.... Copied code here.....
I'm glad you nailed it.
@lebeg yep, but still it will be nice to generate some permanent fix for it )
Description
mxnet-cpp package cross-compilation fails with OSError: "wrong ELF class: ELFCLASS32"
Environment info (Required)
Host system: Ubuntu 18.04.1 LTS 4.15.0-38-generic x86_64 Target system: ARM Cortex-A9 CPU
Build info (Required if built from source)
Compiler (gcc/clang/mingw/visual studio): arm-buildroot-linux-gnueabihf-gcc-7.3.0
MXNet commit hash: 85fefa8c7291b556057ae685a5883c3f6a175c18
Build config: -DBUILD_CPP_EXAMPLES=OFF -DUSE_MKLDNN=OFF \ -DTHREADS_PTHREAD_ARG=OFF -DUSE_OPENCV=OFF \ -DUSE_OPENMP=OFF -DUSE_CUDA=OFF -DUSE_CUDNN=OFF \ -DUSE_SSE=OFF -DUSE_CPP_PACKAGE=ON -DUSE_LIBJPEG_TURBO=OFF \ -DENABLE_CUDA_RTC=OFF
Error Message:
Minimum reproducible example + Steps to reproduce
Configure Buildroot for target system
Add MxNet as a CMake Buildroot package: MXNET_VERSION:=1.3.0 MXNET_SITE:=https://github.com/apache/incubator-mxnet.git MXNET_SITE_METHOD = git MXNET_GIT_SUBMODULES = YES MXNET_INSTALL_STAGING = YES MXNET_CONF_OPTS = -DBUILD_CPP_EXAMPLES=OFF -DUSE_MKLDNN=OFF \ -DTHREADS_PTHREAD_ARG=OFF -DUSE_OPENCV=OFF \ -DUSE_OPENMP=OFF -DUSE_CUDA=OFF -DUSE_CUDNN=OFF \ -DUSE_SSE=OFF -DUSE_CPP_PACKAGE=ON -DUSE_LIBJPEG_TURBO=OFF \ -DENABLE_CUDA_RTC=OFF $(eval $(cmake-package))
Compile package
What have you tried to solve it?