-
-
Notifications
You must be signed in to change notification settings - Fork 55.9k
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
aarch64: libgomp.so.1: cannot allocate memory in static TLS block #14884
Comments
I can now confirm that OpenCV 3.2 built with openmp is working fine on the exact same platform. |
I just wanted to point that it is not necessary to enable TBB or OpenMP in order to enable multicore support. Default pthreads backend can be good enough for most situations. |
I have the same issue. |
I had a similar issue where I could import cv2 in consol but not in a script. I was importing tensorflow before cv2. For some reason switching the order (importing cv2 first) worked. Not sure why - but if it helps someone else 👍 |
I had the same problem on Nvidia Jetson Nano device. |
it's working to me. Thanks |
no idea why, fixed it for me too |
have you tried |
It is working to me. Thank you |
Most likely cause here
Three possible solutions:
|
Hello, No solution abve work for me... In jupyter I got the same error while importing CV2 and it works under python shell. I try to import tensorflwo first, try to preload the library... Do you have another solution please ?? Thanks |
I have the same issues as you , export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1 dosen't work in Jupyter , it is so werid . |
Hi @AlexandreBourrieau @yipenglinoe,
|
@chitoku For some reason, this is still a problem, and this was the only solution that helped me. I did not realize it was a jupyterlab problem until I tried this answer. Thanks, this helped my issue! |
in my case, it is: export LD_PRELOAD=/home/f/.local/lib/python3.6/site-packages/sklearn/__check_build/../../scikit_learn.libs/libgomp-d22c30c5.so.1.0.0 I find the full path according to the error message like this:
|
Ran into this recently, and since I really don't like the messy "change import order" approach, nor do I want to rely on preloads in my environment, I used a more explicit approach:
|
I experienced this issue, and tried the above solutions. However on closer inspection, I saw that the library causing the issue was using its own bundled version of I.e.:
Therefore when running the |
Importing from albumentations import Resize, Compose
from albumentations.pytorch.transforms import ToTensor
from albumentations.augmentations.transforms import Normalize
import cv2 |
I have experienced this problem on systems that have importing cv2 first then scikit-learn results in: Being that these two libraries are interchangeable this issue can be resolved by using a static link: cd /lib/pythonXXX/site-packages/scikit-learn.libs/ |
fwiw, I tried this solution (1, 2, or 1+2), but I still get :
I have well Parallel framework: TBB (ver 2020.2 interface 11102) though thus. it's with Jetson NX JP5.1 / ubuntu 20.04 / python3.8 / opencv 4.7.0 for any info. doing:
before import of cv2 (or in its |
There is an issue with glibc on Linux arm64 that causes dlopen errors when certain Python libraries are loaded in the "wrong" order. This seems to happen when some packages, such as scikit-learn, bundle their own copy of the libgomp library, but others do not. When this happens, the package import order matters, as noted in the following GitHub Issue threads: - opencv/opencv#14884 - keras-team/keras-tuner#317 The problematic libraries appear to be scikit-learn and Tensorflow, and the workaround is to make sure that `import sklearn` comes before `import tensorflow`. To this end, this commit updates the Python scripts for the Tensorflow examples to import scikit-learn early on, which ensures that the import order is correct.
I had opened 2 kernels and was importing opencv on both on jetson xavier nx. restarting kernels worked for me |
Problem is caused by this optional flag:
-DWITH_OPENMP=ON
Comment with workaround: #14884 (comment)
Comment with investigation: #14884 (comment)
Original description
I am compiling opencv from source in order to enable multi-core support on a aarch64 platform.
I am building open cv with the following config:
but every time I import it using python, I get the following error. A lot of the results on-line seems to be very vague and/or point towards a bug in gcc 4.2 fixed in 4.3 and I am currently on 8.x provided by debian repo and also 9.0.1 built from upstream source:
This is on opencv master branch as well as 4.0.1
The text was updated successfully, but these errors were encountered: