You are not logged in.

#1 2020-10-24 22:31:08

MountainX
Member
Registered: 2016-02-08
Posts: 371

[SOLVED] make: /usr/bin/lrelease: No such file or directory

I'm learning about packaging in chroot environments and I'm working with the AUR package x2godesktopsharing because it has problems that are helping me learn. Can anyone help me with this error?

Here's what I'm doing. I'm starting with a chroot created by extra-x86_64-build and I have installed git into it.

$ sudo arch-chroot /mnt/chroots/arch/test3/myuser
[root@laptop /]# install -dm 755 /opt/builds/ -o builduser
[root@laptop /]# su builduser
[builduser@laptop /]$ cd /opt/builds/
[builduser@laptop builds]$ git clone https://aur.archlinux.org/x2godesktopsharing.git
Cloning into 'x2godesktopsharing'...
[all OK; redacted]

[builduser@laptop builds]$ cd x2godesktopsharing/
[builduser@laptop x2godesktopsharing]$ ls -la
total 12
drwxr-x--x 3 builduser builduser  120 Oct 24 18:07 .
drwxr-x--x 5 builduser builduser  100 Oct 24 18:07 ..
drwxr-x--x 8 builduser builduser  260 Oct 24 18:07 .git
-rw-r----- 1 builduser builduser 3082 Oct 24 18:07 PKGBUILD
-rw-r----- 1 builduser builduser  990 Oct 24 18:07 .SRCINFO
-rw-r----- 1 builduser builduser   25 Oct 24 18:07 x2godesktopsharing-sysusers.conf

I have this code already written to handle a missing dependency in this PKGBUILD:

# Fix up certain packages:
if [ -f x2godesktopsharing/PKGBUILD ]; then
  # x2godesktopsharing is missing dependency: qt5-svg
  grep "depends.*qt5-svg" x2godesktopsharing/PKGBUILD >/dev/null
  if [[ $? -ne 0 ]]; then
    sed -i.bak '/depends=/ s/\x27)/\x27 \x27qt5-svg\x27)/' x2godesktopsharing/PKGBUILD
  fi
  less x2godesktopsharing/PKGBUILD 
fi

I also need the GPG key for this package:

[builduser@laptop x2godesktopsharing]$ gpg --keyserver keyserver.ubuntu.com --recv-keys F4A7678C9C6B0B2B
gpg: key F4A7678C9C6B0B2B: public key "X2go Git Administrator <git-admin@x2go.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

I think the package should be ready to build now, but I get the error shown below:

[builduser@laptop x2godesktopsharing]$ makepkg -si
==> Making package: x2godesktopsharing 3.2.0.0-1 (Sat 24 Oct 2020 06:10:02 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found x2godesktopsharing-3.2.0.0.tar.gz
  -> Found x2godesktopsharing-3.2.0.0.tar.gz.asc
  -> Found x2godesktopsharing-sysusers.conf
==> Validating source files with sha512sums...
    x2godesktopsharing-3.2.0.0.tar.gz ... Passed
    x2godesktopsharing-3.2.0.0.tar.gz.asc ... Skipped
    x2godesktopsharing-sysusers.conf ... Passed
==> Verifying source file signatures with gpg...
    x2godesktopsharing-3.2.0.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting x2godesktopsharing-3.2.0.0.tar.gz with bsdtar
==> Starting build()...
Info: creating stash file /opt/builds/x2godesktopsharing/src/x2godesktopsharing-3.2.0.0/.qmake.stash
/usr/bin/lrelease x2godesktopsharing_cs.ts
make: /usr/bin/lrelease: No such file or directory
make: *** [Makefile:381: x2godesktopsharing_cs.qm] Error 127
==> ERROR: A failure occurred in build().
    Aborting...

I get this same error when using other chroots (e.g., created without using extra-x86_64-build).

The location "/usr/bin/lrelease" is not mentioned in the PKGBUILD. Anyone have any ideas about this error?

# Maintainer: Felix Golatofski <contact@xdfr.de>
# Contributor: Milan Knížek <knizek@volny.cz>

pkgname=x2godesktopsharing
pkgver=3.2.0.0
pkgrel=1
pkgdesc="X2Go add-on tool that allows a user to grant other X2go users access to the current session (shadow session support)."
arch=('x86_64')
url="<http://www.x2go.org/>"
license=('GPL')
depends=('x2goserver>=4.0.1' 'qt5-base' 'qt5-svg')
options=(emptydirs)
groups=('x2go' 'alts')
source=("https://code.x2go.org/releases/source/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.asc}
        'x2godesktopsharing-sysusers.conf')
sha512sums=('bbf23c0cf9426d8c0a9450525f5cf692a4ddd51b1b50b9c4045597ba76c3add258153f7ad832605f08a30bca1822fd868d5f6b1bbb46bf0daf53333b1656163d'
            'SKIP'
            '67aae752373174504d5b2de52f2b4bb195cc111033525a9e166bcd0da79ef9be0295850666050f1847a9f2895bb20656b3f1ca82b4c0565d2c35769be6542e4f')
validpgpkeys=('1AD23D1B8F087A35AB74BDE9F4A7678C9C6B0B2B')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  qmake-qt5 x2godesktopsharing.pro
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  install -D -m 755 x2godesktopsharing "$pkgdir/usr/bin/x2godesktopsharing"

  install -d -m 755 "$pkgdir/usr/share/applications"
  install    -m 644 x2godesktopsharing.desktop "$pkgdir/usr/share/applications/x2godesktopsharing.desktop"

  install -d -m 755 "$pkgdir/usr/share/x2godesktopsharing/icons"
  install    -m 644 icons/x2godesktopsharing.xpm "$pkgdir/usr/share/x2godesktopsharing/icons/x2godesktopsharing.xpm"

  install -d -m 755 "$pkgdir/usr/share/icons/hicolor/128x128/apps"
  install    -m 644 icons/128x128/x2godesktopsharing.png "$pkgdir/usr/share/icons/hicolor/128x128/apps/x2godesktopsharing.png"

  install -d -m 755 "$pkgdir/usr/share/icons/hicolor/16x16/apps"
  install    -m 644 icons/16x16/x2godesktopsharing.png "$pkgdir/usr/share/icons/hicolor/16x16/apps/x2godesktopsharing.png"

  install -d -m 755 "$pkgdir/usr/share/icons/hicolor/64x64/apps"
  install    -m 644 icons/64x64/x2godesktopsharing.png "$pkgdir/usr/share/icons/hicolor/64x64/apps/x2godesktopsharing.png"

  install -d -m 755 "$pkgdir/usr/share/icons/hicolor/32x32/apps"
  install    -m 644 icons/32x32/x2godesktopsharing.png "$pkgdir/usr/share/icons/hicolor/32x32/apps/x2godesktopsharing.png"

  gzip man/man1/x2godesktopsharing.1
  install -d -m 755 "$pkgdir/usr/share/man/man1"
  install    -m 644 -t "$pkgdir/usr/share/man/man1" man/man1/x2go*.gz

 # gzip man/man8/x2go*-desktopsharing.8
 # install -d -m 755 "$pkgdir/usr/share/man/man8"
 # install    -m 644 -t "$pkgdir/usr/share/man/man8" man/man8/x2go*-desktopsharing.8.gz

  install -d -m 755 "$pkgdir/usr/share/menu"

  install -d -m 755 -d "${pkgdir}/usr/share/doc/${pkgname}"

  install -d -m 755 "${pkgdir}/usr/share/x2go/versions/"
  echo ${pkgver} > "${pkgdir}/usr/share/x2go/versions/VERSION.$pkgname"

  install -D -m 755 "share/x2gofeature.d/x2godesktopsharing.features" "${pkgdir}/usr/share/x2go/x2gofeature.d/x2godesktopsharing.features"

  install -D -m 644 "$srcdir/x2godesktopsharing-sysusers.conf" "$pkgdir/usr/lib/sysusers.d/x2godesktopsharing.conf"
}

Last edited by MountainX (2020-10-25 00:56:59)

Offline

#2 2020-10-24 22:47:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] make: /usr/bin/lrelease: No such file or directory

$ pacman -F lrelease
extra/qt5-tools 5.15.1-1 (qt qt5)
    usr/bin/lrelease

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-10-24 23:15:50

MountainX
Member
Registered: 2016-02-08
Posts: 371

Re: [SOLVED] make: /usr/bin/lrelease: No such file or directory

Trilby wrote:
$ pacman -F lrelease
extra/qt5-tools 5.15.1-1 (qt qt5)
    usr/bin/lrelease

Oh! Duh. Thank you. :-)

Offline

#4 2020-10-24 23:29:16

MountainX
Member
Registered: 2016-02-08
Posts: 371

Re: [SOLVED] make: /usr/bin/lrelease: No such file or directory

adding qt5-svg and qt5-tools resolves all the errors with this package.

Should these be listed in depends() or makedepends()? I tested both ways, and both allow the package to build.

Offline

#5 2020-10-24 23:32:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [SOLVED] make: /usr/bin/lrelease: No such file or directory

that depends on whether these can be removed during runtime or are required only for compiling, I'd assume they are needed during runtime so you should put them into depends (... when you install the resulting package makedeps are not going to be installed into the target system)

Offline

#6 2020-10-24 23:41:31

MountainX
Member
Registered: 2016-02-08
Posts: 371

Re: [SOLVED] make: /usr/bin/lrelease: No such file or directory

V1del wrote:

that depends on whether these can be removed during runtime or are required only for compiling, I'd assume they are needed during runtime so you should put them into depends (... when you install the resulting package makedeps are not going to be installed into the target system)

The AUR package without these extra dependencies builds and runs on my normal system. I found the issues when testing the build in a chroot.

I have both of these packages already installed in my normal system, so I can't see for sure if they are needed at runtime. However, the package appears to work for other users because I don't see complaints on its AUR page. That makes me think these packages may only be needed for building it.

Also qt5-tools is listed as part of "Development Tools".

A cross-platform application and UI framework (Development Tools, QtHelp)

On the other hand, qt5-svg does look something that would be needed at runtime. Maybe all the other users are like me and already have that installed?

I think I will add qt5-svg to the depends() array and qt5-tools to makedepends().

Offline

#7 2020-10-25 00:32:20

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] make: /usr/bin/lrelease: No such file or directory

lrelease and various other programs in qt5-tools are tools intended only for use by project developers. lrelease in particular is the only one likely to ever be needed by people *building* a project, simply because it serves like gettext's "msgfmt" to compile binary i18n translations from the XML-based catalog source format used by Qt. The resulting output file is the only thing you need at runtime, and you could drop the make dependency on lrelease if source tarballs ran lrelease before tar'ing up the sources.

Qt5 SVG is needed for runtime support for SVG files.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB