Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572056 - dev-qt/qtwebkit:5 installs no files: non-fatal "Missing ruby from PATH" error aborts configure, but not build
Summary: dev-qt/qtwebkit:5 installs no files: non-fatal "Missing ruby from PATH" error...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 572220 618036 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-16 04:43 UTC by Duncan
Modified: 2019-03-28 05:23 UTC (History)
2 users (show)

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


Attachments
full build log (dev-qt:qtwebkit-5.5.1-r1:20160116-023145.log,7.87 KB, text/plain)
2016-01-16 04:43 UTC, Duncan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2016-01-16 04:43:00 UTC
Created attachment 423018 [details]
full build log

TL;DR: A missing ruby executable aborts the configure, but fails to abort the ebuild, resulting in a merged package with zero(!!) files.

So after the qt-5.5.1-r1 bumps I did my usual revdep-rebuild, and it said a couple packages needed rebuilt, but they failed to build as they couldn't find qtwebkit5-related cmake files.  Further investigation showed I had a qtwebkit-5.5.1-r1 package installed... WITH NO FILES!! (Yes, I yelled a bit there, but IMO it's appropriate.)  The binpkg I always build had no files in it either, but the package installed without error.

Attempting a rebuild resulted in (last few lines of src_configure and src_compile):

XHR Timeout ................... yes
XSLT .......................... yes

The WebKit build was disabled for the following reasons: 
    * Missing ruby from PATH 

>>> Source configured.
>>> Compiling source in /tmp/portage/dev-qt/qtwebkit-5.5.1-r1/work/qtwebkit-opensource-src-5.5.1 ...
 * Running emake 
make -j10 -l8 
make: Nothing to be done for 'first'.
>>> Source compiled.

But equery list ruby says I have ruby-2.3.0 installed.  However, there is indeed no "ruby" executable on the path, only "ruby23".

ruby-2.3.0 was installed on Dec 28, based on the date, so presumably it upgraded but didn't run eselect-ruby.  Running that and selecting the only ruby installed, ruby23, does indeed give me an on-path ruby executable, and qtwebkit:5 is rebuilding (and way past configure into a proper build, qtwebkit always takes foorrreeevverrrr to build... when it's actually building, at least) as I type this, but the bug here is that a missing ruby executable is indeed flagged as an error by the configure, but the ebuild doesn't consider that a /fatal/ error and thus goes on to blindly merge an empty package with absolutely no files!  An error from configure should abort the ebuild entirely, so it never gets to the point of merging in the first place.


Given the situation, emerge --info shouldn't be necessary as the problem is easily duplicated by simply removing the ruby executable from the path.  I'm attaching the full build log, however.  FWIW, I found the "checking 0 files for package collisions" bit rather... amusing, in a fatalistic sense. =:^p

(The rebuild just finished... with files this time! =:^)  And a quick check after renaming the ruby symlink, ctl-C-aborted in the fake-install step to avoid another real rebuild, confirms the above non-fatal ruby missing configure error behavior once again.  With a qtwebkit:5 containing actual files merged, revdep-rebuild says everything's fine again, so no other rebuilds after all. =:^)
Comment 1 Michael Palimaka (kensington) gentoo-dev 2016-01-16 07:02:46 UTC
It could be tricky to detect a failed configure:

        !isEmpty(skipBuildReason) {
            log("$${EOL}The WebKit build was disabled for the following reasons: $$skipBuildReason $${EOL}$${EOL}")
            SUBDIRS=
            export(SUBDIRS)
        } else {
            log("$${EOL}WebKit is now configured for building. Just run 'make'.$${EOL}$${EOL}")
        }
Comment 2 Duncan 2016-01-16 07:45:54 UTC
Hmm, this guy ran into the same issue, empty package due to config failing to find the ruby executable, when testing to see if ruby was actually a required dep.  He didn't realize he had a "successfully merged" empty package until later, and was thus fooled into believing ruby wasn't required (would that were so, as it's an expensive dep for only qtwebkit, here!).

https://bugs.gentoo.org/show_bug.cgi?id=538450#c2
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2016-01-19 19:49:33 UTC
@ruby: I'd argue that either eselect-ruby isn't doing its job properly, or ruby ebuilds aren't calling it to update the symlink after an older ruby version is unmerged.

Also, bug 564252 seems to be caused by the same root problem.
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2016-01-19 20:40:46 UTC
@ruby: ruby-2.3.0 does not depend on the latest version of eselect-ruby which added support for ruby23. Please fix ASAP.
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2016-02-07 23:34:54 UTC
so the issue with ruby was fixed in [1]... not sure if we want to do anything about the "silent failure".

[1] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cbbf13c21a144ceae18716b4f4647add409d081
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2016-02-07 23:40:30 UTC
*** Bug 572220 has been marked as a duplicate of this bug. ***
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2017-05-09 22:16:33 UTC
*** Bug 618036 has been marked as a duplicate of this bug. ***
Comment 8 Michael Palimaka (kensington) gentoo-dev 2017-06-11 13:09:46 UTC
Added a check in the overlay to die if nothing is built:
https://gitweb.gentoo.org/proj/qt.git/commit/?id=604de1a5b113ef3b6c168f093b02d73e176ca57e
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2017-06-13 16:30:05 UTC
(In reply to Michael Palimaka (kensington) from comment #8)
> Added a check in the overlay to die if nothing is built:
> https://gitweb.gentoo.org/proj/qt.git/commit/
> ?id=604de1a5b113ef3b6c168f093b02d73e176ca57e

you should use ${D%/}${QT5_LIBDIR} (and quoting is unnecessary)
Comment 10 Michael Palimaka (kensington) gentoo-dev 2017-06-18 07:55:23 UTC
Thanks, improved:
https://gitweb.gentoo.org/proj/qt.git/commit/?id=5820fbc293c9ab58424bd4284d4823b881454581
Comment 11 Michael Palimaka (kensington) gentoo-dev 2017-06-24 02:30:19 UTC
Thanks, fixed in git.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f211f960a4b79ce23572e2325c758b788bfdc45
Comment 12 Guilherme Amadio gentoo-dev 2018-07-05 14:54:56 UTC
Actually, that should have been "${ED%/}/...". Prefix got broken because of that. As you can see below, the library was installed, but the check failed.

-- Set runtime path of "/var/cache/portage/dev-qt/qtwebkit-5.212.0_pre20180120/image//cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/lib64/libQt5WebKitWidgets.so.5.212.0" to "/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/x86_64-pc-linux-gnu/lib/gcc:/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/x86_64-pc-linux-gnu/lib:/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/lib64:/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/lib64"
-- Installing: /var/cache/portage/dev-qt/qtwebkit-5.212.0_pre20180120/image/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/lib64/libQt5WebKit.so.5.212.0
-- Installing: /var/cache/portage/dev-qt/qtwebkit-5.212.0_pre20180120/image/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/lib64/libQt5WebKit.so.5
-- Installing: /var/cache/portage/dev-qt/qtwebkit-5.212.0_pre20180120/image/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/lib64/libQt5WebKit.so
-- Set runtime path of "/var/cache/portage/dev-qt/qtwebkit-5.212.0_pre20180120/image//cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/lib64/libQt5WebKit.so.5.212.0" to "/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/x86_64-pc-linux-gnu/lib/gcc:/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/x86_64-pc-linux-gnu/lib:/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/lib64:/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/lib64"
 * dev-qt/qtwebkit-5.212.0_pre20180120 could not build due to a broken ruby environment.
 * ERROR: dev-qt/qtwebkit-5.212.0_pre20180120::gentoo failed (install phase):
 *   Check "eselect ruby" and ensure you have a working ruby in your $PATH
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_install
 *   environment, line 4405:  Called die
 * The specific snippet of code:
 *           die 'Check "eselect ruby" and ensure you have a working ruby in your $PATH';
Comment 13 Davide Pesavento (RETIRED) gentoo-dev 2018-07-05 16:29:52 UTC
(In reply to Guilherme Amadio from comment #12)
> Actually, that should have been "${ED%/}/...". Prefix got broken because of
> that. As you can see below, the library was installed, but the check failed.

No, ${D%/}${QT5_LIBDIR} is/was correct because QT5_LIBDIR already contains EPREFIX.

The regression was introduced in the recently committed 5.212 version, which changed ${QT5_LIBDIR} into $(qt5_get_libdir), and the latter does not contain EPREFIX.
Comment 14 Larry the Git Cow gentoo-dev 2018-07-05 17:06:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86b411ceb1cc8df7b359c05b8d3dd807a42051b6

commit 86b411ceb1cc8df7b359c05b8d3dd807a42051b6
Author:     Davide Pesavento <pesa@gentoo.org>
AuthorDate: 2018-07-05 16:46:37 +0000
Commit:     Davide Pesavento <pesa@gentoo.org>
CommitDate: 2018-07-05 17:06:11 +0000

    dev-qt/qtwebkit: fix src_install sanity check on prefix
    
    Bug: https://bugs.gentoo.org/572056
    Package-Manager: Portage-2.3.41, Repoman-2.3.9

 dev-qt/qtwebkit/qtwebkit-5.212.0_pre20180120.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)