You are not logged in.

#1 2025-01-09 17:15:51

nikolaizombie1
Member
Registered: 2020-09-06
Posts: 5

[Solved] llibintl.h not appearing when building a PKGBUILD

I'm packaging my Rust application to the AUR. However, when I try to build it using makepkg, I get linker errors stating there is a "undefined reference to `libintl_gettext'". This is in spite of the fact that the package that provides 'llibintl.h', gettext, is in the makedepends of the PKGBUILD. What could be done about this issue?

pkgname=waytrogen
pkgver=0.5.0
depends=('gtk4>=4.16.0' 'gettext' 'sqlite' 'pango' 'cairo' 'gdk-pixbuf2' 'glib2' 'gobject-introspection' 'graphene' 'glibc' 'harfbuzz' 'fribidi' 'fontconfig' 'libepoxy' 'libxi' 'libx11' 'libcloudproviders' 'tinysparql' 'libpng' 'libtiff' 'libjpeg-turbo' 'libxkbcommon' 'wayland' 'libxext' 'libxcursor' 'libxdamage' 'libxfixes' 'libxrandr' 'libxinerama' 'libthai' 'libthai' 'zlib' 'freetype2' 'libxrender' 'libxcb' 'pixman' 'util-linux-libs' 'libffi' 'pcre' 'graphite' 'expat' 'json-glib' 'libxml2' 'zstd' 'xz' 'lzo' 'libdatrie' 'bzip2' 'brotli' 'libxau' 'libxdmcp' 'icu')
url="https://github.com/nikolaizombie1/waytrogen"
source=("https://github.com/nikolaizombie1/waytrogen/archive/refs/tags/"$pkgver".tar.gz")
pkgrel=1
makedepends=('rust' 'cargo' 'gettext' 'gcc' 'gcc-libs' 'glibc' )
optdepends=('hyprpaper: hyprland wallpaper setter'
	    'swybg: sway wallpaper setter'
	    'mpvpaper: animated wallpapers using mpv'
	    'swww: wallpaper setter with transitions')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
sha256sums=('SKIP')

prepare() {
  cd "$pkgname-$pkgver"
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cd "$pkgname-$pkgver"
  cargo build --frozen --release --all-features
}

package_waytrogen() {
  install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
  cp -r locales/* /usr/share/locales
}

Last edited by nikolaizombie1 (2025-01-09 22:31:08)

Offline

#2 2025-01-09 20:52:53

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] llibintl.h not appearing when building a PKGBUILD

What could be done about this issue?

You'll need a flux compensator to travel back into a time where libintl was relevant.

What calls libintl_gettext? Your code or some dependency?

Offline

#3 2025-01-09 21:01:34

nikolaizombie1
Member
Registered: 2020-09-06
Posts: 5

Re: [Solved] llibintl.h not appearing when building a PKGBUILD

In the code I'm using gettext-rs for translations and it calls libintl.h for gettext support.

Offline

#4 2025-01-09 21:14:35

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] llibintl.h not appearing when building a PKGBUILD

Your problem isn't the header, you'd need to link a .so that defines that symbol but fwict such thing no longer exists anywhere.

https://github.com/gettext-rs/gettext-r … gettext-rs ?
How exactly do you install that (it's not in the repos nor the AUR?)

Offline

#5 2025-01-09 21:19:59

nikolaizombie1
Member
Registered: 2020-09-06
Posts: 5

Re: [Solved] llibintl.h not appearing when building a PKGBUILD

seth wrote:

Your problem isn't the header, you'd need to link a .so that defines that symbol but fwict such thing no longer exists anywhere.

https://github.com/gettext-rs/gettext-r … gettext-rs ?
How exactly do you install that (it's not in the repos nor the AUR?)

I compile it using cargo just fine on my machine. It's when I try to convert the application to a PKGBUILD it no longer compiles as it normally would. I suspect it's using the library that gettext is using on my machine but the fact that it does not compile in PKGBUILD form is bizarre.

Offline

#6 2025-01-09 21:34:18

loqs
Member
Registered: 2014-03-06
Posts: 18,226

Re: [Solved] llibintl.h not appearing when building a PKGBUILD

https://github.com/gettext-rs/gettext-r … ettext-sys enable the gettext-system feature of the gettext-sys crate or set the environment variable `GETTEXT_SYSTEM` such as with:

  GETTEXT_SYSTEM= cargo build --frozen --release --all-features

Edit:
Also appears to be missing call to cd at the start of package and the locales are not being installed under $pkgdir.

Last edited by loqs (2025-01-09 21:39:45)

Online

#7 2025-01-09 22:21:12

nikolaizombie1
Member
Registered: 2020-09-06
Posts: 5

Re: [Solved] llibintl.h not appearing when building a PKGBUILD

loqs wrote:

https://github.com/gettext-rs/gettext-r … ettext-sys enable the gettext-system feature of the gettext-sys crate or set the environment variable `GETTEXT_SYSTEM` such as with:

  GETTEXT_SYSTEM= cargo build --frozen --release --all-features

Edit:
Also appears to be missing call to cd at the start of package and the locales are not being installed under $pkgdir.

That worked. Thank you so much. I was pulling my hair out. Also thanks for the locales tip.

Offline

Board footer

Powered by FluxBB