Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 647844

Summary: dev-qt/qtcore-5.9.4-r1: fails at installation phase in prefixed environment
Product: Gentoo Linux Reporter: Gábor VIDA <vidagabor>
Component: EclassesAssignee: Qt Bug Alias <qt>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=589314
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Gábor VIDA 2018-02-16 09:54:37 UTC
Created attachment 519696 [details]
emerge --info

I'm trying to install qtcore in my prefixed environment. It failed during the installation phase:

[...]
/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4/bin/qmake -install qinstall /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4/mkspecs/winrt-x86-msvc2015 /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image//home/evidgbo/usr/roots/gentoo/usr/lib64/qt5/mkspecs/winrt-x86-msvc2015
/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4/bin/qmake -install qinstall /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4/mkspecs/winrt-x86-msvc2017 /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image//home/evidgbo/usr/roots/gentoo/usr/lib64/qt5/mkspecs/winrt-x86-msvc2017
 * ERROR: dev-qt/qtcore-5.9.4-r1::gentoo failed (install phase):
 *   !!! newins: /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image//usr/lib64/qt5/mkspecs/qconfig.pri does not exist
 * 
 * If you need support, post the output of `emerge --info '=dev-qt/qtcore-5.9.4-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-qt/qtcore-5.9.4-r1::gentoo'`.
 * The complete build log is located at '/home/evidgbo/usr/roots/gentoo/var/tmp/port_logdir/dev-qt:qtcore-5.9.4-r1:20180215-161957.log'.
 * For convenience, a symlink to the build log is located at '/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/temp/build.log'.
 * The ebuild environment file is located at '/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/temp/environment'.
 * Working directory: '/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4'
 * S: '/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4'
 * ERROR: dev-qt/qtcore-5.9.4-r1::gentoo failed (install phase):
 *   !!! newins: /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image//usr/lib64/qt5/mkspecs/qmodule.pri does not exist
[...]

The problem here is that qconfig.pri is not there but at /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image/home/evidgbo/usr/roots/gentoo/usr/lib64/qt5/mkspecs/qconfig.pri. Ie. $EPREFIX/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image/$EPREFIX/usr/lib64/mkspecs/qconfig.pri instead of the one which misses the EPREFIX in the middle of the file path. This is correct in my opinion.

After a short debugging I fixed the problem in qt5-build.eclass's qt5_install_module_config(), at the very end, by replacing ${D} with ${ED}, like this:

        set -x
	# install also the original qconfig.pri
	[[ ${PN} == qtcore && ${QT5_MINOR_VERSION} -ge 9 ]] && (
		insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo
		declare -p D QT5_ARCHDATADIR EPREFIX
		newins "${ED}${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/qconfig.pri qconfig-qtcore.pri
		newins "${ED}${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/qmodule.pri qmodule-qtcore.pri
	)
        set +x

Here's the debugging output:

[...]
/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4/bin/qmake -install qinstall /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/work/qtbase-opensource-src-5.9.4/mkspecs/winrt-x86-msvc2017 /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image//home/evidgbo/usr/roots/gentoo/usr/lib64/qt5/mkspecs/winrt-x86-msvc2017
+ [[ qtcore == qtcore ]]
+ [[ 9 -ge 9 ]]
+ insinto /usr/lib64/qt5/mkspecs/gentoo
+ '[' /usr/lib64/qt5/mkspecs/gentoo == / ']'
+ export INSDESTTREE=/usr/lib64/qt5/mkspecs/gentoo
+ INSDESTTREE=/usr/lib64/qt5/mkspecs/gentoo
+ ___eapi_has_prefix_variables
+ [[ ! 6 =~ ^(0|1|2)$ ]]
+ '[' '!' -d /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image/home/evidgbo/usr/roots/gentoo//usr/lib64/qt5/mkspecs/gentoo ']'
+ declare -p D QT5_ARCHDATADIR EPREFIX
declare -rx D="/home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image/"
declare -- QT5_ARCHDATADIR="/home/evidgbo/usr/roots/gentoo/usr/lib64/qt5"
declare -rx EPREFIX="/home/evidgbo/usr/roots/gentoo"
+ newins /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image/home/evidgbo/usr/roots/gentoo//usr/lib64/qt5/mkspecs/qconfig.pri qconfig-qtcore.pri
+ newins /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image/home/evidgbo/usr/roots/gentoo//usr/lib64/qt5/mkspecs/qmodule.pri qmodule-qtcore.pri
+ set +x
 * Removing unnecessary /home/evidgbo/usr/roots/gentoo/usr/lib64/libQt5Core.la (no static archive)
>>> Completed installing qtcore-5.9.4-r1 into /home/evidgbo/usr/roots/gentoo/var/tmp/portage/dev-qt/qtcore-5.9.4-r1/image/
[...]

Emerging rest of the @world seems woring fine since then.
Comment 1 Andreas Sturmlechner gentoo-dev 2018-02-16 09:57:51 UTC
I think it's just not supported...
Comment 2 Michael Palimaka (kensington) gentoo-dev 2018-02-16 10:39:19 UTC

*** This bug has been marked as a duplicate of bug 646902 ***
Comment 3 Benda Xu gentoo-dev 2019-01-27 10:57:05 UTC
(In reply to Andreas Sturmlechner from comment #1)
> I think it's just not supported...

Why do you think so?