Skip to content

poco: 1.13.3 -> 1.14.1; fix build with new poco in dependent packages#383163

Merged
jnsgruk merged 7 commits intoNixOS:masterfrom
dwt:update-poco-to-1.14.1
Mar 3, 2025
Merged

poco: 1.13.3 -> 1.14.1; fix build with new poco in dependent packages#383163
jnsgruk merged 7 commits intoNixOS:masterfrom
dwt:update-poco-to-1.14.1

Conversation

@dwt
Copy link
Contributor

@dwt dwt commented Feb 18, 2025

Changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@trofi This is the reopened pull request for #369312 - did I miss anything?

@dwt
Copy link
Contributor Author

dwt commented Feb 18, 2025

@trofi One open question I had, is that it seems all downstream users of poco now need utf8proc as a dependency. At what point should this become part of the propagatedBuildInputs? I haven't been able to find any enlightening documentation on that topic yet, so I would love some advice.

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Feb 18, 2025
@nix-owners nix-owners bot requested review from siraben, tomodachi94 and xzfc February 18, 2025 18:34
@dwt dwt marked this pull request as draft February 18, 2025 18:39
@dwt
Copy link
Contributor Author

dwt commented Feb 18, 2025

Sorry, forgot to mark it as draft immediately, as there are still some dependents I haven't gotten around to fixing.

@dwt dwt force-pushed the update-poco-to-1.14.1 branch from a82f4ed to 65ebf87 Compare February 18, 2025 19:11
@dwt
Copy link
Contributor Author

dwt commented Feb 18, 2025

Upstream bug reports I've already opened for this:

@dwt dwt mentioned this pull request Feb 18, 2025
13 tasks
Comment on lines +64 to +65
Copy link
Member

Choose a reason for hiding this comment

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

There are helpers available that make setting cmakeFlags more "semantic" :)

Suggested change
"-D g15=OFF"
"-D CMAKE_CXX_STANDARD=17" # protobuf >22 requires C++ 17
(lib.cmakeBool "g15" false)
(lib.cmakeFeature "CMAKE_CXX_STANDARD" "17") # protobuf >22 requires C++ 17

Copy link
Contributor Author

Choose a reason for hiding this comment

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

applied

@trofi
Copy link
Contributor

trofi commented Feb 18, 2025

@trofi One open question I had, is that it seems all downstream users of poco now need utf8proc as a dependency. At what point should this become part of the propagatedBuildInputs? I haven't been able to find any enlightening documentation on that topic yet, so I would love some advice.

The typical use case for propagatedBuildInputs is when a .dev output requires another .dev output. That could happen if poco's public headers use public headers of utf8string or installed poco's .pc file refers utf8string .pc files. I think it's a natural effect of fixed unbundling.

@trofi
Copy link
Contributor

trofi commented Feb 18, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 383163


x86_64-linux

❌ 1 package failed to build:
  • collabora-online
✅ 14 packages built:
  • craftos-pc
  • ioq3-scion
  • ioquake3
  • litebrowser
  • multipass
  • mumble
  • mumble_overlay
  • murmur
  • poco
  • poco.dev
  • pothos
  • quake3demo
  • sanjuuni
  • vscode-extensions.jackmacwindows.craftos-pc

@dwt
Copy link
Contributor Author

dwt commented Feb 18, 2025

The typical use case for propagatedBuildInputs is when a .dev output requires another .dev output. That could happen if poco's public headers use public headers of utf8string or installed poco's .pc file refers utf8string .pc files. I think it's a natural effect of fixed unbundling.

Looking at the dev derivation of poco I see that there are cmake files to find utf8proc:

❯ rg utf8proc  /nix/store/67f3dgynfwmhj4a02l4zvvd4dlhmaf72-poco-1.14.1-dev/
/nix/store/67f3dgynfwmhj4a02l4zvvd4dlhmaf72-poco-1.14.1-dev/lib/cmake/Poco/FindUtf8Proc.cmake
5:# Find utf8proc
20:#      UTF8PROC_INCLUDE_DIR - where to find utf8proc.h
21:#      UTF8PROC_LIBRARY     - the utf8proc library
39:    UTF8PROC_INCLUDE_DIR NAMES utf8proc.h DOC "The utf8proc include directory"
43:    UTF8PROC_LIBRARY NAMES utf8proc DOC "The utf8proc library"

I don't understand enough cmake however to deduce if that means all users of poco auto require this?

I'm also not quite sure if you say that this should mean utf8proc should be a propagated dependency? For example litebrowser does not seem to require it? It may however get it propagated from another input. How would I find that out?

@trofi
Copy link
Contributor

trofi commented Feb 18, 2025

The typical use case for propagatedBuildInputs is when a .dev output requires another .dev output. That could happen if poco's public headers use public headers of utf8string or installed poco's .pc file refers utf8string .pc files. I think it's a natural effect of fixed unbundling.

Looking at the dev derivation of poco I see that there are cmake files to find utf8proc:

❯ rg utf8proc  /nix/store/67f3dgynfwmhj4a02l4zvvd4dlhmaf72-poco-1.14.1-dev/
/nix/store/67f3dgynfwmhj4a02l4zvvd4dlhmaf72-poco-1.14.1-dev/lib/cmake/Poco/FindUtf8Proc.cmake
5:# Find utf8proc
20:#      UTF8PROC_INCLUDE_DIR - where to find utf8proc.h
21:#      UTF8PROC_LIBRARY     - the utf8proc library
39:    UTF8PROC_INCLUDE_DIR NAMES utf8proc.h DOC "The utf8proc include directory"
43:    UTF8PROC_LIBRARY NAMES utf8proc DOC "The utf8proc library"

I don't understand enough cmake however to deduce if that means all users of poco auto require this?

I'm also not quite sure if you say that this should mean utf8proc should be a propagated dependency?

utf8proc installs a single utf8proc.h header and utf8proc library.

Let's see if any headers are directly user by poco:

$ nix build github:NixOS/nixpkgs/pull/383163/merge#poco.dev

$ fgrep -R utf8proc.h result-dev/
result-dev/lib/cmake/Poco/FindUtf8Proc.cmake:#      UTF8PROC_INCLUDE_DIR - where to find utf8proc.h
result-dev/lib/cmake/Poco/FindUtf8Proc.cmake:    UTF8PROC_INCLUDE_DIR NAMES utf8proc.h DOC "The utf8proc include directory"

Looks like poco itself does not use it as is. But it installs FindUtf8Proc.cmake which other projects might use via find_package(UTF8Proc) (or something like that, my cmake is weak). If any of them does then adding utf8proc to propagatedBuildInputs sounds like a reasonable thing to do. It's a small depend anyway.

For example litebrowser does not seem to require it? It may however get it propagated from another input. How would I find that out?

I would query the derivation graph:

$ nix-store --query --graph $(nix-instantiate -A litebrowser) |& fgrep utf8

Does not seem to contain utf8proc in the closure (it's against nixpkgs/master).

@dwt
Copy link
Contributor Author

dwt commented Feb 19, 2025

@trofi Running this command after I've built litebrowser on this branch, I get this result:

❯ nix-store --query --graph (nix-instantiate -A litebrowser --system aarch64-linux) &| rg utf8
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
"kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" -> "fv4ay05c9hn3ip9y9jdrwjn3c80hj2pj-poco-1.14.1.drv" [color = "magenta"];
"kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" [label = "utf8proc-2.10.0.drv", shape = box, style = filled, fillcolor = "#ff0000"];
"81lwjm4ijn2vz1wim8b96m83a3la88l3-bash-5.2p37.drv" -> "kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" [color = "black"];
"gc2x3v0z9y5rm72lbjbbkdvqdcp8zang-stdenv-linux.drv" -> "kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" [color = "red"];
"mphxjjp4jjgyq2mh28wxz01iw12dpcmd-source.drv" -> "kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" [color = "green"];
"rjlqmzx73qzik0rpj44hc6dp6s4blpq0-cmake-3.31.3.drv" -> "kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" [color = "blue"];
"shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh" -> "kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" [color = "magenta"];
"vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh" -> "kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" [color = "burlywood"];

Does that mean that indeed litebrowser does contain utf8proc here?

@trofi
Copy link
Contributor

trofi commented Feb 19, 2025

@trofi Running this command after I've built litebrowser on this branch, I get this result:

❯ nix-store --query --graph (nix-instantiate -A litebrowser --system aarch64-linux) &| rg utf8
"kq1w8y2ciyqxkz59x8xqisnc8yvd817w-utf8proc-2.10.0.drv" -> "fv4ay05c9hn3ip9y9jdrwjn3c80hj2pj-poco-1.14.1.drv" [color = "magenta"];

Does that mean that indeed litebrowser does contain utf8proc here?

No, it only means that poco now depends on utf8proc. What fails if you don't add it? litebrowser? And how does it fail?

@dwt
Copy link
Contributor Author

dwt commented Feb 19, 2025

The build succeeds, but I wasn't able to test it (haven't gotten around to setting up a non headless nix that can forward ui to me yet).

@dwt dwt force-pushed the update-poco-to-1.14.1 branch from fe4f82e to d43e893 Compare February 19, 2025 17:22
@dwt
Copy link
Contributor Author

dwt commented Feb 19, 2025

@trofi: litebrowser works fine without adding utf8proc as a dependency. Does that prove that utf8proc should not be a propagatedBuildInput?

@dwt
Copy link
Contributor Author

dwt commented Feb 19, 2025

@trofi Regarding the failure of collabora-online, as far as I can determine, that is actually a failure of libreoffice-collabora, which is currently broken on master. See:

nix build --system aarch64-linux github:NixOS/nixpkgs/master#libreoffice-collabora --print-build-logs
nix build --system x86_64-linux github:NixOS/nixpkgs/master#libreoffice-collabora --print-build-logs

Is that something that should stop this getting merged?

@trofi
Copy link
Contributor

trofi commented Feb 19, 2025

@trofi: litebrowser works fine without adding utf8proc as a dependency. Does that prove that utf8proc should not be a propagatedBuildInput?

I'd say it's fine to not include it to propagatedBuildInput until we have an evidence of at least one package needing it.

@trofi Regarding the failure of collabora-online, as far as I can determine, that is actually a failure of libreoffice-collabora, which is currently broken on master. See:

nix build --system aarch64-linux github:NixOS/nixpkgs/master#libreoffice-collabora --print-build-logs
nix build --system x86_64-linux github:NixOS/nixpkgs/master#libreoffice-collabora --print-build-logs

Is that something that should stop this getting merged?

I would say this should not be blocking this PR merge to master.

@dwt dwt marked this pull request as ready for review February 20, 2025 06:47
@dwt
Copy link
Contributor Author

dwt commented Feb 20, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 383163


x86_64-darwin

⏩ 2 packages marked as broken and skipped:
  • litebrowser
  • sanjuuni
✅ 2 packages built:
  • poco
  • poco.dev

aarch64-darwin

⏩ 2 packages marked as broken and skipped:
  • litebrowser
  • sanjuuni
✅ 2 packages built:
  • poco
  • poco.dev

@dwt
Copy link
Contributor Author

dwt commented Feb 20, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 383163


aarch64-linux

❌ 1 package failed to build:
  • collabora-online
✅ 12 packages built:
  • craftos-pc
  • ioq3-scion
  • ioquake3
  • litebrowser
  • mumble
  • murmur
  • poco
  • poco.dev
  • pothos
  • quake3demo
  • sanjuuni
  • vscode-extensions.jackmacwindows.craftos-pc

@dwt
Copy link
Contributor Author

dwt commented Feb 20, 2025

Not sure why, but my x86 builds keep failing because pkg-config and ld explode at unfortunate moments. Seems my Rosetta is acting up. :/

@dwt
Copy link
Contributor Author

dwt commented Feb 23, 2025

@trofi Is there anything else you would require to get this pull request merged? I would love some feedback.

@trofi
Copy link
Contributor

trofi commented Feb 23, 2025

@dwt It looks good to me. Note that I'm not a nixpkgs committer and can't merge any PRs.

@dwt
Copy link
Contributor Author

dwt commented Feb 24, 2025

Pinging Maintainers of the touched packages, to help me get this merged:

Copy link
Member

@jnsgruk jnsgruk left a comment

Choose a reason for hiding this comment

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

LGTM for Multipass, thank you!

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Feb 24, 2025
Copy link
Member

@felixsinger felixsinger left a comment

Choose a reason for hiding this comment

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

Changes to Mumble look good to me except for one.

@dwt dwt force-pushed the update-poco-to-1.14.1 branch from ab40ec5 to 33f6d24 Compare February 25, 2025 20:12
Copy link
Member

@tomodachi94 tomodachi94 left a comment

Choose a reason for hiding this comment

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

Changes to Poco and CraftOS-PC lgtm, with the added note that the patch should probably be submitted upstream (the upstream maintainer generally appreciates patches like this, that fix compatibility with bleeding-edge versions of libraries and the like).

@dwt
Copy link
Contributor Author

dwt commented Feb 26, 2025

Changes to Poco and CraftOS-PC lgtm, with the added note that the patch should probably be submitted upstream (the upstream maintainer generally appreciates patches like this, that fix compatibility with bleeding-edge versions of libraries and the like).

  • Poco: Already upstream, that's why I was able to use fetchpatch in the derivation
  • craftos-pc: linked in the derivation

@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Feb 26, 2025
@wegank wegank added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Feb 26, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2274

@dwt
Copy link
Contributor Author

dwt commented Mar 3, 2025

@xzfc @siraben @Lilacious Friendly ping - do you have any input on this merge request?

@dwt dwt mentioned this pull request Mar 3, 2025
13 tasks
@dwt
Copy link
Contributor Author

dwt commented Mar 3, 2025

Friendly note to maintainers with commit bit - this pull request is currently blocking my work on porting Mumble to Darwin. As far as I can see this pull request is fully reviewed and accepted.

Am I missing something?

Of course ne upstream package (collabora-online) is broken, but that was broken before this pull request, so nothing I can do about that here.

@jnsgruk
Copy link
Member

jnsgruk commented Mar 3, 2025

LGTM, thanks for your work on this!

@jnsgruk jnsgruk merged commit 88461d9 into NixOS:master Mar 3, 2025
30 checks passed
@dwt dwt deleted the update-poco-to-1.14.1 branch March 26, 2025 20:30
@lopsided98
Copy link
Contributor

lopsided98 commented Apr 16, 2025

utf8proc is an unconditional dependency of Poco Foundation and should be added to propagatedBuildInputs, see: pocoproject/poco@b380b57. Note how utf8proc is pulled in alongside pcre2 and zlib, which are both already propagated.

litebrowser only builds successfully because doesn't actually depend on Poco at all anymore, see: litehtml/litebrowser-linux@3741882

@lopsided98
Copy link
Contributor

lopsided98 commented Apr 16, 2025

The other packages touched by this PR that depend on Poco but build without utf8proc do so because they don't use CMake to find Poco. This works because utf8proc is not part of the Poco public API, and therefore probably shouldn't be part of the CMake link interface, but this is an upstream Poco issue and we should still propagate utf8proc because this is what upstream expects.

edit: it looks like this applies to the PCRE2 and zlib dependencies as well and an upstream fix could allow us to get rid of propagation for these too.

@lopsided98 lopsided98 mentioned this pull request Apr 17, 2025
13 tasks
@lopsided98
Copy link
Contributor

#399346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants