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

Bug 726180

Summary: =dev-libs/fribidi-1.0.9 does not respect CC/CC_FOR_BUILD variable
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Severity: normal Keywords: PATCH, PullRequest
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    

Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-30 08:22:17 UTC
On sys-devel/gcc-config[-native-symlinks] system fribidi fails to build in configure phase as:

checking size of void *... 4
checking size of wchar_t... 4
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/portage/dev-libs/fribidi-1.0.9/work/fribidi-1.0.9-abi_x86_32.x86':
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 fribidi going again:

--- a/dev-libs/fribidi/fribidi-1.0.9.ebuild
+++ b/dev-libs/fribidi/fribidi-1.0.9.ebuild
@@ -3,7 +3,7 @@


-inherit multilib-minimal
+inherit multilib-minimal toolchain-funcs

 DESCRIPTION="A free implementation of the unicode bidirectional algorithm"
@@ -22,6 +22,12 @@ BDEPEND="

 DOCS=( AUTHORS NEWS ChangeLog THANKS ) # README points at which wasn't disted with EAPI-7

+src_prepare() {
+	default
+	export CC_FOR_BUILD="$(tc-getBUILD_CC)"
 multilib_src_configure() {
 	local myeconfargs=(
Comment 1 Larry the Git Cow gentoo-dev 2021-04-30 01:48:53 UTC
The bug has been closed via the following commit(s):

commit 48fca8c4d33b4dcd742f2b5e4acbc8b8121c6353
Author:     Ronny (tastytea) Gutbrod <>
AuthorDate: 2021-04-29 14:25:16 +0000
Commit:     Matt Turner <>
CommitDate: 2021-04-30 01:48:28 +0000

    dev-libs/fribidi: Set CC_FOR_BUILD.
    configure can not find a compiler with
    sys-devel/gcc-config[-native-symlinks] otherwise.
    Signed-off-by: Ronny (tastytea) Gutbrod <>
    Signed-off-by: Matt Turner <>

 dev-libs/fribidi/fribidi-1.0.10.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)