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

errors on build-and-test (latest, ubuntu-latest) #915

Closed
tomcatliu2016 opened this issue Nov 2, 2024 · 3 comments
Closed

errors on build-and-test (latest, ubuntu-latest) #915

tomcatliu2016 opened this issue Nov 2, 2024 · 3 comments

Comments

@tomcatliu2016
Copy link

tomcatliu2016 commented Nov 2, 2024

之前的PR( #911 )虽然解决了Nodejs 20, Nodejs 22的编译错误,但是Nodejs latest(23)还是有问题。
我看了一下错误,原因应该是nan的支持版本没跟上,他们最新只支持到22,23应该还在开发中。
我自己试了一下用Nodejs 23编译OpenCC,能重现完全一样的错误。类似下面:
2024-10-31T13:30:59.2930282Z ../node_modules/nan/nan.h: In function ‘bool Nan::IdleNotification(int)’:
2024-10-31T13:30:59.2932814Z ../node_modules/nan/nan.h:700:39: error: ‘class v8::Isolate’ has no member named ‘IdleNotificationDeadline’

建议先把github actions的nodejs.yml的node-version: [18.x, 20.x, 22.x, latest]的latest拿掉,等nan支持23了,再放进来。
让普通的Nodejs的用户能用上OpenCC,否则一旦需要编译就通不过。
Nodejs 23是10月24日才发布,之前latest一直Nodejs 22,所以以前没出问题。

@tomcatliu2016
Copy link
Author

汇报一下,是我搞错了,最新版nan(2.22.0)支持Nodejs23。
升级nan之后,Ubuntu跑过了。
现在只剩macOS的错误了:
2024-11-02T08:42:39.7556350Z /Users/runner/Library/Caches/node-gyp/23.1.0/include/node/v8config.h:13:2: error: "C++20 or later required."
2024-11-02T08:42:39.7557070Z #error "C++20 or later required."

@tomcatliu2016
Copy link
Author

把出错的地方都修正了,提了一个PR( #916 )

@BYVoid
Copy link
Owner

BYVoid commented Nov 5, 2024

thanks

@BYVoid BYVoid closed this as completed Nov 5, 2024
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