You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/16 16:59:19 UTC
[GitHub] TeXniKK opened a new issue #13303: mxnet-cpp package
cross-compilation fails with OSError: "wrong ELF class: ELFCLASS32"
TeXniKK opened a new issue #13303: mxnet-cpp package cross-compilation fails with OSError: "wrong ELF class: ELFCLASS32"
URL: https://github.com/apache/incubator-mxnet/issues/13303
## 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
```
What to do:
1. Configure Buildroot for target system
2. Add MxNet as a CMake Buildroot package
3. Compile package
```
## 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:
>>> mxnet 1.3.0 Building
....
[ 86%] Building C object CMakeFiles/mxnet.dir/dummy.c.o
[ 93%] Built target mxnet_unit_tests
[ 93%] Linking CXX shared library libmxnet.so
[ 93%] Built target mxnet
Scanning dependencies of target cpp_package_op_h
Running: OpWrapperGenerator.py
Traceback (most recent call last):
File "OpWrapperGenerator.py", line 428, in <module>
raise(e)
OSError: buildroot/output/build/mxnet-1.3.0/libmxnet.so: wrong ELF class: ELFCLASS32
cpp-package/CMakeFiles/cpp_package_op_h.dir/build.make:58: recipe for target 'cpp-package/CMakeFiles/cpp_package_op_h' failed
make[4]: *** [cpp-package/CMakeFiles/cpp_package_op_h] Error 1
CMakeFiles/Makefile2:541: recipe for target 'cpp-package/CMakeFiles/cpp_package_op_h.dir/all' failed
make[3]: *** [cpp-package/CMakeFiles/cpp_package_op_h.dir/all] Error 2
## Minimum reproducible example + Steps to reproduce
1. Configure Buildroot for target system
2. 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))
3. Compile package
## What have you tried to solve it?
1. Checked OpWrapperGenerator.py source code. It tries to invoke Python of the *host* system (x86_64) and perform cdll.libmxnet = cdll.LoadLibrary(sys.argv[1]) for library built for *target*. Eventually host Python know nothing about ARM library format.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services