Mount-independent GeographicLib rpath and DEB production fixes
- CMakeLists.txt: add a $ORIGIN-based CMAKE_BUILD_RPATH entry for the bundled GeographicLib (include/GeographicLib/lib), like the existing RTI entry. The imported GeographicLib target only contributed the absolute container mount path to the build RUNPATH, so binaries could not resolve libGeographicLib.so.26 outside the /repo mount. Verified: ddsview built and run in a container with a different mount prefix resolves it via $ORIGIN and starts (rc=0). - new_docker_build.sh: seed the DEB cmake with ARCGIS_INCLUDE_DIR / ARCGIS_LIBRARY (the staged source copy cannot resolve the ArcGIS SDK, which is a relative symlink to the pipeline root dangling after staging); retry the build-tree removal with a clear error when a concurrent build/IDE keeps the directory busy. - Dockerfile: add a late apt layer with devscripts + debhelper (debuild, dh) for the DEB flow; cached Qt/KDReports layers are preserved. - README.md: document that --run-coverage and --run-jenkins-builder are combinable (DEB step runs after the coverage collection).
This commit is contained in:
1 parent
f1f2c5eec8
commit
113d4ab5ed
4 files changed
+47
-11
No files matched your search
@@ -49,8 +49,10 @@ Packages (DEB, via in-tree rpmbuild/make_rpm_ubuntu26_release2.py):
|
||||
|
||||
Coverage (lcov):
|
||||
--run-coverage Build with -O0 --coverage, run ctest and collect
|
||||
the lcov report (README.md Step 6)
|
||||
--coverage-output-dir DIR Report dir (default: <pipeline-root>/coverage/
|
||||
the lcov report (README.md Step 6). Can be
|
||||
combined with --run-jenkins-builder: the DEB
|
||||
step then runs after the coverage collection.
|
||||
--coverage-output-dir DIR Report dir (default: qt6-after/build/coverage/
|
||||
<project>/<os>/; honored when it is an absolute
|
||||
path under the pipeline root)
|
||||
|
||||
@@ -155,10 +157,9 @@ while [[ $# -gt 0 ]]; do
|
||||
esac
|
||||
done
|
||||
|
||||
# Validate mutually exclusive options
|
||||
if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]] && [[ "${RUN_COVERAGE}" == "ON" ]]; then
|
||||
die "Error: --run-jenkins-builder and --run-coverage are mutually exclusive"
|
||||
fi
|
||||
# --run-jenkins-builder and --run-coverage can be combined: the instrumented
|
||||
# build + ctest + lcov collection run first, then the DEB production (which
|
||||
# builds in its own staged directory and never touches the build tree).
|
||||
|
||||
require_command() {
|
||||
if ! command -v "$1" &> /dev/null; then
|
||||
@@ -262,7 +263,16 @@ fi
|
||||
log_info "Configuring CMake..."
|
||||
BUILD_DIR="../build"
|
||||
log_info "Using build directory: ${BUILD_DIR}"
|
||||
rm -rf "${BUILD_DIR}"
|
||||
# Remove the old build tree. A concurrent build (e.g. an IDE) can keep the
|
||||
# directory non-empty while it is being deleted; retry before giving up.
|
||||
rm_ok=0
|
||||
for _ in 1 2 3; do
|
||||
if rm -rf "${BUILD_DIR}" 2>/dev/null; then rm_ok=1; break; fi
|
||||
sleep 2
|
||||
done
|
||||
if [[ "${rm_ok}" != "1" ]]; then
|
||||
die "Cannot remove ${BUILD_DIR} — is another build or IDE using it?"
|
||||
fi
|
||||
mkdir -p "${BUILD_DIR}"
|
||||
# Make it absolute: later steps (ctest/coverage) cd elsewhere and must
|
||||
# still find the build tree.
|
||||
@@ -443,6 +453,16 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
|
||||
die "Staged source incomplete under ${STAGE_DIR} (CMakeLists.txt or make_rpm_ubuntu26_release2.py missing)"
|
||||
fi
|
||||
|
||||
# ArcGIS: the staged source copy cannot resolve the SDK (external/ArcGIS
|
||||
# in the tree is a relative symlink to the pipeline root, dangling after
|
||||
# staging). FindArcGIS trusts ARCGIS_INCLUDE_DIR + ARCGIS_LIBRARY when
|
||||
# both are preset, so seed them with the SDK under the mount root.
|
||||
ARCGIS_SDK_PATH="${DOCKER_MOUNT_ROOT}/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk"
|
||||
ARCGIS_CMAKE_FLAGS=""
|
||||
if [[ -d "${ARCGIS_SDK_PATH}" && -f "${ARCGIS_SDK_PATH}/linux/x64/lib/libEsriRuntimeQt.a" ]]; then
|
||||
ARCGIS_CMAKE_FLAGS=" -DARCGIS_INCLUDE_DIR=${ARCGIS_SDK_PATH}/include -DARCGIS_LIBRARY=${ARCGIS_SDK_PATH}/linux/x64/lib/libEsriRuntimeQt.a"
|
||||
fi
|
||||
|
||||
log_info "Running rpmbuild/make_rpm_ubuntu26_release2.py (PROJECT=${PROJECT} OS_VERSION=${OS_VERSION} LTS_VERSION=${LTS_VERSION} GUEZ_MODE=${GUEZ_MODE} BUILD_NUMBER=${BUILD_NUMBER} BUILD_TAG=${BUILD_TAG})"
|
||||
cd "${STAGE_DIR}/rpmbuild"
|
||||
if python3 make_rpm_ubuntu26_release2.py -c LTS \
|
||||
@@ -450,7 +470,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
|
||||
--version "${LTS_VERSION}" \
|
||||
--output_dir "${DOCKER_MOUNT_ROOT}/rpms/${PROJECT}/${OS_VERSION}/" \
|
||||
--source_dir "${STAGE_DIR}" \
|
||||
--cmake_build_flags "-DUSE_IPO=ON -DUSE_UNITY_BUILD=ON -DGUEZ_MODE=${GUEZ_MODE} -DBUILD_WLS=ON -DBUILD_RTI=ON -DRELEASE_BUILD=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/ " \
|
||||
--cmake_build_flags "-DUSE_IPO=ON -DUSE_UNITY_BUILD=ON -DGUEZ_MODE=${GUEZ_MODE} -DBUILD_WLS=ON -DBUILD_RTI=ON -DRELEASE_BUILD=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/ ${ARCGIS_CMAKE_FLAGS}" \
|
||||
--build_targets "${GROUP1_TARGETS[*]} ${GROUP3_TARGETS[*]} ${GROUP5_TARGETS[*]} ${GROUP6_TARGETS[*]}" \
|
||||
--build_number "${BUILD_NUMBER}" \
|
||||
--release_scope; then
|
||||
|
||||
Reference in new issue
Block a user