Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 718876 - dev-libs/protobuf calls cc directly
Summary: dev-libs/protobuf calls cc directly
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Arfrever Frehtes Taifersar Arahesis
Depends on:
Blocks: tc-directly
  Show dependency tree
Reported: 2020-04-22 15:53 UTC by Agostino Sarubbo
Modified: 2020-06-13 18:59 UTC (History)
1 user (show)

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

build.log (build.log,11.42 KB, text/plain)
2020-04-22 15:53 UTC, Agostino Sarubbo

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-04-22 15:53:21 UTC
This is an auto-filled bug because dev-libs/protobuf calls cc directly.
The issue was originally discovered on x86, but it may be reproducible on other arches as well.
Attached build log and emerge --info.

To reproduce this issue you may want to temporarily move the /usr/bin/cc - /usr/bin/gcc binaries.
Comment 1 Agostino Sarubbo gentoo-dev 2020-04-22 15:53:27 UTC
Created attachment 634092 [details]

build log and emerge --info
Comment 2 Arfrever Frehtes Taifersar Arahesis 2020-04-22 20:12:08 UTC
AC_PROG_CC and AC_PROG_CXX use ${CC} and ${CXX}, but AX_PROG_CC_FOR_BUILD (alias: AC_PROG_CC_FOR_BUILD) and AX_PROG_CXX_FOR_BUILD (alias: AC_PROG_CXX_FOR_BUILD) use ${CC_FOR_BUILD} and ${CXX_FOR_BUILD} (and ${CPP_FOR_BUILD}, ${CXXCPP_FOR_BUILD}, ${CPPFLAGS_FOR_BUILD}, ${CXXCPPFLAGS_FOR_BUILD}, ${CFLAGS_FOR_BUILD}, ${CXXFLAGS_FOR_BUILD}, ${LDFLAGS_FOR_BUILD}).;a=blob;f=m4/ax_prog_cc_for_build.m4;a=blob;f=m4/ax_prog_cxx_for_build.m4
Comment 3 Arfrever Frehtes Taifersar Arahesis 2020-04-22 22:54:49 UTC;a=commit;h=9c26407efb0322dda2c08fada6a67dde1c690e74 added automatic detection of compiler based on --build=${CBUILD}.
This works for native ABI, but not for non-native ABI:
(On multilib x86_64 system)
・ `configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu` finds `x86_64-pc-linux-gnu-gcc`.
・ `CC="x86_64-pc-linux-gnu-gcc -m32" configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu` searches for non-existent `i686-pc-linux-gnu-gcc` and fails, instead of searching for `x86_64-pc-linux-gnu-gcc -m32`.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2020-04-23 05:26:25 UTC
*_FOR_BUILD variables are no longer used by build system in >=dev-libs/protobuf-3.6.1:
Comment 5 Larry the Git Cow gentoo-dev 2020-06-13 18:59:36 UTC
The bug has been closed via the following commit(s):

commit 60b7072a739ba280d075d6d91da644cd6f3ee372
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2020-06-13 18:26:41 +0000
Commit:     Mike Gilbert <>
CommitDate: 2020-06-13 18:59:13 +0000

    dev-libs/protobuf: Use not AC_PROG_CXX_FOR_BUILD.
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Mike Gilbert <>

 dev-libs/protobuf/protobuf-3.10.1.ebuild | 4 ++++
 dev-libs/protobuf/protobuf-3.11.4.ebuild | 4 ++++
 2 files changed, 8 insertions(+)