Skip to content
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

Cannot install on Linux with Node 22.5.1 Python 3.12.4 #883

Open
OverflowCat opened this issue Jul 30, 2024 · 4 comments
Open

Cannot install on Linux with Node 22.5.1 Python 3.12.4 #883

OverflowCat opened this issue Jul 30, 2024 · 4 comments

Comments

@OverflowCat
Copy link

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

@BYVoid
Copy link
Owner

BYVoid commented Jul 30, 2024

this was fixed e1f3e6b

@OverflowCat
Copy link
Author

Is this fix available now? Errors persist when installing directly using npm i git+https://github.com/BYVoid/OpenCC.

@BYVoid
Copy link
Owner

BYVoid commented Jul 31, 2024

what is the error log?

@OverflowCat
Copy link
Author

OverflowCat commented Aug 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants