-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ImportError: unknown dlopen() error #17858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
numpy-team: your operating system |
We cannot reproduce without a mips machine and setting up the exact cross-compile environment you are using. But we may be able to help you work through what is going on. This is probably due to some confusion around the compiler used. The missing functions |
thanks for you reply. @mattip Python 3.8.4 (default, Dec 03 2020, 14:01:26)
Program terminated with signal SIGSEGV, Segmentation fault. |
or some compile options that I miss? So it cause that compiler fouse like "--fcompiler"? |
No, not connected to fcompiler. Apparently you cannot force GCC, you must work out what needs to be done for your particular compiler/platform combination. |
so any advices for it?
and it do not have npy_clear_floatstatus_barrier func |
If it enters that condition, the definition on line 748 should be compiled. What does this print for you (after building)? Note you can format the pasted code as "code" by selecting it with the mouse and clicking the "< >" tool in the toolbar.
|
@leidemon what's your CPU? I see your cpython is i386. |
|
sorry,I closed the problem by mistake. root@lwd-virtual-machine:~# cat /proc/cpuinfo processor : 1 processor : 2 processor : 3 |
the code will enter the line 748, does‘t’ it is used for Windows? it have the condition that "#if defined(_MSC_VER)" |
But seems your compiler is arm. |
I tried on mips and arm both to compare, and it also have problem in arm platform; and it do not crash but print import error in the arm /tmp/sda1/Python3/bin/python3.8: symbol 'npy_clear_floatstatus_barrier': can't resolve symbol /tmp/sda1/Python3/bin/python3.8: symbol 'npy_get_floatstatus_barrier': can't resolve symbol env-mips: |
@mattip |
I did |
|
1.19.4 has problem on arm. |
I am not sure what is going on. In the beginning you say you are cross-compiling to a MIPS processor, which fails to import NumPy with an error about missing symbols. Then you also try to install to an ARM machine, but that also fails? MIPS is a very different processor from ARM and the tools used for one cannot be used for the other. The build log you attached is for an ARM build, not for a MIPS build. |
I also found that Python 3.8.2 (default, Oct 2 2020, 10:45:41)
|
thank you for reply, |
thank you for reply,
|
Now we have three conversations going on here: MIPS, ARM, and M1. Each one should be discussed in a separate issue. It seems nothing is working for you which must be very frustrating. You might want to consider another channel for help, since this channel does not seem to be going anywhere useful. |
I will try another way to solve.thank you for your help. If I have some idea,I will update the issue. |
Okay, I will open a new issue for M1. |
pi@raspberrypi:~ $
NumPy version 1.21.0.dev0+20201209142152_bffb006 |
ok, you rollback the python 3.8.2 to 3.7.3 ? |
Python 3.7.3 is on Pi and 3.8.2 on Mac. Both are default settings. |
I try the NumPy 1.21.0.dev0 + 20201209142152_bffb006,it still failed。I think issue is adbout npymath in cross compile.but I have no idea to solve. |
I think so. You can build natively. |
but I need it to run in MIPS platform,I still have to cross compile it. |
#17807 (comment) |
thank you ,maybe I should try to use crossenv. |
Indeed, please use This issue is very polluted and I don't think there's anything actionable left, so I will close it. Thanks everyone for the discussion. |
Uh oh!
There was an error while loading. Please reload this page.
I test num-1.19.4 and python3.8 in arm platform,but I import numpy,it shows error as follow:
Python 3.8.4 (default, Nov 26 2020, 20:39:17)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_clear_floatstatus_barrier': can't resolve symbol
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_get_floatstatus_barrier': can't resolve symbol
Traceback (most recent call last):
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/init.py", line 22, in
from . import multiarray
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/multiarray.py", line 12, in
from . import overrides
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/overrides.py", line 7, in
from numpy.core._multiarray_umath import (
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/_multiarray_umath.py", line 7, in
bootstrap()
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/_multiarray_umath.py", line 6, in bootstrap
imp.load_dynamic(name,file)
File "/tmp/sda1/Python3/lib/python3.8/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: unknown dlopen() error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/init.py", line 140, in
from . import core
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/init.py", line 48, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
I see the https://numpy.org/devdocs/user/troubleshooting-importerror.html
but still stucked. hope numpy team to help.
Steps to reproduce:
Error message:
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_clear_floatstatus_barrier': can't resolve symbol
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_get_floatstatus_barrier': can't resolve symbol
I check the npy_get_floatstatus_barrier is in the .so;
admin@cmiot:/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core# grep -rsn
npy_get_floatstatus_barrier .
./include/numpy/npy_math.h:576:int npy_get_floatstatus_barrier(char*);
./lib/libnpymath.a:25255:npy_get_floatstatus_barrier
./lib/libnpymath.a:27039:npy_get_floatstatus_barrier
./_multiarray_tests.cpython-38-i386-linux-gnu.so:7437:npy_get_floatstatus_barrier
./_multiarray_tests.cpython-38-i386-linux-gnu.so:85216:npy_get_floatstatus_barrier
./_multiarray_tests.cpython-38-i386-linux-gnu.so:176223:npy_get_floatstatus_barrier
./_multiarray_umath.cpython-38-i386-linux-gnu.so:14860:npy_get_floatstatus_barrier
./_multiarray_umath.cpython-38-i386-linux-gnu.so:1492164:npy_get_floatstatus_barrier
./_multiarray_umath.cpython-38-i386-linux-gnu.so:3529524:npy_get_floatstatus_barrier
the PATH and PYTHONPATH is
PATH=/tmp/sda1/Python3/bin
PYTHONPATH=/tmp/sda1/Python3/lib/python3.8
The text was updated successfully, but these errors were encountered: