Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 779139 - dev-libs/tree-sitter-0.19.4 fails to build on sys-devel/gcc-config[-native-symlinks] system:
Summary: dev-libs/tree-sitter-0.19.4 fails to build on sys-devel/gcc-config[-native-sy...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ali Abdel-Qader
Keywords: PATCH
Depends on:
Blocks: tc-directly
  Show dependency tree
Reported: 2021-03-29 18:56 UTC by Sergei Trofimovich (RETIRED)
Modified: 2021-03-30 06:39 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-29 18:56:03 UTC
Build fails as:

make --jobs=4
cc -march=sandybridge -mtune=sandybridge -maes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -Wall -Wextra -Wstack-protector     -frecord-gcc-switches -std=gnu99 -fPIC -Ilib/src -Ilib/include   -c -o lib/src/get_changed_ranges.o lib/src/get_changed_ranges.c
make: cc: No such file or directory
make: *** [<builtin>: lib/src/get_changed_ranges.o] Error 127
 * ERROR: dev-libs/tree-sitter-0.19.4::gentoo failed (compile phase):
 *   emake failed
 * If you need support, post the output of `emerge --info '=dev-libs/tree-sitter-0.19.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/tree-sitter-0.19.4::gentoo'`.
 * The complete build log is located at '/gentoo/build-logs/dev-libs:tree-sitter-0.19.4:20210329-185343.log'.
 * The ebuild environment file is located at '/tmp/portage-tmpdir/portage/dev-libs/tree-sitter-0.19.4/temp/environment'.
 * Working directory: '/tmp/portage-tmpdir/portage/dev-libs/tree-sitter-0.19.4/work/tree-sitter-0.19.4'
 * S: '/tmp/portage-tmpdir/portage/dev-libs/tree-sitter-0.19.4/work/tree-sitter-0.19.4'

The following seems to be enough to fix it:

--- a/dev-libs/tree-sitter/tree-sitter-0.19.4.ebuild
+++ b/dev-libs/tree-sitter/tree-sitter-0.19.4.ebuild
@@ -3,6 +3,8 @@


+inherit toolchain-funcs
 DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library."

@@ -21,6 +23,11 @@ PATCHES=(

+src_prepare() {
+       default
+       tc-export CC
 src_install() {
        emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
Comment 1 Larry the Git Cow gentoo-dev 2021-03-30 03:47:12 UTC
The bug has been closed via the following commit(s):

commit 69d01a4273a556b1205a7a575cb3811ab7e2443d
Author:     Ali Abdel-Qader <>
AuthorDate: 2021-03-30 02:19:15 +0000
Commit:     Nick Sarnie <>
CommitDate: 2021-03-30 03:47:03 +0000

    dev-libs/tree-sitter: Fix potentially no CC being set
    Suggested-by: Sergei Trofimovich <>
    Signed-off-by: Ali Abdel-Qader <>
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Nick Sarnie <>

 dev-libs/tree-sitter/tree-sitter-0.19.4.ebuild | 7 +++++++
 dev-libs/tree-sitter/tree-sitter-9999.ebuild   | 7 +++++++
 2 files changed, 14 insertions(+)