Skip to content

Comments

cmake: Setup default macOS flags#37015

Merged
matthewbauer merged 4 commits intoNixOS:stagingfrom
matthewbauer:cmake-mac-flags
Mar 22, 2018
Merged

cmake: Setup default macOS flags#37015
matthewbauer merged 4 commits intoNixOS:stagingfrom
matthewbauer:cmake-mac-flags

Conversation

@matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Mar 14, 2018

Motivation for this change

This is a collection of new defaults to setup for CMake related to macOS. Many packages are already setting these, but this will just make them the default. If I have time, I can make a treewide commit that removes references to these flags.

This could potentially break many packages, so it should be extensively tested. If someone could setup a Hydra jobset for this, that would be great!

Also related to #36834

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin 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. labels Mar 14, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: cmake

Partial log (click to expand)

shrinking /nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2/bin/cpack
shrinking /nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2/bin/ctest
shrinking /nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2/bin/cmake
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2/bin
patching script interpreter paths in /nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2
/nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2/share/cmake-3.10/Modules/CPack.STGZ_Header.sh.in: interpreter directive changed from "/bin/sh" to "/nix/store/3gg2p6n4kv2f0lsxd41f5iz1ivkbzyzr-bash-4.4-p19/bin/sh"
/nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2/share/cmake-3.10/Modules/Squish4RunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/3gg2p6n4kv2f0lsxd41f5iz1ivkbzyzr-bash-4.4-p19/bin/sh"
/nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2/share/cmake-3.10/Modules/SquishRunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/3gg2p6n4kv2f0lsxd41f5iz1ivkbzyzr-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/8jnxz9hwpyxpjv5flsd0znqvz76rmc9h-cmake-3.10.2...

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: cmake

Partial log (click to expand)

shrinking /nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2/bin/cpack
shrinking /nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2/bin/ctest
shrinking /nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2/bin/cmake
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2/bin
patching script interpreter paths in /nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2
/nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2/share/cmake-3.10/Modules/Squish4RunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/sh"
/nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2/share/cmake-3.10/Modules/SquishRunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/sh"
/nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2/share/cmake-3.10/Modules/CPack.STGZ_Header.sh.in: interpreter directive changed from "/bin/sh" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/59g8agbx11z6fjwkfyvqvi21yg0rbpz8-cmake-3.10.2...

@matthewbauer
Copy link
Member Author

Does anyone have issues with this? Will merge soon if no issues.

Copy link
Member

@LnL7 LnL7 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 to me, I can push this to my wip job if this should be tested more extensively before merging to staging.

Copy link
Member Author

@matthewbauer matthewbauer left a comment

Choose a reason for hiding this comment

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

Yes a Hydra job would be helpful.

@LnL7
Copy link
Member

LnL7 commented Mar 20, 2018

@matthewbauer Any thoughts on a list of packages to test for this, building all of nixpkgs on the official hydra is maybe not the best idea given the limited build capacity.

@matthewbauer
Copy link
Member Author

Okay I'll just merge to staging and watch what happens. It shouldn't break anything that wasn't already broken.

@matthewbauer matthewbauer merged commit 92a5b1b into NixOS:staging Mar 22, 2018
@LnL7
Copy link
Member

LnL7 commented Mar 22, 2018

I would be surprised if this causes any major issues, if everything looks ok we should probably backport this to 18.03. I've seen a number of build failures that look related to this.

@matthewbauer matthewbauer deleted the cmake-mac-flags branch February 22, 2019 04:36
@sikmir sikmir mentioned this pull request Jul 28, 2020
10 tasks
Samasaur1 added a commit to Samasaur1/nixpkgs that referenced this pull request Oct 25, 2025
This was introduced in NixOS#37015,
before the migration of Apple SDK frameworks to be included by default.

More specifically, it breaks anything looking for `Network.framework`
(such as qtbase 6.10) because it will prefer `libnetwork.tbd` over the
framework.

Fixes NixOS#455059.
Supersedes NixOS#455458.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants