Skip to content

Fix some BSD builds missing pthread functions#11156

Merged
Ericson2314 merged 2 commits intoNixOS:masterfrom
obsidiansystems:fix-bsd-pthread
Jul 22, 2024
Merged

Fix some BSD builds missing pthread functions#11156
Ericson2314 merged 2 commits intoNixOS:masterfrom
obsidiansystems:fix-bsd-pthread

Conversation

@Ericson2314
Copy link
Member

Motivation

In addition to adding the missing thread deps in the last commit, we also appear to need to skip -Wl,--as-needed flags that Meson wants to use, but doesn't work with our *BSD toolchains.

Also, add missing thread deps.

Context

See mesonbuild/meson#3593

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@Ericson2314 Ericson2314 requested a review from edolstra as a code owner July 22, 2024 15:48
@github-actions github-actions bot added new-cli Relating to the "nix" command fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels Jul 22, 2024
Copy link
Contributor

@tomberek tomberek left a comment

Choose a reason for hiding this comment

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

Builds as expected.

@Ericson2314 Ericson2314 disabled auto-merge July 22, 2024 17:03
In addition to adding the missing thread deps in the last commit, we
also appear to need to skip `-Wl,--as-needed` flags that Meson wants to
use, but doesn't work with our *BSD toolchains.

See mesonbuild/meson#3593
@Ericson2314 Ericson2314 enabled auto-merge July 22, 2024 17:10
@Ericson2314 Ericson2314 merged commit 046cc8c into NixOS:master Jul 22, 2024
@Ericson2314 Ericson2314 deleted the fix-bsd-pthread branch July 22, 2024 18:01
@edolstra
Copy link
Member

@Ericson2314 There still appears to be a pthread-related issue on FreeBSD: https://hydra.nixos.org/build/267279816

Note that the need for pthread_getattr_np() would go away with #11152 so it might not be worth investing too much time in fixing it.

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

Labels

c api Nix as a C library with a stable interface fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants