Skip to content
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

libpng: fix build on FreeBSD #318172

Merged
merged 1 commit into from
Jun 17, 2024
Merged

libpng: fix build on FreeBSD #318172

merged 1 commit into from
Jun 17, 2024

Conversation

rhelmot
Copy link
Contributor

@rhelmot rhelmot commented Jun 8, 2024

Description of changes

As per comment.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
    • x86_64-freebsd
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@Ericson2314
Copy link
Member

@rhelmot
Copy link
Contributor Author

rhelmot commented Jun 17, 2024

That patch is already applied to libpng upstream. It doesn't help...

@rhelmot rhelmot changed the base branch from staging to master June 17, 2024 05:52
Copy link
Contributor

@paparodeo paparodeo left a comment

Choose a reason for hiding this comment

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

no rebuilds for nix-build -A libpng and nix-build -A pkgsCross.x86_64-freebsd.libpng builds successfully.

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

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

Honestly I'd rather see you adding lines like

int feenableexcept(int excepts);

into one of the headers. I think this particular function should be OK without a declaration visible at call site, but this flag is global and can lead to subtle runtime breakages, e.g. see https://stackoverflow.com/a/437763/587396

@rhelmot
Copy link
Contributor Author

rhelmot commented Jun 17, 2024

I've pushed the @paparodeo patch which does basically what you've asked :)

@vcunat
Copy link
Member

vcunat commented Jun 17, 2024

Ah, OK. I haven't read it previously, as it was a "resolved" thread.

Copy link
Contributor

@paparodeo paparodeo left a comment

Choose a reason for hiding this comment

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

looks good with latest patch. no rebuilds for nix-build -A libpng and nix-build -A pkgsCross.x86_64-freebsd.libpng builds successfully.

@vcunat vcunat changed the title libpng: build with implicit function declarations on FreeBSD libpng: fix build on FreeBSD Jun 17, 2024
@vcunat vcunat merged commit 07ab36c into NixOS:master Jun 17, 2024
8 of 9 checks passed
@vcunat
Copy link
Member

vcunat commented Jun 17, 2024

Yes, I like this. Especially as the issue only happens in a test.

@vcunat vcunat added the backport release-24.05 Backport PR automatically label Jun 17, 2024
Copy link
Contributor

Successfully created backport PR for release-24.05:

@rhelmot rhelmot deleted the freebsd-libpng branch June 17, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants