Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 726176 - =media-gfx/gimp-2.10.18-r1 does not respect CC/CC_FOR_BUILD variable
Summary: =media-gfx/gimp-2.10.18-r1 does not respect CC/CC_FOR_BUILD variable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sergey Torokhov
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: tc-directly
  Show dependency tree
 
Reported: 2020-05-30 08:02 UTC by Sergei Trofimovich (RETIRED)
Modified: 2020-07-05 08:24 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 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-30 08:02:58 UTC
On sys-devel/gcc-config[-native-symlinks] system gimp fails to build in configure phase as:

"""
...
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/portage/media-gfx/gimp-2.10.18-r1/work/gimp-2.10.18':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
"""

sys-devel/gcc-config[-native-symlinks] removes default 'cc' and 'gcc' symlinks and relies on ebuilds passing CC/CXX variables.

In this case CC_FOR_BUILD variable is not set in the ebuild.

The following seems to be enough to get gimp going again:

--- a/media-gfx/gimp/gimp-2.10.18-r1.ebuild
+++ b/media-gfx/gimp/gimp-2.10.18-r1.ebuild
@@ -6,7 +6,7 @@ PYTHON_COMPAT=( python2_7 )
 GNOME2_EAUTORECONF=yes
 WANT_AUTOMAKE=

-inherit autotools gnome2 python-single-r1 virtualx
+inherit autotools gnome2 python-single-r1 virtualx toolchain-funcs

 DESCRIPTION="GNU Image Manipulation Program"
 HOMEPAGE="https://www.gimp.org/"
@@ -111,6 +111,8 @@ src_prepare() {

 	sed 's:-DGIMP_protect_DISABLE_DEPRECATED:-DGIMP_DISABLE_DEPRECATED:g' -i configure || die #615144
 	fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
+
+	export CC_FOR_BUILD="$(tc-getBUILD_CC)"
 }

 _adjust_sandbox() {
Comment 1 Sergey Torokhov 2020-06-11 21:58:36 UTC
Thank you for proposed fix. I created pull request for gimp-2.10.20 version bump and added there this patch.
Comment 2 Larry the Git Cow gentoo-dev 2020-07-05 08:24:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3490f9e410e06c62f18b746cffbdb5d079ee5439

commit 3490f9e410e06c62f18b746cffbdb5d079ee5439
Author:     Sergey Torokhov <torokhov-s-a@yandex.ru>
AuthorDate: 2020-06-11 21:49:24 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-07-05 08:24:14 +0000

    media-gfx/gimp: fix gimp does not respect CC/CC_FOR_BUILD variable
    
    This issue was reported for media-gfx/gimp-2.10.18-r1
    and proposed patch is applied here for gimp-2.10.20
    
    Closes: https://bugs.gentoo.org/726176
    
    Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
    Closes: https://github.com/gentoo/gentoo/pull/16199
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-gfx/gimp/gimp-2.10.20.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)