|
From: <bo...@gm...> - 2025-08-20 19:23:17
|
On 2025-08-19 08:45 +0200, Florent Rougon via Flightgear-devel wrote:
> So, unless I'm mistaken, you implicitly used this:
>
> CARES DATA FGFS OSG SIMGEAR PLIB
That's correct.
I've been testing more things. I spun up a few virtual machines with
fresh installations of Debian 11, 12, 13, Ubuntu 22.04 and 24.04. On all
of these the error occurs. To be clear, I'm talking about the error with
the
/usr/bin/ld: ../../lib/libosg.so.3.6.5: undefined reference to `gl...'
messages, I reported in the beginning.
Following James' intuition, the error disappears upon explicitly setting
the policy to OLD or legacy behaviour, while changing nothing else.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b9219edc..ef548413c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,8 @@ if(COMMAND cmake_policy)
# Allows passing -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
cmake_policy(SET CMP0069 NEW)
+ cmake_policy(SET CMP0072 OLD)
+
#### FlightGear: macOS: set RPATH policy
cmake_policy(SET CMP0042 NEW)
I went a little further and applied Scott's commit 7ee1243a from OSG
next to OSG release/2024-build, defacto cherry-picking it.
After cleaning up the merge conflicts as best as I could, I came up with
the attached patch. And the error disappeared! Can anyone (Florent?;-)
check my results?
I would like to thank Florent, James and Scott for the insights I can
learn from you all. Thank you very much!
|