You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
what I found out is that , if we link against the wrong python library, it could result in crash when importing the extension in python.
I develop on Mac. when building python on mac, there are 2 options. option 1 is the default ./configure && make. This will build python into a conventional .so library.
another way is using the --enable-framework flag to build mac framework. the end result is a dylib file.
If I link my pybind11 extension to the .so library, it will crash. but if I link it to the dylib file, it will be fine. I'm trying to understand why. I googled the difference between .so and .dylib, but I don't find too much.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using pybind11 to create a python extension.
what I found out is that , if we link against the wrong python library, it could result in crash when importing the extension in python.
I develop on Mac. when building python on mac, there are 2 options. option 1 is the default
./configure && make
. This will build python into a conventional .so library.another way is using the
--enable-framework
flag to build mac framework. the end result is a dylib file.If I link my pybind11 extension to the .so library, it will crash. but if I link it to the dylib file, it will be fine. I'm trying to understand why. I googled the difference between .so and .dylib, but I don't find too much.
Beta Was this translation helpful? Give feedback.
All reactions