void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

sonic-visualiser: update to 5.2.1

Open newbluemoon opened this issue 1 year ago • 4 comments

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture, (x86_64)
  • I built this PR locally for these architectures (if supported. mark crossbuilds):
    • aarch64 (cross)
    • armv7l (cross) --> fails on x86_64, succeedes on i686, see below
    • x86_64-musl
    • i686

There is a problem with 32-bit cross builds on a 64-bit host. Meson detects Qt6 using pkg-config. However, the corresponding .pc files have

prefix=/usr
exec_prefix=${prefix}
bindir=${prefix}/lib32/qt6/bin
libexecdir=${prefix}/lib32/qt6/libexec
libdir=${prefix}/lib
includedir=${prefix}/include/qt6

i.e. they have .../lib32/... hard coded and so detection of the host tools fails when they are under .../lib64/....

There are not much options to tweak this; using qmake instead of pkg-config yields the same error.

I think a clean solution would be adjusting Qt6’s .pc files to contain .../lib/... solely. There shouldn’t be a problem, because lib32 and lib64 are symlinks to lib, anyway. Everything else I can think of would be quite hacky. I don’t know if this is the only package having this problem; I searched for other templates, but didn’t find anything alike.

Any ideas/suggestions are very welcome :)

newbluemoon avatar Sep 29 '24 12:09 newbluemoon

Made a slight modification to the pkg-config-wrapper to find the qt6 tools when cross building on 64 bit host for 32 bit target:

diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh
index 3d5d6c2ab3b..e2db9e400e9 100644
--- a/common/hooks/pre-configure/02-script-wrapper.sh
+++ b/common/hooks/pre-configure/02-script-wrapper.sh
@@ -103,7 +103,7 @@ pkgconfig_wrapper() {
 export PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE"
 export PKG_CONFIG_PATH="$XBPS_CROSS_BASE/usr/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}"
 export PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/usr/lib/pkgconfig\${PKG_CONFIG_LIBDIR:+:\${PKG_CONFIG_LIBDIR}}"
-exec /usr/bin/pkg-config "\$@"
+exec /usr/bin/pkg-config "\$@" | sed s/lib32/lib/g
 _EOF
 	chmod 755 ${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config
 	if [ -z "$no_generic_pkgconfig_link" ]; then

This is the smallest change I could come up with that makes it work, but maybe there's a better solution?

newbluemoon avatar Dec 25 '24 09:12 newbluemoon

Just blindly replacing every occurance of lib32 in any pkg-config output seems wrong.

Duncaen avatar Jun 06 '25 17:06 Duncaen

I do agree, just couldn’t come up with something better. Also couldn’t find any other package having this constellation. Maybe don’t allow 32-bit cross builds from 64-bit hosts for now then?

newbluemoon avatar Jun 06 '25 18:06 newbluemoon

@Duncaen I disabled cross builds when host and target wordsize differs. There already seems to be an active meson issue addressing this: https://github.com/mesonbuild/meson/issues/13018

newbluemoon avatar Jun 15 '25 08:06 newbluemoon