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

boost-build: build correctly with clang (on FreeBSD) #317214

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

rhelmot
Copy link
Contributor

@rhelmot rhelmot commented Jun 4, 2024

Description of changes

Fixes the build on native FreeBSD and probably on other clang platforms too. See commit message for failure.

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.

@rhelmot
Copy link
Contributor Author

rhelmot commented Jun 4, 2024

I'm curious how this worked on Darwin without this patch, seeing as this seems to trigger a mass rebuild. Does the darwin stdenv contain some hack to alias gcc to clang?

@paparodeo
Copy link
Contributor

looking at hydra builds it seems that darwin defaults to clang-darwin for the toolset.

Running phase: installPhase
warning: No toolsets are configured.
warning: Configuring default toolset "clang-darwin".

@rhelmot
Copy link
Contributor Author

rhelmot commented Jun 4, 2024

Very interesting. Should this patch contain a !stdenv.isDarwin then?

@paparodeo
Copy link
Contributor

Very interesting. Should this patch contain a !stdenv.isDarwin then?

seems like the safe option.

@wolfgangwalther
Copy link
Contributor

Should be safe to remove the isDarwin condition. See:

https://github.com/boostorg/build/blob/efbf6ce59b4023f7adc9be2fc3875d371c7f52c6/src/tools/clang.jam#L5-L6

The clang toolset will automatically pick clang-darwin on darwin - which is also the same thing that is picked by default without toolset. So, yes that would be a rebuild, so would need to go into staging.

Also note boostorg/build#249

> Running phase: installPhase
> warning: No toolsets are configured.
> warning: Configuring default toolset "gcc".
> warning: If the default is wrong, your build may not work correctly.
> warning: Use the "toolset=xxxxx" option to override our guess.
> warning: For more configuration options, please consult
> warning: https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration
> /build/boost_1_81_0/tools/build/src/tools/common.jam:1152: in common.find-compiler from module common
> error: toolset gcc initialization:
> error: no command provided, default command 'g++' not found
@rhelmot
Copy link
Contributor Author

rhelmot commented Jun 9, 2024

bumping this - I did in fact remove the isDarwin condition as per comments.

@Ericson2314 Ericson2314 merged commit 6b93324 into NixOS:staging Jun 17, 2024
29 checks passed
@Ericson2314 Ericson2314 deleted the freebsd-boost-build branch June 17, 2024 03:26
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

5 participants