Skip to content
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

C extension overlap #232

Closed
kived opened this issue May 2, 2014 · 2 comments
Closed

C extension overlap #232

kived opened this issue May 2, 2014 · 2 comments

Comments

@kived
Copy link
Contributor

kived commented May 2, 2014

All of the C extensions are combined into one library, to get around the Android dlopen() limit. However, this causes issues when you have modules in C extensions with the same name.

For example, if you have two C extensions a and b, and they have modules a.mod and b.mod, the application will not work. Both extensions will produce a file mod.so, and will be copied into the same directory and so one will overwrite the other. I did some testing by putting each package/recipe's output in its own directory, but that has issues as well. The C extension modules have an init function which is not namespaced - it will be called init_mod() in both modules, so the functions overlap when added to the same library.

I'm not really sure what a good fix is for this, I just wanted to make sure that it's a known issue.

@kived
Copy link
Contributor Author

kived commented Jun 13, 2014

Just had a thought - maybe a setting in the recipe could be used to create extra .so files. For example, if you added SEPARATE_EXTENSION=1 to the recipe for Kivy, then all of the Kivy .so files would be combined into libpymodules-kivy.so. Then the patched _PyImport_GetDynLoadFunc() could first check to see if the specific file exists for that package, then check the main libpymodules.so, then finally try to load the specific .so file.

@inclement
Copy link
Member

I'm going to close this, since skipping biglink is now well supported, although modifying the symbols to prevent clashes might still be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants