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

geant4: 10.6.3 -> 10.7.0 #105920

Merged
merged 1 commit into from Dec 10, 2020
Merged

geant4: 10.6.3 -> 10.7.0 #105920

merged 1 commit into from Dec 10, 2020

Conversation

OmnipotentEntity
Copy link
Contributor

Motivation for this change

Updating to the latest version. Updated datafiles as well.

Python packages don't build. Error with Boost, and I cannot figure it out.

-- Found PythonLibs: /nix/store/zq4mf44s4hwvbmhkqd3bi70g2bx0q3zz-python3-3.7.9/lib/libpython3.7m.so (found version "3.7.9") 
CMake Error at /nix/store/ksfn34l2hzc6j3i0l2xialqbs7lbwzfy-cmake-3.18.4/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find Boost (missing: python) (found suitable version "1.69.0",
  minimum required is "1.65")
Call Stack (most recent call first):
  /nix/store/ksfn34l2hzc6j3i0l2xialqbs7lbwzfy-cmake-3.18.4/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  /nix/store/ksfn34l2hzc6j3i0l2xialqbs7lbwzfy-cmake-3.18.4/share/cmake-3.18/Modules/FindBoost.cmake:2177 (find_package_handle_standard_args)
  environments/g4py/CMakeLists.txt:11 (find_package)

Assistance on that is appreciated.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@OmnipotentEntity
Copy link
Contributor Author

@veprbl Any ideas on the python boost problem?

@veprbl
Copy link
Member

veprbl commented Dec 5, 2020

Try:

diff --git a/pkgs/development/libraries/physics/geant4/default.nix b/pkgs/development/libraries/physics/geant4/default.nix
--- a/pkgs/development/libraries/physics/geant4/default.nix
+++ b/pkgs/development/libraries/physics/geant4/default.nix
@@ -60,8 +60,8 @@ stdenv.mkDerivation rec {
   postPatch = ''
     # Fix for boost 1.67+
     substituteInPlace environments/g4py/CMakeLists.txt \
-      --replace "find_package(Boost REQUIRED python)" \
-                "find_package(Boost REQUIRED COMPONENTS $boost_python_lib)"
+      --replace "REQUIRED python)" \
+                "REQUIRED COMPONENTS $boost_python_lib)"
     substituteInPlace environments/g4py/G4PythonHelpers.cmake \
       --replace "Boost::python" "Boost::$boost_python_lib"
   '';

@OmnipotentEntity
Copy link
Contributor Author

I apologize, I've had a rather tumultuous few days. I've given your patch a shot, and it seems to work! Thanks so much. I feel rather ashamed that I didn't notice that the replacement here wasn't taking place despite looking directly at this and the CMakeLists.txt in question.

@OmnipotentEntity
Copy link
Contributor Author

@GrahamcOfBorg build geant4 g4py geant4.tests.example_B1

@veprbl veprbl merged commit 656888e into NixOS:master Dec 10, 2020
@veprbl
Copy link
Member

veprbl commented Dec 10, 2020

Thanks!

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

2 participants