Closed loganmc10 closed 10 months ago
Fixed with this patch:
diff --git a/Source/Script/Build.sh b/Source/Script/Build.sh
index ddb7588..aa4325c 100755
--- a/Source/Script/Build.sh
+++ b/Source/Script/Build.sh
@@ -15,7 +15,7 @@ fi
mkdir -p "$build_dir"
-cmake -S "$toplvl_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="$build_config" -DPORTABLE_INSTALL=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Ninja"
+cmake -S "$toplvl_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="$build_config" -DPORTABLE_INSTALL=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_LIBFMT=ON -G "Ninja"
cmake --build "$build_dir" --parallel "$threads"
Is GCC 13 available in fedora yet? If it isn't then that error makes sense, std::format
has only been added to GCC since 13.0, and yeah using the -DUSE_LIBFMT=ON
option helps, I'll try seeing if I can automate that check in cmake instead.
gcc 13 is included with Fedora 38.
Distros don't typically update something like gcc to a new major version within the same OS release.
So for example, Ubuntu 22.04 is going to be stuck with GCC 11 until it is EOL (same for RHEL9).
You can possibly check in CMAKE with something like:
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
and then always set -DUSE_LIBFMT
in those cases
Does this branch work for you? https://github.com/Rosalie241/RMG/tree/cmake-libfmt
I've tested it with the ubuntu CI, flatpak builder and my archlinux installation and it works fine, so I pushed https://github.com/Rosalie241/RMG/commit/4b99d9de67de56cb346cfb0ca709fb0038aac0a9 to master and it should be fixed for you aswell, thank you for the report!
I followed these instructions: