Package Details: helix-git 23.10.r461.g527cbe656-1

Git Clone URL: (read-only, click to copy)
Package Base: helix-git
Description: A text editor written in rust
Upstream URL:
Keywords: editor
Licenses: MPL-2.0
Conflicts: helix
Provides: hx
Submitter: Wojciechkepka
Maintainer: Robin_Jadoul
Last Packager: Robin_Jadoul
Votes: 8
Popularity: 0.021392
First Submitted: 2021-06-01 19:08 (UTC)
Last Updated: 2024-03-29 13:59 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

1 2 3 4 Next › Last »

xiota commented on 2024-03-29 20:19 (UTC) (edited on 2024-03-29 23:44 (UTC) by xiota)

Default makepkg.conf enables LTO (look in pacnew files for updates). To prevent linker errors, most rust packages need options=(!lto) or other changes added to PKGBUILD.

Robin_Jadoul commented on 2024-03-29 13:59 (UTC) (edited on 2024-03-29 14:00 (UTC) by Robin_Jadoul)

Took me a while to confirm, as the pkgbuild always just worked for me, but

  • Enabling lto (which I believe is only fat lto, no way to choose thin lto) in /etc/makepkg.conf (which is disabled by default) does seem to trigger linker failures
  • for tokio_unstable, the same observation, that the tests simply compiled and passed for me. In fact, they still do, even after enabling (and consequently disabling on the PKGBUILD level) lto. I'm not sure where the problem stems from, maybe some difference in compiler version, somehow? Either way, I'll add the flag before the integration test in the hopes it alleviates the issues people are having.
  • I can't confirm rustc 1.70 being used, both checking embedded strings in the final binary and the content of ~/.rustup/toolchains gives me the expected current stable
  • Adding the license key. That was mostly just an oversight/not being present when I took over the maintenance

sereinity commented on 2024-03-02 20:37 (UTC)

To make the build pass the tokio error, I make explicit the usage of tokio_unstable. I don't know why thi has been ignored by makepkg, they already have enabled it in

TLDR: here is my current diff to build the package (+pkgver of course):

diff --git a/PKGBUILD b/PKGBUILD
index 04017ed..cfa8b95 100644
@@ -8,6 +8,7 @@ pkgdesc="A text editor written in rust"
 makedepends=('git' 'cargo')
@@ -50,6 +51,7 @@ check() {
     export RUSTUP_TOOLCHAIN=stable
     export CARGO_TARGET_DIR=target
     cargo test --frozen --offline --workspace
+    export RUSTFLAGS="--cfg tokio_unstable"
     cargo integration-test --frozen --offline

petrus7 commented on 2024-02-23 21:01 (UTC)

A few remarks and a working PKGBUILD, not a complete solution but might be a bit of help for the time being.

  • Building manually from the master branch usually works for me with occasional test failures which is expected. Both stable and nightly work.

  • I don't think that the current settings of environment variables have the desired effects. For whatever reason the build seems to always starts up with downloading toolchain 1.70.0, check your ~/.rustup/toolchains

  • It is not clear to me why (!tlo) option "helps", seems rather coincidental, then tests fail with similar linking problems. In particular, when building manually lto = "thin" is used for release.

Here is my working PKGBUILD at incorporating a pristine manual build into the package building process performed by makepkg. It is a shell trick but works!

Right now I don't feel like untangling the interaction between makepkg and helix' cargo build process. However, I use helix and wanted to keep close to the master branch so I just rebuild helix into my local package repo using the PKGBUILD above.

MuratOzsoyler commented on 2024-02-19 19:32 (UTC)

I confirm that @mekyt's solution works, at least on the initial compilation. But somewhere in the tests it spits out E0412 error while compiling.

mekyt commented on 2024-02-16 16:16 (UTC) (edited on 2024-02-16 16:23 (UTC) by mekyt)

The solution should be to add options=(!lto) in the PKGBUILD file.

I was having the same problem with a package I maintained. Still a error during the check but it's more a dependency problem due to unstable version.

error[E0412]: cannot find type `Id` in module `tokio::runtime`
   --> helix-event/src/
45  |         parking_lot::RwLock<hashbrown::HashMap<tokio::runtime::Id, &'static T, ahash::RandomState>>,
    |                                                                ^^ not found in `tokio::runtime`
note: found an item that was configured out
   --> /home/meak/.local/cargo/registry/src/
371 |         pub use id::Id;
    |                     ^^

For more information about this error, try `rustc --explain E0412`.
error: could not compile `helix-event` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in check().

MuratOzsoyler commented on 2024-02-15 21:30 (UTC)

I cloned helix-editor/helix repository compiled with --release flag without issues. After testing that executable worked correctly, I stripped out the fetch and compilation phases of the PKCONFIG and redirect thecollection of the executables to the files I had just compiled. This way I have obtained a properly installed new version. What can we deduce from this? As the cloned repository can build normally, is there a minor difference in the environments between cloned and makepkgd repositories?

Robin_Jadoul commented on 2024-02-15 19:09 (UTC)

At a guess, from looking at the symbols, it would be extra/tree-sitter. However, none of my compiled helix binaries or ts grammars seems to link to the lib, nor do the helix docs or the rust ts lib docs mention it as a necessary dependency.