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

can you not use "testing" Rust in Gentoo overlay ebuild? #339

Closed
opened 2026年06月14日 08:17:03 +02:00 by complete_loser_1 · 20 comments

hey @koru
I added your Gentoo overlay to obtain gram, but it uses LLVM_COMPAT=( 22 ) and RUST_MIN_VER="1.95.0": these are marked "testing" and not "stable" yet, so emerge didn't want to install gram.

I don't know how to program in Rust, nor have I experience with ebuilds.
I just need some editor with uuh built-in Clippy and rust-analyzer to edit one file...

hey @koru I added your Gentoo overlay to obtain gram, but it uses `LLVM_COMPAT=( 22 )` and `RUST_MIN_VER="1.95.0"`: these are marked "testing" and not "stable" yet, so emerge didn't want to install gram. I don't know how to program in Rust, nor have I experience with ebuilds. I just need some editor with uuh built-in Clippy and rust-analyzer to edit _one_ file...

I just tried to emerge gram-bin, it requires pipewire, wirepumbler, libpulse aaaaand my system is very cringe, so all it has is ALSA :( . I think I'd run in the same problem even we (you) made the gram ebuild use stable Rust, so I don't think this will work for me. so you guys can make this low-priority I think.

I have apulse[sdk] to lie to Firefox that I have PulseAudio while not having PulseAudio, but I'm not in the mood right now to study this trick and repeat it with your ebuilds, so there's that

I just tried to emerge `gram-bin`, it requires pipewire, wirepumbler, libpulse aaaaand my system is very cringe, so all it has is ALSA :( . I think I'd run in the same problem even we (you) made the `gram` ebuild use stable Rust, so I don't think this will work for me. so you guys can make this low-priority I think. I have `apulse[sdk]` to lie to Firefox that I have PulseAudio while not having PulseAudio, but I'm not in the mood right now to study this trick and repeat it with your ebuilds, so there's that
Contributor
Copy link

@complete_loser_1 wrote in #339 (comment):

hey @koru I added your Gentoo overlay to obtain gram, but it uses LLVM_COMPAT=( 22 ) and RUST_MIN_VER="1.95.0": these are marked "testing" and not "stable" yet, so emerge didn't want to install gram.

I don't know how to program in Rust, nor have I experience with ebuilds. I just need some editor with uuh built-in Clippy and rust-analyzer to edit one file...

Hello! They are most likely specified this way because you need to add this to your make.conf:

ACCEPT_KEYWORDS="~amd64"
# or
ACCEPT_KEYWORDS="~arm64"

Also, we can't downgrade the LLVM and Rust versions because the application most likely just won't compile.

See: https://codeberg.org/gentoo/gentoo/src/branch/master/app-editors/zed and https://codeberg.org/gentoo/gentoo/src/branch/master/app-editors/zed/zed-1.5.4.ebuild#L97-L98.

@krig might know more than I do about which libraries are used in the application, (削除) but if you really need I can try add LLVM 21. (削除ここまで)

Edit: Rust 1.95.0 cannot be compiled using LLVM 21.

@complete_loser_1 wrote in https://codeberg.org/GramEditor/gram/issues/339#issue-5804270: > hey @koru I added your Gentoo overlay to obtain gram, but it uses `LLVM_COMPAT=( 22 )` and `RUST_MIN_VER="1.95.0"`: these are marked "testing" and not "stable" yet, so emerge didn't want to install gram. > > I don't know how to program in Rust, nor have I experience with ebuilds. I just need some editor with uuh built-in Clippy and rust-analyzer to edit _one_ file... Hello! They are most likely specified this way because you need to add this to your make.conf: ```bash ACCEPT_KEYWORDS="~amd64" # or ACCEPT_KEYWORDS="~arm64" ``` Also, we can't downgrade the LLVM and Rust versions because the application most likely just won't compile. See: <https://codeberg.org/gentoo/gentoo/src/branch/master/app-editors/zed> and <https://codeberg.org/gentoo/gentoo/src/branch/master/app-editors/zed/zed-1.5.4.ebuild#L97-L98>. @krig might know more than I do about which libraries are used in the application, ~~but if you really need I can try add LLVM 21.~~ Edit: Rust 1.95.0 cannot be compiled using LLVM 21.
Contributor
Copy link

@complete_loser_1 wrote in #339 (comment):

I just tried to emerge gram-bin, it requires pipewire, wirepumbler, libpulse aaaaand my system is very cringe, so all it has is ALSA :( . I think I'd run in the same problem even we (you) made the gram ebuild use stable Rust, so I don't think this will work for me. so you guys can make this low-priority I think.

I think it's time to add some USE flags to the ebuilds...

@complete_loser_1 wrote in https://codeberg.org/GramEditor/gram/issues/339#issuecomment-17429579: > I just tried to emerge `gram-bin`, it requires pipewire, wirepumbler, libpulse aaaaand my system is very cringe, so all it has is ALSA :( . I think I'd run in the same problem even we (you) made the `gram` ebuild use stable Rust, so I don't think this will work for me. so you guys can make this low-priority I think. I think it's time to add some USE flags to the ebuilds...
Owner
Copy link

@complete_loser_1 wrote in #339 (comment):

I just tried to emerge gram-bin, it requires pipewire, wirepumbler, libpulse aaaaand my system is very cringe, so all it has is ALSA :( . I think I'd run in the same problem even we (you) made the gram ebuild use stable Rust, so I don't think this will work for me. so you guys can make this low-priority I think.

I have apulse[sdk] to lie to Firefox that I have PulseAudio while not having PulseAudio, but I'm not in the mood right now to study this trick and repeat it with your ebuilds, so there's that

Hmm, well, it doesn’t actually need any of those 😄

Probably leftovers from Zed. Should be safe to just remove everything audio-related.

@complete_loser_1 wrote in https://codeberg.org/GramEditor/gram/issues/339#issuecomment-17429579: > I just tried to emerge `gram-bin`, it requires pipewire, wirepumbler, libpulse aaaaand my system is very cringe, so all it has is ALSA :( . I think I'd run in the same problem even we (you) made the `gram` ebuild use stable Rust, so I don't think this will work for me. so you guys can make this low-priority I think. > > I have `apulse[sdk]` to lie to Firefox that I have PulseAudio while not having PulseAudio, but I'm not in the mood right now to study this trick and repeat it with your ebuilds, so there's that Hmm, well, it doesn’t actually need any of those 😄 Probably leftovers from Zed. Should be safe to just remove everything audio-related.

cool!

good luck people

I'll test the stuff as it comes <3

cool! good luck people I'll test the stuff as it comes <3
Contributor
Copy link

@complete_loser_1, can you try emerge again?

@complete_loser_1, can you try emerge again?

I ran "sudo emaint sync -r gram" in order to obtain latest changes.

USE="X wayland" appeared for gram-bin. I added app-editors/gram-bin -wayland to my /etc/portage/package.use/, for I'm running only X.

I didn't do the slot thing for LLVM yet, uuuh it's a bit scary, I'll read about it, so I didn't emerge gram. as for gram-bin, the deps like pipewire, wireplumber and xdg-desktop-portal still appeared, so I didn't proceed.

my effort was minimal, uuuuh, yeah

I ran "sudo emaint sync -r gram" in order to obtain latest changes. `USE="X wayland"` appeared for `gram-bin`. I added `app-editors/gram-bin -wayland` to my `/etc/portage/package.use/`, for I'm running only X. I didn't do the slot thing for LLVM yet, uuuh it's a bit scary, I'll read about it, so I didn't emerge `gram`. as for `gram-bin`, the deps like pipewire, wireplumber and xdg-desktop-portal still appeared, so I didn't proceed. my effort was minimal, uuuuh, yeah
Contributor
Copy link

@complete_loser_1 wrote in #339 (comment):

I ran "sudo emaint sync -r gram" in order to obtain latest changes.

I prefer:

emerge --sync gram

I didn't do the slot thing for LLVM yet, uuuh it's a bit scary, I'll read about it, so I didn't emerge gram. as for gram-bin, the deps like pipewire, wireplumber and xdg-desktop-portal still appeared, so I didn't proceed.

Weird. I removed all sound libs.

I think solution to use latest LLVM is add this lines to make.conf:

ACCEPT_KEYWORDS="~amd64"
LLVM_SLOT="22"

Also you can check actual system ebuild using:

cat /var/db/repos/gram/app-editors/gram-bin/gram-bin-2.2.0.ebuild

@krig, is xgd-desktop-portal really needed to run Gram?

@complete_loser_1 wrote in https://codeberg.org/GramEditor/gram/issues/339#issuecomment-17442818: > I ran "sudo emaint sync -r gram" in order to obtain latest changes. I prefer: ```bash emerge --sync gram ``` > I didn't do the slot thing for LLVM yet, uuuh it's a bit scary, I'll read about it, so I didn't emerge `gram`. as for `gram-bin`, the deps like pipewire, wireplumber and xdg-desktop-portal still appeared, so I didn't proceed. Weird. I removed all sound libs. I think solution to use latest LLVM is add this lines to `make.conf`: ```bash ACCEPT_KEYWORDS="~amd64" LLVM_SLOT="22" ``` Also you can check actual system ebuild using: ```bash cat /var/db/repos/gram/app-editors/gram-bin/gram-bin-2.2.0.ebuild ``` --- @krig, is `xgd-desktop-portal` really needed to run Gram?
Owner
Copy link

@koru wrote in #339 (comment):

@krig, is xgd-desktop-portal really needed to run Gram?

I suspect that it is not strictly necessary as a dependency, no. There are some aspects of the editor that assume XDG spec compliance (move to trash for example) and which may not work as intended, but that shouldn't prevent the editor from largely working.

@koru wrote in https://codeberg.org/GramEditor/gram/issues/339#issuecomment-17443154: > @krig, is `xgd-desktop-portal` really needed to run Gram? I suspect that it is not strictly necessary as a dependency, no. There are some aspects of the editor that assume XDG spec compliance (move to trash for example) and which may not work as intended, but that shouldn't prevent the editor from largely working.
Contributor
Copy link

@complete_loser_1, updated! Try again.

@complete_loser_1, updated! Try again.

success!

first I tried gram-bin, I didn't enable anything LLVM 22, and it installed without pulling any crazy dependencies, in fact, it didn't require anything else that I didn't already have.

an entry appeared in my Xfce startup menu under "Development" called "Gram (bin)" and frog icon, it opened instantly. I was greeted by an "Onboring" tab, I immediately see a toggle to enable Vim mode, but it doesn't toggle, in fact, most buttons doesn't seen to work at first, no visual feedback.

I struggled a little to open a "project", because "Open Local Folder" gives me a listing of folders in my $HOME, but when I click one, it doesn't allow me to choose one of its subdirectories, rather opening the folder directly.
in the end, I navigated to the folder I wanted in a terminal instance (I'd need one open anyway), and ran gram-bin ., and it worked. I opened the one main.rs file I had, Vim mode was enabled after all, and it showed me 77 warnings of unused variables, and I'm yet to write more Rust code to see if Clippy gives any sign of life.

then I deselected gram-bin and tried to build gram from source. it wanted LLVM 22, so I didn't proceed.

I wanted to argue that requiring a non-"stable" LLVM slot would put off other users from compiling gram themselves on Gentoo. honestly? there is gram-bin now, and... instead of mucking around, we can just.... wait for LLVM 22 go "stable"?

I'll try LLVM 22 just for the sake of experience tho, I'll report shortly.

I'll work with Gram now, if it works, then I shall uninstall VS Code hehehehehe

success! first I tried `gram-bin`, I didn't enable anything LLVM 22, and it installed without pulling any crazy dependencies, in fact, it didn't require anything else that I didn't already have. an entry appeared in my Xfce startup menu under "Development" called "Gram (bin)" and frog icon, it opened instantly. I was greeted by an "Onboring" tab, I immediately see a toggle to enable Vim mode, but it doesn't toggle, in fact, most buttons doesn't seen to work at first, no visual feedback. I struggled a little to open a "project", because "Open Local Folder" gives me a listing of folders in my `$HOME`, but when I click one, it doesn't allow me to choose one of its subdirectories, rather opening the folder directly. in the end, I navigated to the folder I wanted in a terminal instance (I'd need one open anyway), and ran `gram-bin .`, and it worked. I opened the one `main.rs` file I had, Vim mode was enabled after all, and it showed me 77 warnings of unused variables, and I'm yet to write more Rust code to see if Clippy gives any sign of life. then I deselected `gram-bin` and tried to build `gram` from source. it wanted LLVM 22, so I didn't proceed. I wanted to argue that requiring a non-"stable" LLVM slot would put off other users from compiling `gram` themselves on Gentoo. honestly? there is `gram-bin` now, and... instead of mucking around, we can just.... wait for LLVM 22 go "stable"? I'll try LLVM 22 just for the sake of experience tho, I'll report shortly. I'll work with Gram now, if it works, then I shall uninstall VS Code hehehehehe
Contributor
Copy link

@complete_loser_1 wrote in #339 (comment):

then I deselected gram-bin and tried to build gram from source. it wanted LLVM 22, so I didn't proceed.

You can install both versions at the same time (probably).

I wanted to argue that requiring a non-"stable" LLVM slot would put off other users from compiling gram themselves on Gentoo. honestly? there is gram-bin now, and... instead of mucking around, we can just.... wait for LLVM 22 go "stable"?

LLVM 22 was released 4-5 months ago. Now almost every package support this version.

I'll try LLVM 22 just for the sake of experience tho, I'll report shortly.

Also Clang + Mold/Wild is only way to use Gentoo (IMHO).

I'll work with Gram now, if it works, then I shall uninstall VS Code hehehehehe

Electron is bloat.

@complete_loser_1 wrote in https://codeberg.org/GramEditor/gram/issues/339#issuecomment-17486513: > then I deselected `gram-bin` and tried to build `gram` from source. it wanted LLVM 22, so I didn't proceed. You can install both versions at the same time (probably). > I wanted to argue that requiring a non-"stable" LLVM slot would put off other users from compiling `gram` themselves on Gentoo. honestly? there is `gram-bin` now, and... instead of mucking around, we can just.... wait for LLVM 22 go "stable"? LLVM 22 was released 4-5 months ago. Now almost every package support this version. > I'll try LLVM 22 just for the sake of experience tho, I'll report shortly. Also Clang + Mold/Wild is only way to use Gentoo (IMHO). > I'll work with Gram now, if it works, then I shall uninstall VS Code hehehehehe Electron is bloat.
Contributor
Copy link

@krig, I think the issue can be closed.

@krig, I think the issue can be closed.

follow up. more success!! all fine

I deselected app-editors/gram-bin and selected app-editors/gram.

then, I did not run sudo emerge --ask --depclean (I forgor)

then, instead of changing make.conf as instructed, I followed this instruction: https://wiki.gentoo.org/wiki/Project:LLVM/Testing_new_LLVM_versions

on the same file /etc/portage/package.accept_keywords/llvm-22 I also appended the following line: dev-lang/rust-bin-1.95.0

then I ran sudo emerge --ask --update --deep --changed --changed-use --newuse @world @desktop @devus (long command, but I just repeat it from from Bash history)

relievingly, it didn't try to recompile everything that depends on LLVM. however, it failed, with this message:

>>> Installing (19 of 19) app-editors/gram-2.2.0::gram
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 * 	/usr/libexec/gram-editor
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * app-editors/gram-bin-2.2.0:0::gram
 * 	/usr/libexec/gram-editor
 * 
 * Package 'app-editors/gram-2.2.0' NOT merged due to file collisions. If
 * necessary, refer to your elog messages for the whole content of the
 * above message.
>>> Completed (19 of 19) app-editors/gram-2.2.0::gram
>>> Failed to install app-editors/gram-2.2.0, Log file:
>>> '/var/tmp/portage/app-editors/gram-2.2.0/temp/build.log'

how sad. I ran sudo emerge --ask --depclean. among the packages was app-editors/gram-bin

then I ran sudo emerge --resume in hopes of not recompiling the entirety of LLVM a second time (how sad)

it recompiled app-editors/gram and installed it without complaints.

it ran similarly how I previously ran gram-bin

I don't recall if Gentoo has a way to say that two packages are incompatible to each other (like in Arch where packages can conflict), so I have no judgements over my session, I dunno if my experience could've been improved.

follow up. more success!! all fine I deselected `app-editors/gram-bin` and selected `app-editors/gram`. then, I did <u>not</u> run `sudo emerge --ask --depclean` (I forgor) then, instead of changing `make.conf` as instructed, I followed this instruction: https://wiki.gentoo.org/wiki/Project:LLVM/Testing_new_LLVM_versions on the same file `/etc/portage/package.accept_keywords/llvm-22` I also appended the following line: `dev-lang/rust-bin-1.95.0` then I ran `sudo emerge --ask --update --deep --changed --changed-use --newuse @world @desktop @devus` (long command, but I just repeat it from from Bash history) relievingly, it didn't try to recompile everything that depends on LLVM. however, it failed, with this message: ``` >>> Installing (19 of 19) app-editors/gram-2.2.0::gram * This package will overwrite one or more files that may belong to other * packages (see list below). You can use a command such as `portageq * owners / <filename>` to identify the installed package that owns a * file. If portageq reports that only one package owns a file then do * NOT file a bug report. A bug report is only useful if it identifies at * least two or more packages that are known to install the same file(s). * If a collision occurs and you can not explain where the file came from * then you should simply ignore the collision since there is not enough * information to determine if a real problem exists. Please do NOT file * a bug report at https://bugs.gentoo.org/ unless you report exactly * which two packages install the same file(s). See * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how * to solve the problem. And once again, please do NOT file a bug report * unless you have completely understood the above message. * * Detected file collision(s): * * /usr/libexec/gram-editor * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * app-editors/gram-bin-2.2.0:0::gram * /usr/libexec/gram-editor * * Package 'app-editors/gram-2.2.0' NOT merged due to file collisions. If * necessary, refer to your elog messages for the whole content of the * above message. >>> Completed (19 of 19) app-editors/gram-2.2.0::gram >>> Failed to install app-editors/gram-2.2.0, Log file: >>> '/var/tmp/portage/app-editors/gram-2.2.0/temp/build.log' ``` how sad. I ran `sudo emerge --ask --depclean`. among the packages was `app-editors/gram-bin` then I ran `sudo emerge --resume` in hopes of not recompiling the entirety of LLVM a second time (how sad) it recompiled `app-editors/gram` and installed it without complaints. it ran similarly how I previously ran `gram-bin` I don't recall if Gentoo has a way to say that two packages are incompatible to each other (like in Arch where packages can conflict), so I have no judgements over my session, I dunno if my experience could've been improved.
Owner
Copy link

I was greeted by an "Onboarding" tab, I immediately see a toggle to enable Vim mode, but it doesn't toggle, in fact, most buttons doesn't seen to work at first, no visual feedback.

Just a note that this may be a separate issue related to file watchers, closing the editor and opening it again should be enough to get it working.

> I was greeted by an "Onboarding" tab, I immediately see a toggle to enable Vim mode, but it doesn't toggle, in fact, most buttons doesn't seen to work at first, no visual feedback. Just a note that this may be a separate issue related to file watchers, closing the editor and opening it again should be enough to get it working.
Contributor
Copy link

@complete_loser_1, both (source and binary version) require same file: /usr/libexec/gram-editor.

@complete_loser_1, both (source and binary version) require same file: `/usr/libexec/gram-editor`.

Hi, not to hijack the issue, but as you already discuss modifying the ebuild here I decided not to create a new one - @koru do you think that vulkan-loader dependency could be specified like this media-libs/vulkan-loader[wayland?,X?]? As an example, it's done this way in gui-libs/gtk.

Hi, not to hijack the issue, but as you already discuss modifying the ebuild here I decided not to create a new one - @koru do you think that `vulkan-loader` dependency could be specified like this `media-libs/vulkan-loader[wayland?,X?]`? As an example, it's done this way in [gui-libs/gtk](https://codeberg.org/gentoo/gentoo/src/commit/536f4fb170f30de6df8c05d4e52ba0dbd2151d0e/gui-libs/gtk/gtk-4.18.6-r1.ebuild#L50).
Contributor
Copy link

@teddy_beer_maniac wrote in #339 (comment):

Hi, not to hijack the issue, but as you already discuss modifying the ebuild here I decided not to create a new one - @koru do you think that vulkan-loader dependency could be specified like this media-libs/vulkan-loader[wayland?,X?]? As an example, it's done this way in gui-libs/gtk.

Hello! It's ok. I think we can try that. Almost all deps in Gram ebuilds based on Zed ebuild.

@teddy_beer_maniac wrote in https://codeberg.org/GramEditor/gram/issues/339#issuecomment-17540504: > Hi, not to hijack the issue, but as you already discuss modifying the ebuild here I decided not to create a new one - @koru do you think that `vulkan-loader` dependency could be specified like this `media-libs/vulkan-loader[wayland?,X?]`? As an example, it's done this way in [gui-libs/gtk](https://codeberg.org/gentoo/gentoo/src/commit/536f4fb170f30de6df8c05d4e52ba0dbd2151d0e/gui-libs/gtk/gtk-4.18.6-r1.ebuild#L50). Hello! It's ok. I think we can try that. Almost all deps in Gram ebuilds based on Zed ebuild.

okay fellas, I actually sat down to use Gram installed from koru's overlay, and it werks. I got Clippy holding my hand and the Vim keycombo "g." for code completion action, so I'm now writing code and that was my primary objective.
so from my part, I'm satisfied, the GUI has some bugs, but bah, all that matters to me right now is Clippy and the code actions menu
time to uninstall (ahem "deselect") VS Code
thanks guys S2 S2 s2

okay fellas, I actually sat down to use Gram installed from koru's overlay, and it _werks_. I got Clippy holding my hand and the Vim keycombo "g." for code completion action, so I'm now writing code and that was my primary objective. so from my part, I'm satisfied, the GUI has some bugs, but bah, all that matters to me right now is Clippy and the code actions menu time to uninstall (ahem "deselect") VS Code thanks guys S2 S2 s2
Contributor
Copy link

@krig, I think the issue can be closed.

@krig, I think the issue can be closed.
Sign in to join this conversation.
main
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
4 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#339
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?