From 37bd7005646c1cb2bf25b91e1303ecca6c15a444 Mon Sep 17 00:00:00 2001 From: berrux_dev Date: Thu, 15 Oct 2026 11:36:54 +0200 Subject: [PATCH] Fixed make error --- .../Proxies/TrainingAreaBase/CMakeLists.txt | 5 +-- qt6-after/qt6-migrated-legatus/README.md | 18 ++++++++++- .../TetraIF/LogView/CMakeLists.txt | 2 ++ .../jenkins-ci-rme/Jenkinsfile | 2 +- .../jenkins-ci-rme/release-16-10-2026.sh | 2 +- .../qt6-migrated-legatus/new_docker_build.sh | 32 ++----------------- 6 files changed, 27 insertions(+), 34 deletions(-) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/CMakeLists.txt index 38888647e..9812c6387 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/CMakeLists.txt @@ -33,6 +33,9 @@ SET(SRCS_telegrams training_area_telegrams.h ) NGL_ADD_LIBRARY(AAR SV WS HLA tabTelegrams STATIC ${SRCS_telegrams}) + +# tabTelegrams is a STATIC lib linked into shared/MODULE targets +SET_TARGET_PROPERTIES(tabTelegrams PROPERTIES POSITION_INDEPENDENT_CODE ON) NGL_TARGET_INCLUDE_DIRECTORIES(tabTelegrams PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/.. @@ -78,8 +81,6 @@ LIST(APPEND SRCS_common # Create target only if component flags allow NGL_ADD_LIBRARY2(AAR SV WS HLA svcTabCommon SHARED ${SRCS_common}) -# Generate export header ALWAYS (needed for logger.h even if target not built) -# Use custom command to create minimal export header if target wasn't created IF(NOT TARGET svcTabCommon) # Create a dummy static library just for export header generation ADD_LIBRARY(svcTabCommon STATIC ${SRCS_common}) diff --git a/qt6-after/qt6-migrated-legatus/README.md b/qt6-after/qt6-migrated-legatus/README.md index bf58b47a0..fda7fc867 100644 --- a/qt6-after/qt6-migrated-legatus/README.md +++ b/qt6-after/qt6-migrated-legatus/README.md @@ -103,6 +103,22 @@ docker run --rm -it -v /path/to/pipeline-root:/workspace legatus-qt6:1.0 \ && make -j8' ``` +## Run an executable directly + +To run a built executable interactively — e.g. the GUI apps under +`build4/bin/` (`LogView`, `PrtCnv`) against your local display — start a +shell inside the container with X11 forwarding: + +```bash +docker run --rm -it \ + -e DISPLAY \ + -e LC_ALL=C.UTF-8 \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v /path/to/pipeline-root:/workspace \ + legatus-qt6:1.0 \ + bash -c 'cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/build4 && exec bash' +``` + ## Step 3 — Run the tests ### 3.1 ctest (automatic) @@ -258,7 +274,7 @@ ones: | Option | Default | Purpose | |---|---|---| -| `--docker-image IMAGE` | `legatus-qt6-prebuilt:latest` | image to use/build/delete | +| `--docker-image IMAGE` | `legatus-qt6:1.0` | image to use/build/delete | | `--build-prebuilt-image` | — | build the image from `./Dockerfile` and exit | | `--delete-prebuilt-image` | — | delete the image and exit | | `--run-jenkins-builder` | off | produce the DEB packages (Step 4) | diff --git a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/CMakeLists.txt index 779e01dcf..13a3cbf20 100644 --- a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/CMakeLists.txt @@ -14,6 +14,8 @@ NGL_TARGET_LINK_LIBRARIES(LogViewLogger NGLLogger ) +SET_TARGET_PROPERTIES(LogViewLogger PROPERTIES POSITION_INDEPENDENT_CODE ON) + SET(my_SRCS IntegerCalculator.cpp IntegerCalculator.hpp diff --git a/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/Jenkinsfile b/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/Jenkinsfile index d44929030..fb6ae9bb1 100644 --- a/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/Jenkinsfile +++ b/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/Jenkinsfile @@ -17,7 +17,7 @@ def project = 'guez' def legatusRoot = 'qt-migration-legatus/qt6-after/qt6-migrated-legatus' -def imageName = 'legatus-qt6-prebuilt:latest' +def imageName = 'legatus-qt6:1.0' properties([ disableConcurrentBuilds(), diff --git a/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/release-16-10-2026.sh b/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/release-16-10-2026.sh index 044d9ebd2..facc6e82b 100755 --- a/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/release-16-10-2026.sh +++ b/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/release-16-10-2026.sh @@ -29,7 +29,7 @@ export GUEZ_MODE="${GUEZ_MODE:-ON}" export BUILD_NUMBER="${BUILD_NUMBER:-$(date +%Y%m%d-%H%M%S)}" export BUILD_TAG="${BUILD_TAG:-release-qt6-first}" -DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6-prebuilt:latest}" +DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6:1.0}" log_info() { printf 'INFO: %s\n' "$*" diff --git a/qt6-after/qt6-migrated-legatus/new_docker_build.sh b/qt6-after/qt6-migrated-legatus/new_docker_build.sh index 246f48f5c..78998169a 100755 --- a/qt6-after/qt6-migrated-legatus/new_docker_build.sh +++ b/qt6-after/qt6-migrated-legatus/new_docker_build.sh @@ -28,7 +28,7 @@ Builds the release validation scope inside the prebuilt Docker image: Options: --docker-image IMAGE Docker image name to use/build/delete - (default: legatus-qt6-prebuilt:latest) + (default: legatus-qt6:1.0) --build-prebuilt-image Build the prebuilt Docker image (from ./Dockerfile) and exit. To run the build with it, run the script again with --docker-image @@ -276,20 +276,12 @@ build_prebuilt_image() { require_command docker -# MIGRATE_PIPELINE_ROOT resolution (highest precedence first): -# 1. exported environment variable (e.g. from a Jenkinsfile) -# 2. .envrc in this directory (if present) -# 3. derived from this script's location - the script always lives at -# /qt-migration-legatus/qt6-after/qt6-migrated-legatus, so the -# pipeline root is three levels up. This makes the script work in a -# fresh Jenkins checkout with no environment setup at all. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" MIGRATE_PIPELINE_ROOT_DEFAULT="$(cd "${SCRIPT_DIR}/../../.." && pwd)" PIPELINE_ROOT_EXPORTED="${MIGRATE_PIPELINE_ROOT:-}" if [[ -f ".envrc" ]]; then set -a - # shellcheck disable=SC1091 source ".envrc" set +a fi @@ -394,7 +386,7 @@ if [[ "${RUN_COVERAGE}" == "ON" && "${RUN_JENKINS_BUILDER}" == "ON" ]]; then fi # Default for the Docker image name -DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6-prebuilt:latest}" +DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6:1.0}" # Export variables for Docker container export RELEASE_BUILD RUN_CTEST BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE RUN_JENKINS_BUILDER PACKAGE_OUTPUT_DIR RUN_COVERAGE COVERAGE_OUTPUT_DIR LTS_VERSION PROJECT GUEZ_MODE BUILD_NUMBER BUILD_TAG @@ -488,17 +480,8 @@ rm -rf build4 mkdir -p build4 cd build4 -# RELEASE_BUILD=ON selects the release scope (TetraIF, Z/src, Lts/Common + -# TrainingAreaBase); all other BUILD_* flags are left at their CMake defaults. COV_CMAKE_ARGS=() if [[ "${RUN_COVERAGE}" == "ON" ]]; then - # Instrument the Release build with gcov. CMAKE__FLAGS_RELEASE replaces - # the default "-O3 -DNDEBUG" entirely, so -O0/--coverage must be carried - # there (plain CMAKE__FLAGS would come first on the command line and - # lose to -O3); -DNDEBUG is kept so behavior matches the standard build. - # -fPIC: plain static libs (e.g. tabTelegrams) are not PIC by default and - # are linked into shared libraries - at -O0 the non-PIC relocations show up - # at link time. Never add USE_IPO/USE_UNITY_BUILD here - LTO breaks gcov. COV_CMAKE_ARGS=( "-DCMAKE_C_FLAGS_RELEASE=-O0 -g --coverage -DNDEBUG -fPIC" "-DCMAKE_CXX_FLAGS_RELEASE=-O0 -g --coverage -DNDEBUG -fPIC" @@ -529,21 +512,12 @@ else log_info "Skipping CTest" fi -# Code coverage (lcov): capture, filter to the release scope and generate the -# HTML report. Runs only in --run-coverage mode, after ctest (so the .gcda -# data files exist). cwd is build4, so --directory . is the build tree; all -# artifacts are written via absolute paths. if [[ "${RUN_COVERAGE}" == "ON" ]]; then log_info "=== Code coverage (lcov) ===" COVOUT=/workspace/coverage-out SRCROOT=/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus mkdir -p "${COVOUT}" - - # GCC 15 + lcov 2.x: the branch data (libstdc++, Qt headers and some of - # our sources) trips lcov's consistency checks (mismatch / inconsistent), - # and a filter pattern that matches no file is an "unused" error. The - # extract step below keeps only the release scope, so these quirks do not - # affect the report - ignore those error classes on every step. + COV_IGNORE=(--ignore-errors mismatch,inconsistent,unused) lcov --capture --directory . --external "${COV_IGNORE[@]}" \ --rc branch_coverage=1 \