ImportError: dlopen with crdp.abi3.so, 0x0002: bad bind opcode 0x00
Looks like an error was introduced for MacOS with version 1.5.40. Running vision 1.5.39 works fine on my Mac with a M3 processor, but 1.5.40 give the following error:
(scs-soc-workflow-py3.12) chrismills@Chriss-MacBook-Pro scs-soc-workflow % scalene
Traceback (most recent call last):
File "/Users/chrismills/Library/Caches/pypoetry/virtualenvs/scs-soc-workflow-ypgl0ILn-py3.12/bin/scalene", line 5, in
Discussed in https://github.com/plasma-umass/scalene/discussions/820
Originally posted by fmamud April 29, 2024 Hello, trying to use scalene to profile my python 3.11 applications, but I'm facing an issue with it. Could you help me detected what could be wrong ? Many thanks.
λ ~/ python3 -m scalene -h
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/fmamud/.pyenv/versions/3.11.1/lib/python3.11/site-packages/scalene/__main__.py", line 4, in <module>
from scalene import scalene_profiler
File "/Users/fmamud/.pyenv/versions/3.11.1/lib/python3.11/site-packages/scalene/scalene_profiler.py", line 82, in <module>
from scalene.scalene_json import ScaleneJSON
File "/Users/fmamud/.pyenv/versions/3.11.1/lib/python3.11/site-packages/scalene/scalene_json.py", line 17, in <module>
from scalene.crdp import rdp
ImportError: dlopen(/Users/fmamud/.pyenv/versions/3.11.1/lib/python3.11/site-packages/scalene/crdp.abi3.so, 0x0002): bad bind opcode 0x00
OS info:
λ ~/ sw_vers
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224
```</div>
Same here
I'm looking into this... I've been seeing this dlopen error for MacOS >14.2.1...
We've seen this problem on the CI pipeline too but haven't yet been able to reproduce it locally, @ogencoglu what CPU and OS are you on?
I also have seen this documented in very very few places, one of the only others is in an issue report in the LIEF project
We've seen this problem on the CI pipeline too but haven't yet been able to reproduce it locally, @ogencoglu what CPU and OS are you on?
MacBook Pro M2
As it turns out, the issue is that you need Xcode >= 15.3 when running on MacOS > 14.2, and that's not default on the GitHub runners. I'll make a new release for this fix.