这是indexloc提供的服务,不要输入任何密码
Skip to content

cmake -DBUILD_SHARED_LIBS=ON for all packets no static libs #24091

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

john-peterson
Copy link
Contributor

s is better because builds failed without this. ffmpeg contains this
check that doesn't accept static libs

check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&

besides static libs are absolutely insanity . I have on my to-do list to
create share libs from netsurf for elinks libdom libcss should be broken
out and build sharedas separate packets . -- UPDATE this is fixed and pending elinks including JavaScript is now down to one meg without debug symbols from over six meg---I really want to make more
progress with elinks JavaScript . good old memories

possible bionic dlopen bug in Quick JS

in quickjs@shared in my account a possible bug is explained in dlopen.
unless there is something wrong with the build the linked JS
interpreter fails to use dlopen from libquickjs.so . the exact same
static program works and glibc shared with exact same build recipe.
DL_DEBUG is also disabled in bionic but it would not say anything about
dlopen only the initial linking . bionic is relatively small and it
should be possible to test this on device it is only a few thousand
files with a custom libc.so with logging for dlopen

s is better because builds failed without this. ffmpeg contains this
check that doesn't accept static libs

check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&

besides static libs are absolutely insanity . I have on my to-do list to
create share libs from netsurf for elinks libdom libcss should be broken
out and build sharedas separate packets . -- UPDATE  this is fixed and pending elinks including JavaScript is now down to one meg without debug symbols from over six meg---I really want to make more
progress with elinks JavaScript . good old memories

 # possible bionic dlopen bug in Quick JS

 in quickjs@shared in my account a possible bug is explained in dlopen.
 unless there is something wrong with the build the linked JS
 interpreter fails to use dlopen from libquickjs.so . the exact same
 static program works and glibc shared with exact same build recipe.
 DL_DEBUG is also disabled in bionic but it would not say anything about
 dlopen only the initial linking . bionic is relatively small and it
 should be possible to test this on device it is only a few thousand
 files with a custom libc.so with logging for dlopen
@john-peterson john-peterson requested a review from Grimler91 as a code owner April 2, 2025 23:30
@robertkirkman
Copy link
Contributor

robertkirkman commented Apr 2, 2025

It is an interesting idea, however, very unfortunately, that would break packages that require static libraries because of conflicts with shared libraries in /system/lib64.

@robertkirkman
Copy link
Contributor

@twaik could you explain what error this is fixing? I wondered because now, opencv is marked as depending on both libprotobuf and protobuf-static simultaneously.

cfbb24e

@@ -52,6 +52,7 @@ termux_step_configure_cmake() {
-DCMAKE_USE_SYSTEM_LIBRARIES=True \
-DDOXYGEN_EXECUTABLE= \
-DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=ON \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However it should be noted that this would not actually turn off most static libraries (I think), it would only turn on shared libraries in many packages.

I think this could possibly unify 70 instances of -DBUILD_SHARED_LIBS=ON in the repository, there are only two possible conflicting situations (I think), the special cases protobuf-static (discussed above), and the other special case qbittorrent (not sure of the reason for that one having -DBUILD_SHARED_LIBS=OFF)

-DBUILD_SHARED_LIBS=OFF

-DBUILD_SHARED_LIBS=OFF

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As comments above, this should be added in TERMUX_PKG_EXTRA_CONFIGURE_ARGS. I strongly oppose adding it to the default args.

@twaik
Copy link
Member

twaik commented Apr 3, 2025

@twaik could you explain what error this is fixing? I wondered because now, opencv is marked as depending on both libprotobuf and protobuf-static simultaneously.

I do not really remember, afaik somebody had "cannot link executable" problem.

@robertkirkman
Copy link
Contributor

robertkirkman commented Apr 3, 2025

@twaik could you explain what error this is fixing? I wondered because now, opencv is marked as depending on both libprotobuf and protobuf-static simultaneously.

I do not really remember, afaik somebody had "cannot link executable" problem.

if that is true, then it could mean that

might not be working correctly, because opencv is not supposed to be dynamically linked to libprotobuf (i think), because if that happens then some devices will have

This program was compiled against version 3.0.0 of the Protocal Buffer runtime library, which is not compatible with the installted version (4.22.4). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "external/protobuf/src/google/protobuf/any.pb.cc".) *** Check failure stack trace: *** Aborted

as reported in

I need to find a device that can reproduce that error, so that I can regression test the current versions of the package.

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

Successfully merging this pull request may close these issues.

4 participants