-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which version can be used with GCC 4.8.2 ? #1424
Comments
You might read the Supported compilers section of project description. There are some notes on GCC compiler support there. Also as a workaround, you can disable the check for compiler support by defining |
I am confused: the compiler check // exclude unsupported compilers
#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
#if defined(__clang__)
#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400
#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers"
#endif
#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
#endif
#endif
#endif allows any GCC 4.8 version. Though we only test with GCC 4.8.5 on Travis, also GCC 4.8.2 may work, and it definitely should not trigger the compiler check. Could you double check your compiler version and that it really triggers the error? |
@nlohmann : I am sorry, there was a mistake on my side. I did not notice that MrTRIX3 has bundled an older JSON version (2.1.1) and is not even using the 3.5.0 version that I have installed. |
Thanks for checking back! |
I am installing the software MrTrix3 on our HPC cluster. It requires JSON for modern c++ as a dependency. Our main toolchain to build software is GCC 4.8.2.
Even though the "supported compilers" section in the README states that GCC 4.8 - 9.0 (and possibly later) are supported, JSON for modern c++ 3.5.0 fails, because the header file contains a check for the GCC version that fails for GCC < 4.9.0.
Can this check just be changed to
#if (GNUC * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL) < 40800
to allow for GCC 4.8.2 or is there any older JSON for modern c++ version that works with GCC 4.8.2 ?
The text was updated successfully, but these errors were encountered: