-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Segmentation fault on package import with macOS Python 3.7 interpreter #272
Comments
After further debugging, the segmentation fault is caused by |
This should be re-opened, we are seeing something very similar for our project. If someone wants to reproduce the error.
|
Your reproduction steps are not using our tools and your project uses Use: People often get this wrong. There'll be other problems, if you want smooth integration into the conda-forge ecosystem I recommend making a conda package and perhaps submitting it to conda-forge if there isn't one already. |
|
|
In this patch, I would probably change I believe this is most correct way to link a C++ Python extension module now-a-days, and in particular, within our ecosystem it is the only way we can support (since we build a mix of statically and dynamically linked Python interpreters, which is IMHO a good thing as it helps to shake out issues in projects' build systems, such as this one). |
As to reopening this, I'm against it. |
@mingwandroid Thanks! This will certainly help us understand the system and I (we) greatly appreciate your help. |
No problem, it was a pleasure. |
.. we should try to document this stuff because I've given the same recommendations before, ping @rrigdon. |
One thing to note is that |
Hi, I just noticed this when hunting down an issue we've had with conda, as opposed to singling out condo-forge on APPLE, I think you can ask python whether it was built shared or static:
This might help prevent headaches in the future. |
Fixes stanford-centaur/pono#92 It seems that the `target_link_libraries_with_dynamic_lookup` logic doesn't properly discover this requirement on my version of macOS (10.15.6) and conda (conda 4.8.3). This uses the cmake command from conda-forge/python-feedstock#272 to read Py_ENABLE_SHARED. If this config var isn't set, we use `-undefined dynamic_lookup` rather than linking the python library directly
We are having issues importing our Python package, Sire, using the Python 3.7 interpreter from
conda-forge
, where a segmentation fault is immediately raised. (The issue seems to occur for all Python 3 versions that I've tested.) The segmentation fault does not occur using the Python 3.7 or 3.7m interpreters from python.org, or with a home-baked Python interpreter. See our issue report for further details.conda list
conda info
lldb backtrace
The text was updated successfully, but these errors were encountered: