Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 712098 - app-i18n/uim can choose host qmake-qt5 over prefixed qmake
Summary: app-i18n/uim can choose host qmake-qt5 over prefixed qmake
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-10 22:02 UTC by Nick Bowler
Modified: 2021-01-07 23:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed fix (uimfix.patch,368 bytes, patch)
2020-03-10 22:02 UTC, Nick Bowler
Details | Diff
Example of failed build due to incorrectly linking host libraries (app-i18n:uim-1.8.8:20200310-215619.log.gz,54.47 KB, application/gzip)
2020-03-10 22:07 UTC, Nick Bowler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Bowler 2020-03-10 22:02:34 UTC
Created attachment 617952 [details, diff]
proposed fix

The uim configure script, when building Qt5 support, will preferentially use
the qmake-qt5 or qmake5 utilities, if they are found by the configure script,
rather than plain "qmake".

The Gentoo Qt packages seem to only install "qmake".

This is normally not a problem as the other utilities do not exist in a
typical Gentoo installation so the configure script falls back to "qmake".

However, in a prefixed installation, the configure script can and does find
these utilities on the host system and it will use them instead of the
prefixed qmake.  This ends up with the build system pulling in libraries from
the host system and the results are not pretty.

Configuring with _QMAKE5 pointing to the gentoo-installed qmake, as in the
attached patch, disables the probing for qmake-qt5 and resolves the issue.

(A similar issue exists for uim's qt4 support but I think it is irrelevant to the ebuild as qt4 is disabled)

Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-9.2.0, glibc-2.30-r4, 3.10.0-957.5.1.el7.x86_64 x86_64)
=================================================================
System uname: Linux-3.10.0-957.5.1.el7.x86_64-x86_64-Intel-R-_Core-TM-_i7-4790_CPU_@_3.60GHz-with-centos-7.6.1810-Core
KiB Mem:    16204384 total,   2070212 free
KiB Swap:   32605180 total,  32584848 free
Timestamp of repository gentoo: Tue, 03 Mar 2020 00:45:02 +0000
sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
ccache version 3.7.7 [enabled]
app-shells/bash:          5.0_p16::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo
dev-util/ccache:          3.7.7-r1::gentoo
dev-util/cmake:           3.16.4::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.2.0-r4::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r4::gentoo
Repositories:

gentoo
    location: /SCRATCH/gentoo/srv/repos/gentoo
    sync-type: webrsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-webrsync-verify-signature: true

gentoo-draconx
    location: /SCRATCH/gentoo/srv/repos/gentoo-draconx
    masters: gentoo

gentoo-fixes
    location: /SCRATCH/gentoo/srv/repos/gentoo-fixes
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=haswell -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/SCRATCH/gentoo/etc /etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/SCRATCH/gentoo/etc/env.d /SCRATCH/gentoo/etc/gentoo-release /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=haswell -pipe"
DISTDIR="/SCRATCH/gentoo/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build --autounmask --autounmask-write=n --dynamic-deps=n --unordered-display --verbose-conflicts --with-bdeps-auto=n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/SCRATCH/gentoo/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/SCRATCH/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/SCRATCH/gentoo/var/tmp"
USE="X acl amd64 berkdb bzip2 cli crypt cups cxx dri exif fbcon fontconfig fortran gdbm iconv icu ipv6 jpeg lcms libtirpc ncurses nls nptl openmp pcre perl png prefix python readline seccomp split-usr ssl svg tcpd truetype unicode xattr xft xinerama zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Nick Bowler 2020-03-10 22:07:43 UTC
Created attachment 617954 [details]
Example of failed build due to incorrectly linking host libraries

Here is an example build log of what can go wrong when building a prefixed uim.

Note the line in the configure output:

  checking for Qt5 version of qmake... /usr/bin/qmake-qt5

The qmake-qt5 command ends up injecting -L/usr/lib64 into the linker command line and everything goes horribly wrong at the end.  This detection is fixed by the above simple ebuild change enabling uim to build and work properly.
Comment 2 Larry the Git Cow gentoo-dev 2021-01-07 23:59:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7def0ba1bb0def667a74e7298fb877bd86ed7c23

commit 7def0ba1bb0def667a74e7298fb877bd86ed7c23
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-01-07 22:10:40 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-01-07 23:56:49 +0000

    app-i18n/uim: EAPI-7, use qmake-utils, sort some deps
    
    Closes: https://bugs.gentoo.org/764329
    Closes: https://bugs.gentoo.org/712098
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-i18n/uim/uim-1.8.8.ebuild | 54 +++++++++++++++++++++++++------------------
 1 file changed, 31 insertions(+), 23 deletions(-)