-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
boost: Update from 1.65.1 to 1.67.0 #2384
Conversation
Unsplit libboost-python as the dependency or linkage to (lib)python was never necessary. |
It is necesary to link with python because of the android linker. Opencv wouldh't work properly without doing that. |
It would literally error out can;t find python symbol etc. Without linking with python it simply won't import lib without error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this bit
dl -lpython3.6m ;
is neccesary otherwise the boost python module cant be imported into python. This means for instance opencv can't work automatically.
On normal linux its not required but the android linker is not the same thing.
I am not seeing the sense in this. Even on desktop distros libboost_python isn't linked (at the very least not dynamically) against libpython. Where comes the problem with opencv and the android linker? Btw there's a chance that the libboost_python that we have been shipping was built for python2, if it was built on Ubuntu but not Arch, as Even my last commit was not alright, because apparently |
libboost_python was never supposed to be linked to libpython. Hence the patch, and in turn the dependency to the python package, and in turn the package split, were never necessary.
Btw it's probably not a must to build libboost_python against Termux python. In fact I am not sure if either way is better or safer. Apparently the Travis CI image doesn't have python-dev and python2-dev installed though, so build test will fail if I use host python builds instead. One good thing about using host python might be that it may allow us to build numpy bindings, if they are desired, since on Termux we rely on pip which can't really be used in the build system. |
See comments in #1992 for background why ˋ-lpython3.6mˋ was needed. See android/ndk#201 for discussion about the differences in the linkers. |
@Grimler91 Well I failed to see that any libraries in opencv (including the Apparently you thought that
The OP never even return to report that |
Symbol visibility when opening shared libraries using dlopen() works differently. On a normal linker, when an executable linking against a shared library libA dlopen():s another shared library libB, the symbols of libA are exposed to libB without libB needing to link against libA explicitly. This does not work with the Android linker, which can break plug-in systems where the main executable dlopen():s a plug-in which doesn't explicitly link against some shared libraries already linked to by the executable. See the relevant NDK issue for more information. |
Looking back, it seems a bit weird that libboost_python is needed so you might be right here @tomty89. I tried recompiling without Sidenote for @its-pointless : I also received an error first that header numpy/ndarrayobject.h couldn't be found, I solved it by symlinking |
@its-pointless The difference / issue of the Android linker isn't relevant here. As I've said, the @Grimler91 I am not sure how much support you can get from developers of opencv for this, but I do think it should be reported upstream (whether the reason is the android linker as @its-pointless said or not). AFAIR they do/did have at least some intention to support Android. As for why the two forced linkage workaround the error, I have no idea. My guess is because libboost_python was malformed, and hence it somehow fits the taste of the broken |
From android/ndk#201 (comment):
I guess the problem is, because we have libpython built on Termux as most distros do, the symbols of the Python C-API are in libpython and are marked with RTLD_LOCAL when loaded and are hence not available for python extensions as they are on desktop distros. When I test with the example "spam" in https://docs.python.org/3.6/extending/index.html, the results are coherent to the quoted statements:
So the only remaining question is why @Grimler91 Have you confirmed that the linkage has actually been applied to the P.S. I think it's clear enough that libboost_python is not relevant in the problem at all now. |
With
|
@tomty89 Awesome, so that's the proper fix.. |
@Grimler91 You don't want to use
However, as you can see, it also make the |
@fornwall With the last update this PR should be good to go. Thanks! |
you can enable coroutine and context but to do so we have to compile the assembler files. This needs in the command line for arm and arm64 and for i686 and x86_64 its since for compabititlity all packages which are linked against c++ are going to be recompiled to work with new libc++_shared.so may as well update this as well since all packages that link against boost have to updated on boost update. |
Nice work! The updated package is available (with the updates in #2425 to enable coroutine and context). |
No description provided.