GramEditor/gram
38
986
Fork
You've already forked gram
88

Alpine-friendly releases #99

Closed
opened 2026年03月13日 17:56:46 +01:00 by ekliot · 12 comments
Contributor
Copy link

For the tarball pulled by script/install.sh, on an Alpine system, I get the following errors:

» gram --foreground
Error relocating /home/user/.local/gram.app/libexec/../lib/libxcb.so.1: __isoc23_strtoul: symbol not found
Error relocating /home/user/.local/gram.app/libexec/../lib/libX11.so.6: __isoc23_strtoul: symbol not found
Error relocating /home/user/.local/gram.app/libexec/../lib/libX11.so.6: __isoc23_sscanf: symbol not found
Error relocating /home/user/.local/gram.app/libexec/../lib/libX11.so.6: __isoc23_strtol: symbol not found
Error relocating /home/user/.local/gram.app/libexec/../lib/libxkbcommon.so.0: __isoc23_strtoul: symbol not found
Error relocating /home/user/.local/gram.app/libexec/../lib/libxkbcommon.so.0: __isoc23_strtol: symbol not found
Error relocating /home/user/.local/gram.app/libexec/../lib/libXdmcp.so.6: arc4random_buf: symbol not found
Error relocating /home/user/.local/gram.app/libexec/gram-editor: __isoc23_strtol: symbol not found
Error relocating /home/user/.local/gram.app/libexec/gram-editor: __isoc23_sscanf: symbol not found
Error relocating /home/user/.local/gram.app/libexec/gram-editor: __res_init: symbol not found
Error relocating /home/user/.local/gram.app/libexec/gram-editor: fcntl64: symbol not found

Pretty sure this is a libc issue. I do see that musl is one of the required dependencies for Debian systems in script/linux, but (based on my errors) I think the X11 lib(s) are linked against glibc instead of muslc.

I've confirmed I can run local builds on Alpine.

To remedy this I think all that's needed is to adjust the CI to run on Alpine and adding Alpine/apk logic to script/linux.

Happy to take this on if there is interest.

For the tarball pulled by `script/install.sh`, on an Alpine system, I get the following errors: ``` » gram --foreground Error relocating /home/user/.local/gram.app/libexec/../lib/libxcb.so.1: __isoc23_strtoul: symbol not found Error relocating /home/user/.local/gram.app/libexec/../lib/libX11.so.6: __isoc23_strtoul: symbol not found Error relocating /home/user/.local/gram.app/libexec/../lib/libX11.so.6: __isoc23_sscanf: symbol not found Error relocating /home/user/.local/gram.app/libexec/../lib/libX11.so.6: __isoc23_strtol: symbol not found Error relocating /home/user/.local/gram.app/libexec/../lib/libxkbcommon.so.0: __isoc23_strtoul: symbol not found Error relocating /home/user/.local/gram.app/libexec/../lib/libxkbcommon.so.0: __isoc23_strtol: symbol not found Error relocating /home/user/.local/gram.app/libexec/../lib/libXdmcp.so.6: arc4random_buf: symbol not found Error relocating /home/user/.local/gram.app/libexec/gram-editor: __isoc23_strtol: symbol not found Error relocating /home/user/.local/gram.app/libexec/gram-editor: __isoc23_sscanf: symbol not found Error relocating /home/user/.local/gram.app/libexec/gram-editor: __res_init: symbol not found Error relocating /home/user/.local/gram.app/libexec/gram-editor: fcntl64: symbol not found ``` Pretty sure this is a libc issue. I do see that musl is one of the required dependencies for Debian systems in [script/linux][script/linux], but (based on my errors) I think the X11 lib(s) are linked against glibc instead of muslc. I've confirmed I can run local builds on Alpine. To remedy this I think all that's needed is to adjust the CI to run on Alpine and adding Alpine/apk logic to [script/linux][script/linux]. Happy to take this on if there is interest. [script/linux]: https://codeberg.org/GramEditor/gram/src/commit/1046b2f1de36a8eeb75e7f2f3bb3929310d0e8a6/script/linux
Owner
Copy link

Hi, yes, the tarball for 1.0 does require glibc and quite a recent version as well. Building for musl may be possible, but I suspect that there is a dependency that may cause problems. But let me know if you get it to work! Otherwise the flatpak build may be an option..

Hi, yes, the tarball for 1.0 does require glibc and quite a recent version as well. Building for musl may be possible, but I suspect that there is a dependency that may cause problems. But let me know if you get it to work! Otherwise the flatpak build may be an option..
Contributor
Copy link

I've submitted gram as a package to aports, no response yet. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/98801

2 problems on 1.0.0: one is a build problem (solved on main by #39), the other is that wasi-sdk will not work to build extensions with tree-sitter grammars. Also text flickering.

I've submitted gram as a package to aports, no response yet. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/98801 2 problems on 1.0.0: one is a build problem (solved on main by #39), the other is that wasi-sdk will not work to build extensions with tree-sitter grammars. Also text flickering.
Author
Contributor
Copy link

I've built a fresh checkout from main on Alpine 3.23.3, without text flickering, but I haven't put it through any actual code editing yet, so idk what else might be borked

I've built a fresh checkout from `main` on Alpine 3.23.3, without text flickering, but I haven't put it through any actual code editing yet, so idk what else might be borked
Contributor
Copy link

The text flickering seems to happen together with some heavier LSP tasks like rust-analyzer running cargo check. To be clear this has been an issue in Zed since at least when I first tried 0.162 in November 2024

The text flickering seems to happen together with some heavier LSP tasks like rust-analyzer running cargo check. To be clear this has been an issue in Zed since at least when I first tried 0.162 in November 2024

I've submitted gram as a package to aports, no response yet. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/98801

2 problems on 1.0.0: one is a build problem (solved on main by #39), the other is that wasi-sdk will not work to build extensions with tree-sitter grammars. Also text flickering.

Thank you @selfisekai for packaging it. Could you also build the remote server too please. I happen to remote into another alpine machine inside of a container since zed doesn't support musl. Dropping the container on server would be awesome.

> I've submitted gram as a package to aports, no response yet. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/98801 > > 2 problems on 1.0.0: one is a build problem (solved on main by #39), the other is that wasi-sdk will not work to build extensions with tree-sitter grammars. Also text flickering. Thank you @selfisekai for packaging it. Could you also build the remote server too please. I happen to remote into another alpine machine inside of a container since zed doesn't support musl. Dropping the container on server would be awesome.

This would be amazing to have for something like Chimera Linux, which is also Musl-based

This would be amazing to have for something like Chimera Linux, which is also Musl-based

This would be amazing to have for something like Chimera Linux, which is also Musl-based

I've actually got it building with cbuild already. I just need to submit to cports.

> This would be amazing to have for something like Chimera Linux, which is also Musl-based I've actually got it building with cbuild already. I just need to submit to cports.

@ItsHarper wrote in #99 (comment):

This would be amazing to have for something like Chimera Linux, which is also Musl-based

I've actually got it building with cbuild already. I just need to submit to cports.

huge news tbh, i'll tell my entire team about this

@ItsHarper wrote in https://codeberg.org/GramEditor/gram/issues/99#issuecomment-12060504: > > This would be amazing to have for something like Chimera Linux, which is also Musl-based > > I've actually got it building with cbuild already. I just need to submit to cports. huge news tbh, i'll tell my entire team about this

@darltrash wrote in #99 (comment):

@ItsHarper wrote in #99 (comment):

This would be amazing to have for something like Chimera Linux, which is also Musl-based

I've actually got it building with cbuild already. I just need to submit to cports.

huge news tbh, i'll tell my entire team about this

@darltrash Finally got around to submitting that Chimera Linux PR: https://github.com/chimera-linux/cports/pull/5506

@darltrash wrote in https://codeberg.org/GramEditor/gram/issues/99#issuecomment-12076797: > @ItsHarper wrote in #99 (comment): > > > > This would be amazing to have for something like Chimera Linux, which is also Musl-based > > > > > > I've actually got it building with cbuild already. I just need to submit to cports. > huge news tbh, i'll tell my entire team about this @darltrash Finally got around to submitting that Chimera Linux PR: https://github.com/chimera-linux/cports/pull/5506
Owner
Copy link

I think we have this now.

I think we have this now.

Except launching the Flatpak on a musl system still breaks with the same issue because it tries to launch the glibc binary on the host...

Except launching the *Flatpak* on a musl system still breaks with the same issue because it tries to launch the glibc binary on the host...
Owner
Copy link

The flatpak is generally not the best option right now. I would recommend looking at the cports build instead.

The flatpak is generally not the best option right now. I would recommend looking at the cports build instead.
Sign in to join this conversation.
No Branch/Tag specified
main
test/wgpu-on-mac
test-ci/failing-test-mac
test/failing-test-mac
test/build-on-22-04
test/wgpu-present-mode-mailbox
v2.1
test/altgr-fix-again
test/2.0.0-rc1
test/linux-build
test/objc2
v1.2.1
3.0.1
3.0.0
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.2.1
1.2.0
1.1.0
1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
7 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GramEditor/gram#99
Reference in a new issue
GramEditor/gram
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?