mgiessing opened a new issue #20885:
URL: https://github.com/apache/incubator-mxnet/issues/20885


   ## Description
   When I build mxnet python3 wheel for ppc64le architecture everything seems 
to work in the build container, but if I install the wheel somewhere else 
(besides the build container) it throws errors about not finding libraries. 
Usually those issues are handled via `auditwheel repair --plat ...` but it 
seems like the packaging is still wrong for mxnet.
   
   ### Error Message
   
   
   
   ```
   >>> import mxnet
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/usr/local/lib/python3.7/site-packages/mxnet/__init__.py", line 23, 
in <module>
       from .context import Context, current_context, cpu, gpu, cpu_pinned
     File "/usr/local/lib/python3.7/site-packages/mxnet/context.py", line 23, 
in <module>
       from .base import classproperty, with_metaclass, 
_MXClassPropertyMetaClass
     File "/usr/local/lib/python3.7/site-packages/mxnet/base.py", line 356, in 
<module>
       _LIB = _load_lib()
     File "/usr/local/lib/python3.7/site-packages/mxnet/base.py", line 341, in 
_load_lib
       lib_path = libinfo.find_lib_path()
     File "/usr/local/lib/python3.7/site-packages/mxnet/libinfo.py", line 73, 
in find_lib_path
       'List of candidates:\n' + str('\n'.join(dll_path)))
   RuntimeError: Cannot find the MXNet library.
   List of candidates:
   /usr/local/lib/python3.7/site-packages/mxnet/libmxnet.so
   /usr/local/lib/python3.7/site-packages/mxnet/../../lib/libmxnet.so
   /usr/local/lib/python3.7/site-packages/mxnet/../../build/libmxnet.so
   ../../../libmxnet.so
   ```
   
   This issue happens if i install the wheel in a `python:3.7` container via 
`pip3 install 
mxnet-1.9.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl `
   
   ## To Reproduce
   
   ### 1 Start build container:
   
   `docker run -ti --rm quay.io/pypa/manylinux2014_ppc64le`
   
   ### 2 Build script:
   
   ```
   # prereqs
   
   yum install -y epel-release centos-release-scl
   yum install -y git make ninja-build automake autoconf libtool 
protobuf-compiler protobuf-devel atlas-devel \
       openblas-devel lapack-devel opencv-devel openssl-devel zeromq-devel
   
   git clone -b 1.9.0 --recursive https://github.com/apache/incubator-mxnet.git 
mxnet && cd mxnet
   
   # build library
   mkdir build && cd build
   cmake \
       -DUSE_CUDA=0 \
       -DBLAS=open \
       -DUSE_OPENCV=1 \
       -GNinja \
       ..
   
   ninja install
   
   # build python binding
   
   export MXNET_LIBRARY_PATH=/mxnet/build/libmxnet.so
   cd /mxnet/python
   /opt/python/cp37-cp37m/bin/python3 setup.py bdist_wheel
   auditwheel repair --plat manylinux2014_ppc64le 
dist/mxnet-1.9.0-py3-none-any.whl
   ```
   
   ## What have you tried to solve it?
   
   1. Try to deal with the packaging, because libmxnet.so is clearly there, but 
in another path:
   
   ```
   root@ba0e68cb213a:~# find /usr -name "libmxnet.so"
   /usr/local/mxnet/libmxnet.so
   ```
   
   ## Environment
   
   I'm building on manylinux2014_ppc64le and using it on "regular" 
docker.io/python:3.7 container
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to