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...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ali Abdel-Qader
URL:
Whiteboard:
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: ---


Attachments

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 @@

 EAPI=7

+inherit toolchain-funcs
+
 DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library."
 HOMEPAGE="https://github.com/tree-sitter/tree-sitter"

@@ -21,6 +23,11 @@ PATCHES=(
        "${FILESDIR}/${PN}-No-static-libs-gentoo.patch"
 )

+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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69d01a4273a556b1205a7a575cb3811ab7e2443d

commit 69d01a4273a556b1205a7a575cb3811ab7e2443d
Author:     Ali Abdel-Qader <abdelqaderali@protonmail.com>
AuthorDate: 2021-03-30 02:19:15 +0000
Commit:     Nick Sarnie <sarnex@gentoo.org>
CommitDate: 2021-03-30 03:47:03 +0000

    dev-libs/tree-sitter: Fix potentially no CC being set
    
    Closes: https://bugs.gentoo.org/779139
    Suggested-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Ali Abdel-Qader <abdelqaderali@protonmail.com>
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Nick Sarnie <sarnex@gentoo.org>

 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(+)