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

GLIBC requirement #50

Closed
tisonkun opened this issue Jan 27, 2024 · 11 comments
Closed

GLIBC requirement #50

tisonkun opened this issue Jan 27, 2024 · 11 comments

Comments

@tisonkun
Copy link

See tisonkun/blog#105.

I wonder if we can use a musl static link distribution or we can upgrade/extend the GLIBC requirement.

@stevenjoezhang
Copy link
Member

Thank you for the feedback. I've looked into possible solutions and found that the neon library we're using doesn't support generating static binaries (see neon-bindings/neon#360). Actually, I used to build hexo-word-counter in a newer compilation environment with a higher libc version. However, some users are using Cloudflare Pages' build environment with an older libc version, which isn't compatible. So, I switched to use an older one, but unfortunately, it's incompatible with Vercel. I'm not sure what the best approach to resolving this issue would be. Do you have any suggestions?

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Apr 17, 2024

@tisonkun I've found that Cloudflare Pages has updated their deployment environment, and I have now also updated to GLIBC version 2.31 on Ubuntu 20.04 (tests show that it also works under Ubuntu 22.04). You can try again.

npm i hexo-word-counter@0.2.0

@stevenjoezhang
Copy link
Member

Cloudflare Pages environment:
截屏2024-04-18 00 11 10
Netlify environment:
截屏2024-04-18 00 14 30
As of April 2024, both of them are using ubuntu 20.04

@tisonkun
Copy link
Author

image

I have updated to 0.2.0 but it seems still try to find GLIBC 2.28?

@tisonkun
Copy link
Author

tisonkun/blog@fcdb768

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Apr 18, 2024

Are you using Vercel for CI? I compiled your blog's code on a Vercel machine, and it shows that it works perfectly fine here. You can check if your Vercel build environment is different from mine. I am using Node.js 20.12.2.

Update: I think I know the cause of the problem. Switching to Node.js version 18 reproduces the same error.
截屏2024-04-18 10 47 05
截屏2024-04-18 10 36 08
截屏2024-04-18 10 40 08

@tisonkun
Copy link
Author

Upgrade vercel runtime to Node 20 solves the issue.

Thank you!

@stevenjoezhang
Copy link
Member

This issue is very strange. Using this plugin with Node.js 18 doesn't work on Vercel, but it does work on Cloudflare Pages.

@tisonkun
Copy link
Author

I don't think it's about Node version actually. Perhaps Vercel packages different GLIBC on their "node 18" env.

@tisonkun
Copy link
Author

This is what I feel uncomfortable with @vercel:

I'm trying to get an info list about the details of env on their deployment, but none of their docs tell what version of GLIBC is available on a certain env.

@stevenjoezhang
Copy link
Member

Yes, in comparison, GitHub has done a good job; they have published the detailed version information of the software pre-installed in their CI images: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md

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