From b4714635506778f2f0abef922c377ccf4ca1dedb Mon Sep 17 00:00:00 2001 From: Stefan Gerlach <stefan.gerlach@uni-konstanz.de> Date: Wed, 11 Dec 2024 10:00:00 +0100 Subject: [PATCH 1/5] cmake: try fix linking --- .gitlab-ci.yml | 6 +++--- CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a9ce7cb05..564095afcc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,10 +12,10 @@ include: # - /gitlab-templates/linux.yml # - /gitlab-templates/windows.yml # currently fails linking -# - /gitlab-templates/linux-qt6.yml - - /gitlab-templates/windows-qt6.yml + - /gitlab-templates/linux-qt6.yml +# - /gitlab-templates/windows-qt6.yml # - /gitlab-templates/freebsd.yml - - /gitlab-templates/freebsd-qt6.yml +# - /gitlab-templates/freebsd-qt6.yml ### DEPLOY # - /gitlab-templates/craft-appimage.yml - /gitlab-templates/craft-appimage-qt6.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f2d06a593..0ce4618f9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,7 @@ if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") set(DONT_BUILD_READSTAT TRUE) endif() if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 14) # GCC14 enables -fhardened and fails without -fPIC - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-error=hardened") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=hardened") endif() elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") message(STATUS "Clang C compiler ${CMAKE_C_COMPILER_VERSION} detected, adding compile flags") @@ -166,7 +166,7 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GENERIC_CXX_FLAGS} ${GENERIC_GNU_FLAGS} -Wzero-as-null-pointer-constant") # -Wzero-as-null-pointer-constant since version 5 endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14) # GCC14 enables -fhardened and fails without -fPIC - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-error=hardened") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=hardened") endif() elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") message(STATUS "Clang C++ compiler ${CMAKE_CXX_COMPILER_VERSION} detected, adding compile flags") -- GitLab From 880b0db6f4d7f333eb8691d54a62203877dea196 Mon Sep 17 00:00:00 2001 From: Stefan Gerlach <stefan.gerlach@uni-konstanz.de> Date: Wed, 11 Dec 2024 10:22:27 +0100 Subject: [PATCH 2/5] triage link errors --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ce4618f9e..1337b981b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,7 @@ if(${ENABLE_COMPILER_OPTIMIZATION}) else() set(COMPILER_OPTIMIZATION_FLAG "-O0") endif() -set (GENERIC_FLAGS "-Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector-strong") +set (GENERIC_FLAGS "-Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector") set (GENERIC_GNU_FLAGS "${COMPILER_OPTIMIZATION_FLAG} -Wcast-align -Wswitch-enum -fvisibility=default -pedantic") set (GENERIC_C_FLAGS "${GENERIC_FLAGS} -fno-exceptions") # liborigin needs exceptions -- GitLab From e47c7e356686ccd28102c1440ceb5d9c337d7d9b Mon Sep 17 00:00:00 2001 From: Stefan Gerlach <stefan.gerlach@uni-konstanz.de> Date: Wed, 11 Dec 2024 12:38:05 +0100 Subject: [PATCH 3/5] try fix link errors --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 62db5c6b23..a75924e3b8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -30,6 +30,6 @@ endif() option(ENABLE_TEST_DEPENDENCIES "Enable Dependencies Tests" ON) if(ENABLE_TEST_DEPENDENCIES) add_executable (DependenciesTest DependenciesTest.cpp) - target_link_libraries(DependenciesTest labplottest labplotlib) + target_link_libraries(DependenciesTest labplotbackendlib labplotlib labplottest) add_test(NAME DependenciesTest COMMAND DependenciesTest) endif() -- GitLab From 82fc1569b506f52af4f2603c19c31489b85229b9 Mon Sep 17 00:00:00 2001 From: Stefan Gerlach <stefan.gerlach@uni-konstanz.de> Date: Wed, 11 Dec 2024 12:56:32 +0100 Subject: [PATCH 4/5] Revert "triage link errors" This reverts commit 880b0db6f4d7f333eb8691d54a62203877dea196. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1337b981b2..0ce4618f9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,7 @@ if(${ENABLE_COMPILER_OPTIMIZATION}) else() set(COMPILER_OPTIMIZATION_FLAG "-O0") endif() -set (GENERIC_FLAGS "-Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector") +set (GENERIC_FLAGS "-Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector-strong") set (GENERIC_GNU_FLAGS "${COMPILER_OPTIMIZATION_FLAG} -Wcast-align -Wswitch-enum -fvisibility=default -pedantic") set (GENERIC_C_FLAGS "${GENERIC_FLAGS} -fno-exceptions") # liborigin needs exceptions -- GitLab From 694d5bdb8184f9ba27167adeecb45143a4881043 Mon Sep 17 00:00:00 2001 From: Stefan Gerlach <stefan.gerlach@uni-konstanz.de> Date: Wed, 11 Dec 2024 13:08:28 +0100 Subject: [PATCH 5/5] finalize --- .gitlab-ci.yml | 4 ++-- CMakeLists.txt | 4 ++-- data/pics/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 564095afcc..0392d821bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,9 +13,9 @@ include: # - /gitlab-templates/windows.yml # currently fails linking - /gitlab-templates/linux-qt6.yml -# - /gitlab-templates/windows-qt6.yml + - /gitlab-templates/windows-qt6.yml # - /gitlab-templates/freebsd.yml -# - /gitlab-templates/freebsd-qt6.yml + - /gitlab-templates/freebsd-qt6.yml ### DEPLOY # - /gitlab-templates/craft-appimage.yml - /gitlab-templates/craft-appimage-qt6.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ce4618f9e..855e661eaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") message(STATUS "Building ReadStat disabled due to GNU C compiler version 11") set(DONT_BUILD_READSTAT TRUE) endif() - if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 14) # GCC14 enables -fhardened and fails without -fPIC + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 14) # overwrite -Werror=hardened to not fail set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=hardened") endif() elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") @@ -165,7 +165,7 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") message(STATUS "GNU C++ compiler ${CMAKE_CXX_COMPILER_VERSION} detected, adding compile flags") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GENERIC_CXX_FLAGS} ${GENERIC_GNU_FLAGS} -Wzero-as-null-pointer-constant") # -Wzero-as-null-pointer-constant since version 5 endif() - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14) # GCC14 enables -fhardened and fails without -fPIC + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14) # overwrite -Werror=hardened to not fail set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=hardened") endif() elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") diff --git a/data/pics/CMakeLists.txt b/data/pics/CMakeLists.txt index 2c1868d20d..7b8256788c 100644 --- a/data/pics/CMakeLists.txt +++ b/data/pics/CMakeLists.txt @@ -56,5 +56,5 @@ sc-apps-labplot-zoom-select.svg sc-apps-labplot-zoom-select-x.svg sc-apps-labplot-zoom-select-y.svg sc-apps-labplot-zoom.svg -DESTINATION ${KDE_INSTALL_ICONDIR}/ +DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor) -- GitLab