From 50f4fd74e6b29ea5724f83dc6beebd87358a8dcf Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Thu, 23 Jul 2026 14:47:46 +0200 Subject: [PATCH] build: consume shipdatamodel 0.3.0 and drop the data-model overlay The RecHit and per-detector hit headers Shannon needs now ship in the released shipdatamodel 0.3.0 (on prefix.dev/ship), so the .local-deps overlay that built data-model from pull/5/head is no longer required. - pin shipdatamodel >=0.3 and resolve it from the conda env - drop the fetch/configure/build/install-datamodel tasks, the .local-deps LD_LIBRARY_PATH activation, and the SHiPDataModel_DIR configure override - remove the DT_RUNPATH linker workaround, which existed only so the overlay could shadow the released shipdatamodel; default conda RPATH now points at the correct shipdatamodel in the env --- .gitignore | 1 - CMakeLists.txt | 12 ------------ activate.sh | 2 -- pixi.lock | 21 +++++++++++---------- pixi.toml | 27 ++------------------------- 5 files changed, 13 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index e503971..01e8f44 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ build/ build-*/ install/ -.local-deps/ .cache/ .pixi/ __pycache__/ diff --git a/CMakeLists.txt b/CMakeLists.txt index cdcaf8a..83b5c78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,18 +11,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-as-needed") -# Emit DT_RUNPATH instead of DT_RPATH (the conda toolchain defaults to the -# latter, which overrides LD_LIBRARY_PATH). The activation script puts the -# .local-deps data-model overlay on LD_LIBRARY_PATH, which must win over the -# released shipdatamodel in the conda env. -set(CMAKE_SHARED_LINKER_FLAGS - "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-new-dtags" -) -set(CMAKE_MODULE_LINKER_FLAGS - "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--enable-new-dtags" -) -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--enable-new-dtags") - # Dependencies find_package(SHiPDataModel REQUIRED) find_path(Random123_INCLUDE_DIR Random123/philox.h REQUIRED) diff --git a/activate.sh b/activate.sh index 5a2206e..3c98a4d 100755 --- a/activate.sh +++ b/activate.sh @@ -11,5 +11,3 @@ export LD_LIBRARY_PATH="$PIXI_PROJECT_ROOT/build${LD_LIBRARY_PATH:+:$LD_LIBRARY_ # shipgeometry installs geometry DBs under $CONDA_PREFIX/share/geometry/. # geometry_geomodel_provider resolves bare db_file names via this variable. export SHIPGEOMETRY_ROOT="${SHIPGEOMETRY_ROOT:-$CONDA_PREFIX}" - -export LD_LIBRARY_PATH="$PIXI_PROJECT_ROOT/.local-deps/data-model/lib:$LD_LIBRARY_PATH" diff --git a/pixi.lock b/pixi.lock index 07d5335..130231d 100644 --- a/pixi.lock +++ b/pixi.lock @@ -383,7 +383,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - conda: https://prefix.dev/ship/linux-64/libjsonnet-0.22.0-hb0f4dca_1.conda - conda: https://prefix.dev/ship/linux-64/mp-units-2.5.0-hb0f4dca_5.conda - - conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.1.0-h0566472_1.conda + - conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.3.0-ha28ff26_0.conda - conda: https://prefix.dev/ship/linux-64/shipgeometry-0.2.1-hb0f4dca_1.conda - conda: https://prefix.dev/ship/linux-64/shipgeometryservice-0.1.0-hb0f4dca_1.conda - conda: https://prefix.dev/ship/noarch/random123-1.14.0-h4616a5c_1.conda @@ -749,7 +749,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - conda: https://prefix.dev/ship/linux-64/libjsonnet-0.22.0-hb0f4dca_1.conda - conda: https://prefix.dev/ship/linux-64/mp-units-2.5.0-hb0f4dca_5.conda - - conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.1.0-h0566472_1.conda + - conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.3.0-ha28ff26_0.conda - conda: https://prefix.dev/ship/linux-64/shipgeometry-0.2.1-hb0f4dca_1.conda - conda: https://prefix.dev/ship/linux-64/shipgeometryservice-0.1.0-hb0f4dca_1.conda - conda: https://prefix.dev/ship/noarch/random123-1.14.0-h4616a5c_1.conda @@ -1134,7 +1134,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - conda: https://prefix.dev/ship/linux-64/libjsonnet-0.22.0-hb0f4dca_1.conda - conda: https://prefix.dev/ship/linux-64/mp-units-2.5.0-hb0f4dca_5.conda - - conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.1.0-h0566472_1.conda + - conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.3.0-ha28ff26_0.conda - conda: https://prefix.dev/ship/linux-64/shipgeometry-0.2.1-hb0f4dca_1.conda - conda: https://prefix.dev/ship/linux-64/shipgeometryservice-0.1.0-hb0f4dca_1.conda - conda: https://prefix.dev/ship/noarch/random123-1.14.0-h4616a5c_1.conda @@ -7790,21 +7790,22 @@ packages: - mp-units >=2.5.0,<2.6.0a0 size: 110217 timestamp: 1781445240307 -- conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.1.0-h0566472_1.conda - sha256: 361589eca9a2ef87965d4707bfda168a0314bc56f878737e01f284a6ff60aa13 - md5: 98b423228cc31bb717056358b2fa06b3 +- conda: https://prefix.dev/ship/linux-64/shipdatamodel-0.3.0-ha28ff26_0.conda + sha256: 897e129417ed0995381656f0fcd751616578ac5f633f275fb7651190d2e6ff75 + md5: 140207d82101fdc1b819f1f5651cc093 depends: - libstdcxx >=15 - libgcc >=15 - __glibc >=2.17,<3.0.a0 - - root_cxx_standard ==23 - root_base >=6.40.2,<6.40.3.0a0 + - root_cxx_standard ==23 + - mp-units >=2.5.0,<2.6.0a0 license: LGPL-3.0-or-later run_exports: weak: - - shipdatamodel >=0.1.0,<0.2.0a0 - size: 51042 - timestamp: 1781881906395 + - shipdatamodel >=0.3.0,<0.4.0a0 + size: 75026 + timestamp: 1784796592267 - conda: https://prefix.dev/ship/linux-64/shipgeometry-0.2.1-hb0f4dca_1.conda sha256: 7d7f6df998b8c374593e7ae9954ceba9afe29c2aa022ca84934b5be7cf6c610f md5: 16b3e83e89636e555343ad3ee37a6b89 diff --git a/pixi.toml b/pixi.toml index 6574f42..86933c9 100644 --- a/pixi.toml +++ b/pixi.toml @@ -9,7 +9,7 @@ platforms = ["linux-64"] [dependencies] # SHiP/HEP packages (prefix.dev/ship + conda-forge) -shipdatamodel="*" +shipdatamodel = ">=0.3" shipgeometryservice = "*" phlex = ">=0.3.0" root = ">=6.36" @@ -33,39 +33,16 @@ cxx-compiler = "*" [activation] scripts = ["activate.sh"] -env = { - LD_LIBRARY_PATH = "$PIXI_PROJECT_ROOT/.local-deps/data-model/lib:$LD_LIBRARY_PATH", -} [tasks] -# Shannon needs the digitised-hit headers from data-model PR #5 (RecHit and -# per-detector hits), which no shipdatamodel release provides yet. Build the PR -# head from a sibling checkout (cloned on demand, e.g. in CI) and overlay it -# via .local-deps; drop the pull/5/head pin once the PR is merged and released. -fetch-datamodel = """ -test -d ../data-model || (git clone --depth 1 https://github.com/ShipSoft/data-model ../data-model \ - && git -C ../data-model fetch --depth 1 origin pull/5/head \ - && git -C ../data-model checkout --detach FETCH_HEAD) -""" -configure-datamodel = { cmd = """ -cmake -S ../data-model -B build-datamodel -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=$PIXI_PROJECT_ROOT/.local-deps/data-model \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -""", depends-on = ["fetch-datamodel"] } -build-datamodel = { cmd = "cmake --build build-datamodel -j8", depends-on = ["configure-datamodel"] } -install-datamodel = { cmd = "cmake --install build-datamodel", depends-on = ["build-datamodel"] } - configure = { cmd = """ cmake -S . -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DSHiPDataModel_DIR=$PIXI_PROJECT_ROOT/.local-deps/data-model/lib/cmake/SHiPDataModel \ -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -""", depends-on = ["install-datamodel"] } +""" } build = { cmd = "cmake --build build -j8", depends-on = ["configure"] } install = { cmd = "cmake --install build", depends-on = ["build"] }