Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281665 - media-gfx/imagemagick ebuild fails with specific (live) gcc version strings
Summary: media-gfx/imagemagick ebuild fails with specific (live) gcc version strings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-16 11:52 UTC by Andreas Sturmlechner
Modified: 2009-09-11 21:01 UTC (History)
3 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 Andreas Sturmlechner gentoo-dev 2009-08-16 11:52:33 UTC
Now this is really a minor bug, but still an annoying one:

I have gcc-4.4.2-pre9999 installed, and while building would never be a problem, the ebuild stops at src_configure stage:

This line in the ebuild:
if built_with_use --missing false =sys-devel/gcc-$(gcc-fullversion)* openmp ; then

results in: "Called built_with_use '--missing' 'false' '=sys-devel/gcc-4.4.2-pre9999*' 'openmp'"

...which fails, apparently.

Full error report:

>>> Configuring source in /var/tmp/portage/media-gfx/imagemagick-6.5.4.10/work/ImageMagick-6.5.4-10 ...
ERROR: Invalid atom: '=sys-devel/gcc-4.4.2-pre9999*'
 *
 * ERROR: media-gfx/imagemagick-6.5.4.10 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_configure
 *             environment, line 2928:  Called built_with_use '--missing' 'false' '=sys-devel/gcc-4.4.2-pre9999*' 'openmp'
 *             environment, line  558:  Called best_version '=sys-devel/gcc-4.4.2-pre9999*'
 *               ebuild.sh, line  216:  Called die
 * The specific snippet of code:
 *                      die "unexpected portageq exit code: ${retval}"
 *  The die message:
 *   unexpected portageq exit code: 2
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-gfx/imagemagick-6.5.4.10/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/imagemagick-6.5.4.10/temp/environment'.
 *
 *
 * ERROR: media-gfx/imagemagick-6.5.4.10 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_configure
 *             environment, line 2928:  Called built_with_use '--missing' 'false' '=sys-devel/gcc-4.4.2-pre9999*' 'openmp'
 *             environment, line  559:  Called die
 * The specific snippet of code:
 *       [[ -z ${PKG} ]] && die "Unable to resolve $1 to an installed package";
 *  The die message:
 *   Unable to resolve =sys-devel/gcc-4.4.2-pre9999* to an installed package
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-gfx/imagemagick-6.5.4.10/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/imagemagick-6.5.4.10/temp/environment'.
 *



NOTE: This is NOT related to me using an overlay version of gcc, but because a valid portage version number is rejected by the ebuild system.
Comment 1 Patrick Lauer gentoo-dev 2009-08-17 15:13:05 UTC
gcc-4.4.2-pre9999 is not a valid package name.

gcc-4.4.2_pre9999 is.

Please fix your hax0rated gcc ebuild.
Comment 2 Andreas Sturmlechner gentoo-dev 2009-08-17 22:18:48 UTC
(In reply to comment #1)
> gcc-4.4.2-pre9999 is not a valid package name.
> 
> gcc-4.4.2_pre9999 is.
> 
> Please fix your hax0rated gcc ebuild.
> 

I have not 'hax0rated' anything, I just didn't write the correct version string; maybe influenced from the string returned by 'gcc-fullversion', sorry about that. ;)

This is what equery correctly reports as installed gcc package:

[I-O] [  ] sys-devel/gcc-4.4.2_pre9999 (4.4-svn)

It's from the gcc-overlay, and the ebuild files do have correct names, I checked that.

So, something, somehow reports a wrong version string containing '-' when there really is a '_'.
Comment 3 Patrick Lauer gentoo-dev 2009-08-17 22:42:27 UTC
Looks like there's a bug somewhere in gcc-fullversion. Reopen.
Comment 4 Patrick Lauer gentoo-dev 2009-08-19 14:53:47 UTC
@toolchain: Looks like a bug in toolchain-funcs.eclass
Comment 5 SpanKY gentoo-dev 2009-08-19 18:09:36 UTC
toolchain-funcs is operating as we've designed.  i dont think the imagemagick ebuild needs to call gcc-fullversion in the code in question.
Comment 6 Markus Meier gentoo-dev 2009-08-19 19:48:01 UTC
  23 Jul 2009; Gordon Malm <gengor@gentoo.org> imagemagick-6.5.1.0.ebuild,
  imagemagick-6.5.2.7.ebuild, imagemagick-6.5.2.9.ebuild:
  Adjust built_with_use in last commit.

  23 Jul 2009; Gordon Malm <gengor@gentoo.org> imagemagick-6.5.1.0.ebuild,
  imagemagick-6.5.2.7.ebuild, imagemagick-6.5.2.9.ebuild:
  QA: Fix broken and inconsistent detection logic wrt utilization of
  >=sys-devel/gcc-4.3 built with USE="openmp".
Comment 7 Gordon Malm (RETIRED) gentoo-dev 2009-08-20 00:11:52 UTC
(In reply to comment #5)
> toolchain-funcs is operating as we've designed.  i dont think the imagemagick
> ebuild needs to call gcc-fullversion in the code in question.
> 

# @FUNCTION: gcc-fullversion
# @RETURN: compiler version (major.minor.micro: [3.4.6])
gcc-fullversion() {
        $(tc-getCC "$@") -dumpversion
}

Operating as toolchain has intended perhaps, but not clearly documented (had no idea gcc -dumpversion included -preXXX stuff too).  Fair enough though, the following should work since we don't slot minor gcc versions:

-if built_with_use --missing false =sys-devel/gcc-$(gcc-fullversion)* openmp ; then
+if built_with_use --missing false =sys-devel/gcc-$(gcc-version)* openmp ; then

I'll test it when I can if someone doesn't beat me to it.
Comment 8 Gordon Malm (RETIRED) gentoo-dev 2009-08-20 00:29:18 UTC
er, since we don't slot on gcc *micro* version.
Comment 9 Gordon Malm (RETIRED) gentoo-dev 2009-09-11 21:01:31 UTC
Should be fixed in CVS, works for me.  Wait an hour, emerge --sync and re-open if still a problem.  Thanks!