Page 1 of 1

CXX20 ? Cannot compile on older systems.

Posted: Sat May 03, 2025 4:55 pm
by PMaff
Hello,

I tried the latest Beta version today and cmake said:
-- Module support is disabled.
-- Version: 8.1.1
-- Build type:
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
CMake Error in /home/pmaff/Technical/Finance/MMEX/latest/moneymanagerex/build/CMakeFiles/CMakeScratch/TryCompile-6JLYmD/CMakeLists.txt:
Target "cmTC_44e44" requires the language dialect "CXX20" (with compiler
extensions). But the current compiler "GNU" does not support this, or
CMake does not know the flags to enable it.


CMake Error at /usr/local/share/cmake-3.30/Modules/Internal/CheckSourceCompiles.cmake:101 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/local/share/cmake-3.30/Modules/Internal/CheckCompilerFlag.cmake:18 (cmake_check_source_compiles)
/usr/local/share/cmake-3.30/Modules/CheckCXXCompilerFlag.cmake:34 (cmake_check_compiler_flag)
3rd/fmt/support/cmake/cxx14.cmake:12 (check_cxx_compiler_flag)
3rd/fmt/CMakeLists.txt:127 (include)


-- Configuring incomplete, errors occurred!

Does this mean I cannot compile MMEX on older systems anymore just because you switch to C++20 now?
:-(

Re: CXX20 ? Cannot compile on older systems.

Posted: Sat May 03, 2025 5:58 pm
by Renato

Re: CXX20 ? Cannot compile on older systems.

Posted: Sat May 03, 2025 9:04 pm
by PMaff
Thanks Renato.
I already tried an older commit with C++17 on Ubuntu 18.04.6 LTS, which works:
https://github.com/moneymanagerex/money ... 2848800767

Commit : 35f152115 (2025-05-02)
on
Ubuntu.24.04.noble
with C++20 compiles but seg faults then:
https://github.com/moneymanagerex/money ... 2848787776

The MMEX developers have to decide if they use C++17 or if MMEX loses older platforms like Ubuntu 18.04 with C++20.

Re: CXX20 ? Cannot compile on older systems.

Posted: Sat May 03, 2025 11:44 pm
by guangong
Thanks @PMaff for reaching out on here and GitHub.

We have upgraded from c++11 to c++20 recently (trakced via MMEX is upgrading to C++20

For MMEX building from scratch on older platforms, upgrading GCC version might help.

Re: CXX20 ? Cannot compile on older systems.

Posted: Sun May 04, 2025 6:22 am
by Renato

Re: CXX20 ? Cannot compile on older systems.

Posted: Sun May 04, 2025 1:37 pm
by PMaff
guangong wrote: Sat May 03, 2025 11:44 pm Thanks @PMaff for reaching out on here and GitHub.

We have upgraded from c++11 to c++20 recently (trakced via MMEX is upgrading to C++20

For MMEX building from scratch on older platforms, upgrading GCC version might help.
I have seen that.
I am not convinced, that it is a good idea to go with the incomplete C++20.
I'd suggest to stay with C++17 currently till C++20 is completely implemented in gcc and Microsoft compiler.
At that time it will not matter if we lose older systems like Ubuntu 18.04 .

Re: CXX20 ? Cannot compile on older systems.

Posted: Fri May 09, 2025 11:44 pm
by guangong
It was downgraded to C++17 to be compatible with old Linux env via https://github.com/moneymanagerex/money ... /pull/7481

Re: CXX20 ? Cannot compile on older systems.

Posted: Sun May 18, 2025 2:25 pm
by PMaff
guangong wrote: Fri May 09, 2025 11:44 pm It was downgraded to C++17 to be compatible with old Linux env via https://github.com/moneymanagerex/money ... /pull/7481
I think, this is a good decision.
As soon as C++20 is completely implemented, the older Linux version will not be a "problem" anyway.

Ubuntu 18.04 LTS works with gcc 7-5-0 .
Thanks!

Re: CXX20 ? Cannot compile on older systems.

Posted: Sun May 18, 2025 2:28 pm
by PMaff
Renato wrote: Sun May 04, 2025 6:22 am For your information: https://github.com/moneymanagerex/money ... r/BUILD.md
Thanks Renato.
The guidance for Linux was partly written by me. ;-)