Skip to content

poppler: fix mat2 build on Darwin by backporting upstream bugfix - #546126

Merged
booxter merged 2 commits into
NixOS:stagingfrom
ETCaton:mat2
Aug 14, 2026
Merged

booxter merged 2 commits into
NixOS:stagingfrom
ETCaton:mat2

Conversation

@ETCaton

@ETCaton ETCaton commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

mat2 fails due to a bug in upstream Poppler now fixed, but bumping the version number breaks Inkscape which seems historically fiddly, so I just backported that commit which comes in clean.

Resolves: #546115

Things done

nixpkgs-branch-check[bot]

This comment was marked as outdated.

@nixpkgs-ci
nixpkgs-ci Bot requested review from a team and dotlambda July 27, 2026 00:17
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 6.topic: python Python is a high-level, general-purpose programming language. labels Jul 27, 2026
@ETCaton
ETCaton changed the base branch from master to staging July 27, 2026 00:27
@nixpkgs-ci nixpkgs-ci Bot closed this Jul 27, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Jul 27, 2026
nixpkgs-branch-check[bot]

This comment was marked as outdated.

@ETCaton

ETCaton commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

My bad; I underestimated the rebuild time and thought it would be a quick rebuild locally and push. One sec

@nixpkgs-branch-check
nixpkgs-branch-check Bot dismissed stale reviews from themself July 27, 2026 00:35

Review dismissed automatically

@booxter

booxter commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

I think the title should mention the derivation you touch, not the one that has the downstream effect.

@ETCaton ETCaton changed the title mat2: fix build on Darwin by backporting upstream poppler bugfix poppler: fix mat2 build on Darwin by backporting upstream bugfix Jul 27, 2026
package = finalAttrs.finalPackage;
};
}
// lib.optionalAttrs (!minimal) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks like a change that should be separate from the one that fixes the darwin issue. (Separate PR or commit?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It surfaces the same error through poppler's test suite that mat2 bumbles into so I thought it sensible to group them personally

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I get it. But it arguably belongs to a separate commit (in this same PR).

# packages catch and confusing results where test seem to pass in nixpkgs but not outside
# of them
glib = finalAttrs.finalPackage.overrideAttrs (old: {
pname = "${old.name}-tests";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$ nix build --file . poppler.passthru.tests.glib -L
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error:
       … while evaluating the 'name' attribute of a derivation

       … while evaluating a branch condition
         at /Users/ihrachyshka/src/nixpkgs/lib/strings.nix:2911:5:
         2910|     # First detect the common case of already valid strings, to speed those up
         2911|     if stringLength string <= 207 && okRegex string != null then
             |     ^
         2912|       unsafeDiscardStringContext string

       … in the left operand of the AND (&&) operator
         at /Users/ihrachyshka/src/nixpkgs/lib/strings.nix:2911:35:
         2910|     # First detect the common case of already valid strings, to speed those up
         2911|     if stringLength string <= 207 && okRegex string != null then
             |                                   ^
         2912|       unsafeDiscardStringContext string

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'name' missing
       at /Users/ihrachyshka/src/nixpkgs/pkgs/development/libraries/poppler/default.nix:214:20:
          213|       glib = finalAttrs.finalPackage.overrideAttrs (old: {
          214|         pname = "${old.name}-tests";
             |                    ^
          215|         buildInputs = old.buildInputs ++ [ gtk3 ];
       Did you mean pname?

pname = "poppler-${suffix}";
version = "26.06.0"; # beware: updates often break cups-filters build, check scribus too!
# beware: updates often break cups-filters build, check scribus too! inkscape also seems to need
# special handling for poppler versions, and the current upstream release also breaks it because

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.

Current is too vague. Specfify the version of poppler and the version of inkscape?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is copying the style of the existing comments because Inkscape already has one patch to it to get it working with Poppler and I do not know if this incoming patchset, which breaks the current build, is indicative of a pattern of Inkscape not working with the latest Poppler versions or one-off

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.

poppler often changes the C++ API in a way that breaks consumers. This is the list of packages we noticed are typically affected. Not each poppler version update breaks all of these but usually some subset is affected on most bumps, depending on what API they use.

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.

Actually, we started adding them to passthru.tests so maybe just make this comment refer to that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(Opinion) If the concern is only about build failures, and we already collect everything relevant in passthru.tests, it's not clear what the value the current (or edited) comment here delivers: contributors and committers (are supposed to) run those when they touch the package. Personally, I'd just remove the comment.

@ETCaton

ETCaton commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

graphite2 seems flakey, it keeps popping a timeout for at least one of linebreak, clusters, and featuremaptest by them running a hair over 3 seconds; I doubt it's related to this change

@nixpkgs-ci nixpkgs-ci Bot removed the 6.topic: python Python is a high-level, general-purpose programming language. label Jul 27, 2026
@ofborg ofborg Bot added the 6.topic: darwin Running or building packages on Darwin label Jul 28, 2026
@ETCaton
ETCaton force-pushed the mat2 branch 2 times, most recently from 05a6d99 to d7a3714 Compare July 28, 2026 09:30

@booxter booxter left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can confirm the patch fixes the test suite failure, and one can run the new passthru test. I have a few minor comments on splitting the change into separate commits and tightening comments etc. but nothing of huge substance. I still think it's worth addressing at least some vagueness in current version of comments before merge though.

Thanks for the patch.

pname = "poppler-${suffix}";
version = "26.06.0"; # beware: updates often break cups-filters build, check scribus too!
# beware: updates often break cups-filters build, check scribus too! inkscape also seems to need
# special handling for poppler versions, and the current upstream release also breaks it because

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(Opinion) If the concern is only about build failures, and we already collect everything relevant in passthru.tests, it's not clear what the value the current (or edited) comment here delivers: contributors and committers (are supposed to) run those when they touch the package. Personally, I'd just remove the comment.

package = finalAttrs.finalPackage;
};
}
// lib.optionalAttrs (!minimal) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I get it. But it arguably belongs to a separate commit (in this same PR).

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 29, 2026
@Hythera Hythera mentioned this pull request Aug 1, 2026
27 of 34 tasks
@booxter
booxter added this pull request to the merge queue Aug 14, 2026
Merged via the queue into NixOS:staging with commit 5eaf424 Aug 14, 2026
25 of 27 checks passed
@Hythera Hythera mentioned this pull request Oct 2, 2026
29 of 36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants