|
本帖最后由 qczcb2 于 2025-5-4 10:30 编辑
所用系统为debian-wsl2,使用toolchain安装,gcc版本14.2。toolchain通过后,在build阶段出现三次错误,如下所示。请问应该如何解决?
[ 45%] Building CXX object source/module_basis/module_pw/CMakeFiles/planewave.dir/pw_distributeg_method2.cpp.o
In file included from /home/qczcb2/abacus-develop-LTSv3.10.0/source/module_io/json_output/abacusjson.h:12,
from /home/qczcb2/abacus-develop-LTSv3.10.0/source/module_io/json_output/abacusjson.cpp:1:
/home/qczcb2/abacus-develop-LTSv3.10.0/toolchain/install/rapidjson-1.1.0/include/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/home/qczcb2/abacus-develop-LTSv3.10.0/toolchain/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; }
| ~~~~~~~^~~~~~~~~~~~
[ 45%] Building CXX object source/module_esolver/CMakeFiles/esolver.dir/esolver_fp.cpp.o
gmake[2]: *** [source/module_io/json_output/CMakeFiles/json_output.dir/build.make:79: source/module_io/json_output/CMakeFiles/json_output.dir/abacusjson.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2363: source/module_io/json_output/CMakeFiles/json_output.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 78%] Building CXX object source/module_io/CMakeFiles/io_basic.dir/write_proj_band_lcao.cpp.o
In file included from /home/qczcb2/abacus-develop-LTSv3.10.0/source/module_io/json_output/abacusjson.h:12,
from /home/qczcb2/abacus-develop-LTSv3.10.0/source/module_io/para_json.cpp:11:
/home/qczcb2/abacus-develop-LTSv3.10.0/toolchain/install/rapidjson-1.1.0/include/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/home/qczcb2/abacus-develop-LTSv3.10.0/toolchain/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; }
| ~~~~~~~^~~~~~~~~~~~
[ 78%] Built target io_advanced
[ 78%] Building CXX object source/module_io/CMakeFiles/io_basic.dir/nscf_fermi_surf.cpp.o
gmake[2]: *** [source/module_io/CMakeFiles/io_basic.dir/build.make:471: source/module_io/CMakeFiles/io_basic.dir/para_json.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:2301: source/module_io/CMakeFiles/io_basic.dir/all] Error 2
[ 81%] Built target hamilt_lcao
gmake: *** [Makefile:136: all] Error 2
-- Install configuration: ""
========================== usage =========================
Done!
To use the installed ABACUS version
You need to source /home/qczcb2/abacus-develop-LTSv3.10.0/toolchain/abacus_env.sh first !
"""
|
|