Skip to content

re2: switch to CMake#196123

Merged
SuperSandro2000 merged 1 commit intoNixOS:stagingfrom
azahi:re2
Oct 25, 2022
Merged

re2: switch to CMake#196123
SuperSandro2000 merged 1 commit intoNixOS:stagingfrom
azahi:re2

Conversation

@azahi
Copy link
Member

@azahi azahi commented Oct 15, 2022

Description of changes
  • Switch to CMake
  • Add myself as a maintainer
  • Refactor the derivation
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@azahi azahi mentioned this pull request Oct 15, 2022
13 tasks
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. labels Oct 15, 2022
@azahi
Copy link
Member Author

azahi commented Oct 15, 2022

Since this causes quite a lot of rebuilds, maybe we should target the staging branch here?

@risicle
Copy link
Contributor

risicle commented Oct 15, 2022

Fails to build on macos 10.15:

fixing cmake files...
mkdir: cannot create directory 'build': File exists

@Mic92
Copy link
Member

Mic92 commented Oct 15, 2022

Fails to build on macos 10.15:

fixing cmake files...
mkdir: cannot create directory 'build': File exists

This is a weird error, if you look at pkgs/development/tools/build-managers/cmake/setup-hook.sh

  if [ -z "${dontUseCmakeBuildDir-}" ]; then         
      mkdir -p "$cmakeBuildDir"                      
      cd "$cmakeBuildDir"                            
      : ${cmakeDir:=..}                              
  else                                               
      : ${cmakeDir:=.}                               
  fi                                                 

mkdir -p should not fail even if the directory exists.

Can you do preConfigure = "set -x" to confirm this is the mkdir that fails, also does dontUseCmakeBuildDir = 1; in the build fixes it?

@tobim
Copy link
Contributor

tobim commented Oct 15, 2022

Fails to build on macos 10.15:

fixing cmake files...
mkdir: cannot create directory 'build': File exists

This is a weird error, ...

mkdir -p should not fail even if the directory exists.

mkdir -p fails because the path is a regular file called BUILD, not a directory. It only happens on darwin because of the case insensitive filesystem.

@azahi
Copy link
Member Author

azahi commented Oct 15, 2022

It only happens on darwin because of the case insensitive filesystem.

I've added cmakeBuildDir = "build_dir";. Let's see if that helps.

@azahi azahi force-pushed the re2 branch 2 times, most recently from d3196be to 18d6768 Compare October 16, 2022 16:27
Copy link
Contributor

@tobim tobim left a comment

Choose a reason for hiding this comment

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

Looks alright to me !

@bobby285271 bobby285271 added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 16, 2022
@risicle
Copy link
Contributor

risicle commented Oct 17, 2022

passthru.tests build on macos 10.15 & nixos x86_64. pkgsMusl, pkgsStatic & pkgsCross.aarch64-multiplatform variants still build.

This needs to be re-targeted at staging though.

@azahi azahi changed the base branch from master to staging October 17, 2022 06:23
@azahi
Copy link
Member Author

azahi commented Oct 17, 2022

Well, I've changed the target branch and now ofborg gets this:

error: building of '/nix/store/05bx6ql14syldhylnywgn3k80spsdxgv-llvm-11.1.0.drv!lib,out' from .drv file timed out after 3600 seconds

I'm not sure how to proceed from here.

@tobim
Copy link
Contributor

tobim commented Oct 17, 2022

Well, I've changed the target branch and now ofborg gets this:

error: building of '/nix/store/05bx6ql14syldhylnywgn3k80spsdxgv-llvm-11.1.0.drv!lib,out' from .drv file timed out after 3600 seconds

I'm not sure how to proceed from here.

Probably just an unrelated problem on the stating branch, nothing to worry about.

@risicle
Copy link
Contributor

risicle commented Oct 17, 2022

Ofborg frequently fails to build on the staging branch because it can't use binaries from hydra and so has often has to build a huge number of dependencies for simple packages, which frequently timeout. It's not related to this PR specifically.

@azahi
Copy link
Member Author

azahi commented Oct 18, 2022

Is there anything I can do here? I really want to get this in before the 22.11 release.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/struggling-with-cmake-dependencies/22629/4

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/651

@SuperSandro2000 SuperSandro2000 merged commit 4075fed into NixOS:staging Oct 25, 2022
@azahi azahi deleted the re2 branch March 7, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 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.

7 participants