You are not logged in.
I have tried installing:
- spot-client-git ( https://aur.archlinux.org/packages/spot-client-git/ )
- shortwave-git ( https://aur.archlinux.org/packages/shortwave-git/ )
- zellij-git ( https://aur.archlinux.org/packages/zellij-git/ )
- fractal-git ( https://aur.archlinux.org/packages/fractal-git/ )
- ...
they fail with the following issue when linking:
- http://ix.io/2W3X (manual `makepkg -s`)
- http://ix.io/2W3R (using AUR helper "paru")
- http://ix.io/2WKN
- ...
I have Rust installed through RustUp:
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/icar/.rustup
stable-x86_64-unknown-linux-gnu (default)
rustc 1.51.0 (2fd73fabe 2021-03-23)
I have tried with "rust" package from the official repositories, same exact result.
I have pacman-git (6.0.0alpha1.r86.gc294b7cb)
and I have the following makepkg.conf: http://ix.io/2WKO
Last edited by icar (2021-04-20 17:49:37)
Offline
I guess most AUR packages are to be built with rust, not rustup. spot-client-git builds fine here. shortwave-git' s build takes very long on my machine, so I cannot confirm or unconfirm your problem yet.
Offline
Package "rust" in repos is at version 1.51.0. As you can see in the first post, rustup installed rustc 1.51.0 aswell.
I don't understand how that would make any difference.
Offline
Try it. rust comes with a bunch of libraries, rustup pulls them from third party repos.
Edit: also shortwave-git builds fine here using rust.
Last edited by Stefan Husmann (2021-04-14 19:17:42)
Offline
With "rust" installed I get the same linking error.
Last edited by icar (2021-04-14 20:33:28)
Offline
Remove -flto from CFLAGS and the issue should be resolved.
Offline
Remove -flto from CFLAGS and the issue should be resolved.
Thanks, loqs.
EDIT: It did not resolve the issue. I still have the same issue. My new makepkg.conf:
http://ix.io/2Waj
Last edited by icar (2021-04-15 11:54:43)
Offline
I reproduced the issue with:
# Maintainer: Daniel Peukert <daniel@peukert.cc>
_projectname='spot'
pkgname="$_projectname-client-git"
pkgver=0.1.13.r5.g02613db
pkgrel=1
pkgdesc='Gtk/Rust native Spotify client - git version'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/xou816/$_projectname"
license=('MIT')
depends=('alsa-lib' 'glib2' 'gtk3' 'libhandy' 'libpulse' 'openssl')
optdepends=('org.freedesktop.secrets')
makedepends=('cargo' 'git' 'meson>=0.50.0')
checkdepends=('appstream-glib')
provides=("$_projectname-client")
conflicts=("$_projectname-client")
source=("$pkgname::git+$url")
sha256sums=('SKIP')
_sourcedirectory="$pkgname"
_builddirectory='build'
pkgver() {
cd "$srcdir/$_sourcedirectory/"
git describe --long --tags | sed -e 's/^v//' -e 's/-\([^-]*-g[^-]*\)$/-r\1/' -e 's/-/./g'
}
build() {
CPPFLAGS=""
CFLAGS="-march=native -O3 -pipe -flto -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS \
-Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS"
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
RUSTFLAGS="-C opt-level=2 -C target-cpu=native"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j8"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
DEBUG_RUSTFLAGS="-C debuginfo=2"
cd "$srcdir/"
meson setup --prefix '/usr' --libexecdir 'lib' --sbindir 'bin' --buildtype 'release' --wrap-mode 'nodownload' \
-Db_lto='true' -Db_pie='true' -Doffline='false' -Dfeatures='warn-cache' "$_sourcedirectory" "$_builddirectory"
meson compile -C "$_builddirectory"
}
check() {
cd "$srcdir/"
meson test -C "$_builddirectory"
}
package() {
cd "$srcdir/"
DESTDIR="$pkgdir" meson install -C "$_builddirectory"
install -Dm644 "$_sourcedirectory/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
Removing -flto and the build succeeded.
Offline
I've updated the OP with new makepkg.conf and some other packages I tried and more info.
EDIT:
Removing -flto, adding !lto and clearing all caches worked.
Maybe related to packages assuming -no-pie when -flto (I was told ArchLinux uses -fPIE )
Last edited by icar (2021-04-20 17:49:21)
Offline