Skip to content

external_deps: upgrade libs - #2044

Open
illwieckz wants to merge 13 commits into
masterfrom
illwieckz/deps-libs
Open

illwieckz wants to merge 13 commits into
masterfrom
illwieckz/deps-libs

Conversation

@illwieckz

Copy link
Copy Markdown
Member

This assumes we now build on Bookworm (Bullseye is archived anyway).

@slipher

slipher commented Nov 17, 2026

Copy link
Copy Markdown
Member

Why are there 2 curls and 2 jpegs?

@illwieckz

illwieckz commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

Because the branch is 5 months old and I upgraded libs multiple time and I forgot to squash some. Now fixed.

@illwieckz

Copy link
Copy Markdown
Member Author

It's possible that some libs will get updated again between the time we merge this and the time we bump the DEPS version, but this way we already merge the known workaround and we can test most of the changes of those new libs. The best candidate for being upgraded again is SDL3 which has a short release cycle (I upgraded it at least three times since I started that branch).

@slipher

slipher commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Some nuisances I'm seeing so far:

  • Curl sprouted a new dependency "LDAP" that needs to be squashed. It's adding -lldap and -llber to the Daemon build.
  • Nettle uses alignas(0) in a header on i686 Linux. This is supposed to be a legal no-op in both C and C++, but for some reason GCC 14 emits a -Wattributes warning so it doesn't build with werror.
  • SDL3 has some new "Xtest" dependency that we might remove.

@illwieckz

Copy link
Copy Markdown
Member Author

Thanks for the testing!

  • Curl sprouted a new dependency "LDAP" that needs to be squashed. It's adding -lldap and -llber to the Daemon build.

Hmm, curl 8.23.0 dropped the HTTP_ONLY option… very annoying.

  • Nettle uses alignas(0) in a header on i686 Linux. This is supposed to be a legal no-op in both C and C++, but for some reason GCC 14 emits a -Wattributes warning so it doesn't build with werror.

Can we workaround this?

  • SDL3 has some new "Xtest" dependency that we might remove.

Hmm, have to check if that's useful. Newer distros brings new X libs, that may be part of this.

@illwieckz

Copy link
Copy Markdown
Member Author

Really annoying: curl/curl@779b849

commit 779b84936b293d5983fd4d24b1472d59346fc6d5
Author: Viktor Szakats <***@***>
Date:   Mon Aug 31 13:42:44 2026 +0200

    build: drop `HTTP_ONLY` option
    
    Drop `HTTP_ONLY` C macro for raw builds, and `HTTP_ONLY=ON` for CMake.
    
    It's a niche option that's been historically incomplete throughout its
    existence, also a maintenance pain to get it right and synced with
    protocols and with each other. Note there was no matching `./configure`
    option either. At the time of this commit, it failed to disable SCP/SFTP
    if CMake found libssh/libssh2 (the default), and C flags missed to
    disable IPFS in addition.

We will have to bear the maintenance pain of the “niche option” .

@illwieckz

Copy link
Copy Markdown
Member Author

I implemented some commands to generate the enablement/disablement list to reduce pain at redoing the “niche option”. It works.

Those commands should be executed by hand when upgrading curl, and updating the build script with the output.

@illwieckz

illwieckz commented Nov 18, 2026 •

Copy link
Copy Markdown
Member Author

About SDL3 and Xtest, on both Debian 12 Bookworm and Ubuntu 24.04 Noble (this one is even older than SDL3), removing libxtst6 removes xorg. Xtest looks to be a hard X11 dependency.

What I understand is that SDL3 started using X11_WarpMouseXTest() instead of X11_WarpMouseInternal():

That should be fine.

@slipher

slipher commented Nov 18, 2026

Copy link
Copy Markdown
Member

lol, the final commit in that PR says that the xtest code doesn't actually work and comments out the initialization so that the whole thing is dead code...

@illwieckz

Copy link
Copy Markdown
Member Author

Oh lol, and this is still commended out in the released tarball.

Well, I added the option to disable it, no need to add a dependency (even if ubiquitous) if not used.

@slipher

slipher commented Nov 20, 2026

Copy link
Copy Markdown
Member
  • Nettle uses alignas(0) in a header on i686 Linux. This is supposed to be a legal no-op in both C and C++, but for some reason GCC 14 emits a -Wattributes warning so it doesn't build with werror.

Can we workaround this?

The warning pragma approach should work. #pragma GCC diagnostic ignored "-Wattributes" before including the header

Comment thread external_deps/build.sh Outdated

case "${PLATFORM}" in
macos-*-*)
sed -e 's/-Werror=function-effects/-Wfunction-effects/' CMakeLists.txt > CMakeLists.txt-fix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can use -i with an argument. Like sed -i.junk -e 's/-Werror=function-effects/-Wfunction-effects/' CMakeLists.txt

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, I'm not sure which one is better:

sed -e s/a/b/ file > file.good
mv file.good file
sed -i.bad -e s/a/b/ file
rm file.bad

We still deal with a temporary file and two commands in all cases.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I mean without deleting the junk file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, sure we can leave the original. I used -i.orig.

The script wipes the source on rebuild, so the .orig file is always the original one.

@illwieckz
illwieckz force-pushed the illwieckz/deps-libs branch 3 times, most recently from 1d74598 to 63e8aba Compare November 21, 2026 19:24
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.

2 participants