Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 735028 - media-gfx/darktable-3.0.2 should depend on sys-devel/gcc[graphite]
Summary: media-gfx/darktable-3.0.2 should depend on sys-devel/gcc[graphite]
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Marek Szuba (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 728654
  Show dependency tree
 
Reported: 2020-08-01 11:11 UTC by Kalin KOZHUHAROV
Modified: 2020-08-27 11:57 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin KOZHUHAROV 2020-08-01 11:11:33 UTC
Given that we can detect USEflags, it will be better to check that prior to starting the emerge:

>>> Running pre-merge checks for media-gfx/darktable-3.0.2
 * ERROR: media-gfx/darktable-3.0.2::gentoo failed (pretend phase):
 *   Please switch to a gcc version built with USE=graphite
 * 
 * Call stack:
 *                ebuild.sh, line 125:  Called pkg_pretend
 *   darktable-3.0.2.ebuild, line  84:  Called die
 * The specific snippet of code:
 *   			test-flags-CC -floop-block &> /dev/null || \
 *   				die "Please switch to a gcc version built with USE=graphite"
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/darktable-3.0.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/darktable-3.0.2::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/media-gfx/darktable-3.0.2:20200801-105901.log.gz'.
 * For convenience, a symlink to the build log is located at '/tmp/portage/media-gfx/darktable-3.0.2/temp/build.log.gz'.
 * The ebuild environment file is located at '/tmp/portage/media-gfx/darktable-3.0.2/temp/die.env'.
 * Working directory: '/tmp/portage/media-gfx/darktable-3.0.2/homedir'
 * S: '/tmp/portage/media-gfx/darktable-3.0.2/work/darktable-3.0.2'


Reproducible: Always
Comment 1 Marek Szuba (RETIRED) archtester gentoo-dev 2020-08-01 11:42:01 UTC
Umm, no. Depending on sys-devel/gcc[graphite] merely ensures that there is a version of gcc installed that supports graphite - but it does not mean that the *currently selected* compiler supports it.
Comment 2 Kalin KOZHUHAROV 2020-08-01 12:44:32 UTC
I see, I missed that point (taking for granted that most users have only one gcc installed).

But if none of the installed gcc versions meets the requirements, then this requirement cannot be satisfied.

So, requiring it in DEPEND is still a good idea, IMHO. Do not throw away the current check, but it is kind of run-time check in a way.

If you don't agree, please mark again as INVALID and I'll shut up ;-D
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-04 10:16:16 UTC
(In reply to Kalin KOZHUHAROV from comment #0)
> Given that we can detect USEflags

No, you can't. You can have more than one compiler installed and not all of their USE flags (are not|should not be) required to match (but only a single compiler's). So instead you have to check for features of a particular compiler that has been set up to be used for building this package, which is exactly what pkg_pretend() is doing here.