OpenCC icon indicating copy to clipboard operation
OpenCC copied to clipboard

Cannot install on Linux with Node 22.5.1 Python 3.12.4

Open OverflowCat opened this issue 7 months ago • 4 comments

npm install got

452 error ../deps/rapidjson-1.1.0/rapidjson/document.h:2175:62:   required from ‘rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>& rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::ParseStream(InputStream&) [with unsigned int parseFlags = 1; InputStream = rapidjson::GenericInsituStringStream<rapidjson::UTF8<> >; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator]’
452 error  2175 |         return ParseStream<parseFlags, Encoding, InputStream>(is);
452 error       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
452 error ../deps/rapidjson-1.1.0/rapidjson/document.h:2200:58:   required from ‘rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>& rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::ParseInsitu(Ch*) [with unsigned int parseFlags = 0; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator; Ch = char]’
452 error  2200 |         return ParseStream<parseFlags | kParseInsituFlag>(s);
452 error       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
452 error ../src/Config.cpp:275:21:   required from here
452 error   275 |   doc.ParseInsitu<0>(const_cast<char*>(json.c_str()));
452 error       |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
452 error ../deps/rapidjson-1.1.0/rapidjson/document.h:1939:24: 警告:‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class rapidjson::GenericValue<rapidjson::UTF8<> >’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
452 error  1939 |             std::memcpy(e, values, count * sizeof(GenericValue));
452 error       |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
452 error ../deps/rapidjson-1.1.0/rapidjson/document.h:540:7: 附注:‘class rapidjson::GenericValue<rapidjson::UTF8<> >’ declared here
452 error   540 | class GenericValue {
452 error       |       ^~~~~~~~~~~~
452 error make: *** [opencc.target.mk:117:Release/obj.target/opencc/node/opencc.o] 错误 1
452 error gyp ERR! build error 
452 error gyp ERR! stack Error: `make` failed with exit code: 2
452 error gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/node-gyp/lib/build.js:216:23)
452 error gyp ERR! System Linux 6.9.10-1-MANJARO
452 error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--module=/usr/lib/node_modules/opencc/build/Release/opencc.node" "--module_name=opencc" "--module_path=/usr/lib/node_modules/opencc/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v127"
452 error gyp ERR! cwd /usr/lib/node_modules/opencc
452 error gyp ERR! node -v v22.5.1
452 error gyp ERR! node-gyp -v v10.2.0
452 error gyp ERR! not ok 

Full log is attached: 2024-07-30T12_00_51_860Z-debug-0.log

OverflowCat avatar Jul 30 '24 12:07 OverflowCat