Describe the bug
When building ABACUS with rapidjson support with GCC 14.1.0, error occurs:
[ 90%] Building CXX object source/module_io/CMakeFiles/io_basic.dir/write_dos_lcao.cpp.o
[ 90%] Building CXX object source/module_io/CMakeFiles/io_basic.dir/write_orb_info.cpp.o
In file included from /lustre/home/2201110432/WORK/test/abacus-develop/source/module_io/json_output/abacusjson.h:12,
from /lustre/home/2201110432/WORK/test/abacus-develop/source/module_io/para_json.cpp:11:
/lustre/home/2201110432/WORK/test/abacus-develop/toolchain-gcc/install/rapidjson-1.1.0/include/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/lustre/home/2201110432/WORK/test/abacus-develop/toolchain-gcc/install/rapidjson-1.1.0/include/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
319 | GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
| ~~~~~~~^~~~~~~~~~~~
gmake[2]: *** [source/module_io/CMakeFiles/io_basic.dir/build.make:440: source/module_io/CMakeFiles/io_basic.dir/para_json.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
[ 90%] Built target io_input
[ 90%] Built target io_advanced
gmake[1]: *** [CMakeFiles/Makefile2:1839: source/module_io/CMakeFiles/io_basic.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
-- Install configuration: ""
For GCC 8.5.0 or 12.2.0, everything is normal.
Expected behavior
ABACUS with Rapidjson for GCC=14 should be normally built
To Reproduce
build ABACUS with GCC=14.1.0 with -DENABLE_RAPIDJSON=ON , along with:
- SCALAPACK 2.2.1
- OpenMPI 5.0.3
- OpenBLAS 0.3.27
- ELPA 2024.03.001
- CEREAL
Environment
ABACUS version: https://github.com/QuantumMisaka/abacus-develop
Additional Context
No response
Task list for Issue attackers (only for developers)
Describe the bug
When building ABACUS with rapidjson support with GCC 14.1.0, error occurs:
For GCC 8.5.0 or 12.2.0, everything is normal.
Expected behavior
ABACUS with Rapidjson for GCC=14 should be normally built
To Reproduce
build ABACUS with GCC=14.1.0 with -DENABLE_RAPIDJSON=ON , along with:
Environment
ABACUS version: https://github.com/QuantumMisaka/abacus-develop
Additional Context
No response
Task list for Issue attackers (only for developers)