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

prefer_system_check succeeds for aliDoctor but fails for aliBuild? #880

Open
olantwin opened this issue Oct 31, 2024 · 5 comments
Open

prefer_system_check succeeds for aliDoctor but fails for aliBuild? #880

olantwin opened this issue Oct 31, 2024 · 5 comments

Comments

@olantwin
Copy link

With 1.17.11 (but also 1.17.5), the following prefer_system_check works for aliDoctor, but fails for aliBuild:

prefer_system_check: |
    [ "$GENFIT_VERSION" = "$REQUESTED_VERSION" ] && true

Any idea what the issue could be? I pass --always-prefer-system to aliBuild, and replacing the check with true works for both aliDoctor and aliBuild.

From reading the code, I would expect exactly identical results...

The invocations of aliBuild/aliDoctor are:

aliBuild build FairShip --default release --always-prefer-system --config-dir shipdist

and

aliDoctor FairShip --default release --always-prefer-system --config shipdist

PS: I should experiment with the CVMFS remote stores, I somehow missed the recent releases...

@ktf
Copy link
Member

ktf commented Nov 1, 2024

What's your "prefer_system:" (without check)? Maybe we are mishandling that.

@ktf
Copy link
Member

ktf commented Nov 1, 2024

Can you also point us to where shipdist is located?

@olantwin
Copy link
Author

olantwin commented Nov 1, 2024

Can you also point us to where shipdist is located?

https://github.com/ShipSoft/shipdist with the only modification being the new prefer_system_check

@olantwin
Copy link
Author

olantwin commented Nov 1, 2024

What's your "prefer_system:" (without check)? Maybe we are mishandling that.

For that package nothing yet, but when passing --always-prefer-system that should not matter?

When passing a constant prefer_system_check it seems to work.

Since it's a holiday here, I'm away from my laptop. I can provide more detailed information and test further when I get home.

@olantwin
Copy link
Author

olantwin commented Nov 5, 2024

This still seems to be an issue with aliBuild 1.17.12.

Steps to reproduce:

  1. Set up environment from CVMFS
CVMFS_DIRECTORY_PATH=/cvmfs/ship.cern.ch/24.10/
ARCHITECTURE=$(aliBuild architecture)
WORK_DIR="${CVMFS_DIRECTORY_PATH}/sw/" source "${CVMFS_DIRECTORY_PATH}/sw/${ARCHITECTURE}/FairShip/latest/etc/profile.d/init.sh"
  1. aliDoctor FairShip --default release --always-prefer-system --config shipdist:
...
SUCCESS: Package GenFit will be picked up from the system.
...
==> The following packages will be picked up from the system:
    
    - ...
    - GenFit
    - ...
    
    If this is not you want, you have to uninstall / unload them.

==> The following packages will be built by aliBuild because they couldn't be picked up from the system:
    
    - defaults-release
    - FairShip
    - generators
    - simulation
    
    This is not a real issue, but it might take longer the first time you invoke aliBuild.
    Look at the error messages above to get hints on what packages you need to install separately.
  1. aliBuild build FairShip --default release --always-prefer-system --config-dir shipdist
==> The following packages cannot be taken from the system and will be built:
      defaults-release, simulation, FairShip, generators, GenFit

==> Packages will be built in the following order:
     - [email protected]
     - GenFit@main
     - [email protected]
     - FairShip (development package)

This is with shipdist's main branch and

diff --git a/genfit.sh b/genfit.sh
index 85891e0..350e3f1 100644
--- a/genfit.sh
+++ b/genfit.sh
@@ -13,6 +13,8 @@ env:
 prepend_path:
   ROOT_INCLUDE_PATH: "$GENFIT_ROOT/include"
   LD_LIBRARY_PATH: "$GENFIT_ROOT/lib"
+prefer_system_check: |
+  [ "$GENFIT_VERSION" = "$REQUESTED_VERSION" ] && true
 ---
 cmake $SOURCEDIR                                                                            \
       ${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"}                                             \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants