-
Notifications
You must be signed in to change notification settings - Fork 45
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
Aur Package lto issue #149
Comments
And i'm getting that some packages are from 2021, not sure if newer versions are available |
i just tried compiling latest master(50e64f0) with LTO, which seems to compile and run just fine. also i dont know if the owner of this package is the same one publishing the AUR; also please be more specific which AUR package you use (there is |
Do you have lto in makepkg.conf enabled by default?, the issue is when you have it, and lto in the rust compile options, and most arch based distros have lto enabled by default, also termusic-git |
i have not tried the aur package, i had tried the latest git and compiled with cargo directly (after adding the LTO profile option); i do not know enough where the LTO option from the PKGBUILD would be otherwise applied, that is why i asked if this is resolved now. |
yes, i've tried the same approach with other rust programs, see woelper/oculante#191, and it works, tbh its prolly a bug in makepkg or something, i doubt it's resolved, and well one would like to install from aur instead of recompiling each update directly in cargo |
just for testing (and because i could), i tested diff: diff --git a/PKGBUILD b/PKGBUILD
index f69bbc6..fb46cce 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,12 +7,11 @@ pkgdesc='Music Player TUI written in Rust'
arch=(x86_64)
url=https://github.com/tramhao/termusic
license=(GPL3 MIT)
-depends=(dbus gst-libav gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly gstreamer mpv protobuf ueberzug) # alsa-lib libmpv.so
+depends=(dbus gst-libav gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly gstreamer mpv protobuf) # alsa-lib libmpv.so
makedepends=(cargo git)
optdepends=('ffmpeg: extract audio by downloader' 'yt-dlp: download files')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
-options=(!lto)
source=("$pkgname::git+$url.git")
sha256sums=(SKIP) if the problem still persists for you, please explain more where it fails and what the error is and what your system is |
So, I stumbled upon here, getting the same issue when Here's the exact log of what happens:
From what I can try to understand reading it, it seems to stumble on the https://github.com/rqlite/rqlite crate, but I'm not expert in those questions. Disabling |
@Porkepix 50e64f0 is about two months old now, could you try some newer version? could you provide PS: also please note that i too am not am linking expert |
The build log is from HEAD (0.7.11.r356.gac006a8-1), it's just the error message at the end that's misleading and I didn't set the beginning of the logs before every rust compiling lines where it was showing it was building that version, my bad. As was visible from logs, rustc is latest, but here are full commands info if you want:
As for running this manually fro cargo, I tried various ways but couldn't find one that was acting the same way (messages about experimental features and so on), nor could I find good documentation on the good way to do this. |
i dont quite know what this would be referencing. the simplest build i can imagine with rust's lto (assuming you have rust and the build dependencies installed): git clone https://github.com/tramhao/termusic.git --depth 10
cd termusic
# enable LTO (to my understanding)
sed -i -- "s/# lto = true/lto = true/" Cargo.toml
cargo build --release
# verify all binaries exist
ls -al target/release/{termusic,termusic-server} i dont know what the git clone https://aur.archlinux.org/termusic-git.git
cd termusic-git
# remove that dependency, as it does not exist for me
sed -i -- "s/ueberzug//" PKGBUILD
# explicitly enable lto
sed -i -- "s/options=(\!lto)/options=(lto)/" PKGBUILD
makepkg but i dont know how to fix it, the best i could come up with if wanting to have some lto is to use the lto option in the cargo file: git clone https://aur.archlinux.org/termusic-git.git
cd termusic-git
# remove that dependency, as it does not exist for me
sed -i -- "s/ueberzug//" PKGBUILD
# get source
makepkg -o
# enable rust's lto
sed -i -- "s/# lto = true/lto = true/" src/termusic-git/Cargo.toml
# build without resetting source (and so not undoing the sed)
makepkg -e |
I'm not the maintainer of arch packages. |
It may depend on if you merged the new version of this file: https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/blob/main/makepkg.conf?ref_type=heads from the I have two other rust packages affected (one of them have When I was looking for ways to have |
if you mean |
You need to disable lto at PKGBUILD to compile properly the program, if not an error will occur. Please add '!lto' into options array
The text was updated successfully, but these errors were encountered: