Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830068 - dev-util/rizin: grammar generation failure with dev-libs/treesitter[ts-cli] and nodejs
Summary: dev-util/rizin: grammar generation failure with dev-libs/treesitter[ts-cli] a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: John Helmert III
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-27 10:00 UTC by Toralf Förster
Modified: 2022-01-06 19:08 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,17.87 KB, text/plain)
2021-12-27 10:00 UTC, Toralf Förster
Details
dev-util:rizin-0.3.1-r2:20211226-220315.log (dev-util:rizin-0.3.1-r2:20211226-220315.log,134.68 KB, text/plain)
2021-12-27 10:00 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,375.76 KB, text/plain)
2021-12-27 10:00 UTC, Toralf Förster
Details
environment (environment,98.46 KB, text/plain)
2021-12-27 10:00 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,43.43 KB, application/x-bzip)
2021-12-27 10:00 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,11.21 KB, application/x-bzip)
2021-12-27 10:00 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,31.26 KB, application/x-bzip)
2021-12-27 10:00 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-12-27 10:00:38 UTC
too long lines were shrinked:

subprocess.CalledProcessError: Command '['/usr/bin/tree-sitter', 'generate', '/var/tmp/portage/dev-util/rizin-0.3.1-r2/work/rizin-v0.3.1/shlr/rizin-shell-parser/grammar.js']' returned non-zero exit status 1.
[181/1271] x86_64-pc-linux-gnu-gcc -Ishlr/librzqnx.a.p -I. -I../rizin-v0.3.1 -I../rizin-v0.3.1/librz/include -I../rizin-v0.3.1/shlr/qnx/include -Isubprojects/sdb -I../rizin-v0.3.1/subprojects/sdb -Isubprojects/sdb/src -I../rizin-v0.3.1/subprojects/sdb/src -fdiagnostics-color=always -D_FILE_OFFSET_BI
[182/1271] x86_64-pc-linux-gnu-gcc -Ishlr/librzqnx.a.p -I. -I../rizin-v0.3.1 -I../rizin-v0.3.1/librz/include -I../rizin-v0.3.1/shlr/qnx/include -Isubprojects/sdb -I../rizin-v0.3.1/subprojects/sdb -Isubprojects/sdb/src -I../rizin-v0.3.1/subprojects/sdb/src -fdiagnostics-color=always -D_FILE_OFFSET_BI
[183/1271] /usr/lib/python-exec/python3.9/meson --internal symbolextractor /var/tmp/portage/dev-util/rizin-0.3.1-r2/work/rizin-0.3.1-build librz/crypto/librz_crypto.so.0.3.1 librz/crypto/librz_crypto.so.0.3.1 librz/crypto/librz_crypto.so.0.3.1.p/librz_crypto.so.0.3.1.symbols 
ninja: build stopped: subcommand failed.
 * ERROR: dev-util/rizin-0.3.1-r2::gentoo failed (compile phase):
 *   compile failed

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib_systemd-j4-20211221-210106

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.3.1
 [2] x86_64-pc-linux-gnu-10.3.1
 [3] x86_64-pc-linux-gnu-11.2.1 *
clang version 13.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/13/bin
/usr/lib/llvm/13
13.0.0
Python 3.9.9
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby27 (with Rubygems)
  [3]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.57.0
  [2]   rust-1.57.0 *
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.312_p07 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.10.4
php cli:
  [1]   php7.3
  [2]   php7.4
  [3]   php8.1 *

  HEAD of ::gentoo
commit b4175685d16cd23243fc6c480dbe28b335d47cf7
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Dec 26 21:06:49 2021 +0000

    2021-12-26 21:06:48 UTC

emerge -qpvO dev-util/rizin
[ebuild  N    ] dev-util/rizin-0.3.1-r2  USE="-test"
Comment 1 Toralf Förster gentoo-dev 2021-12-27 10:00:39 UTC
Created attachment 760365 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-12-27 10:00:41 UTC
Created attachment 760366 [details]
dev-util:rizin-0.3.1-r2:20211226-220315.log
Comment 3 Toralf Förster gentoo-dev 2021-12-27 10:00:42 UTC
Created attachment 760367 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-12-27 10:00:44 UTC
Created attachment 760368 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-12-27 10:00:45 UTC
Created attachment 760369 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-12-27 10:00:46 UTC
Created attachment 760370 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2021-12-27 10:00:47 UTC
Created attachment 760371 [details]
temp.tar.bz2
Comment 8 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-12-28 04:42:42 UTC
Seems to be triggered by dev-libs/tree-sitter[ts-cli], but why?
Comment 9 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-01-05 08:08:45 UTC
It's thanks to this, which also checks for nodejs: https://github.com/rizinorg/rizin/blob/v0.3.2/shlr/rizin-shell-parser/src/meson.build#L3

if tree_sitter_bin.found() and node_bin.found() and tree_sitter_dep.type_name() != 'internal'
  parser_c = custom_target('parser_src_c',
    command: [tree_sitter_wrap_py, tree_sitter_bin, '@OUTDIR@/..', '@INPUT@'],
    input: [grammar_js],
    output: 'parser.c',
  )
else
  parser_c = files('parser.c')
endif
Comment 10 Larry the Git Cow gentoo-dev 2022-01-06 19:08:05 UTC
The bug has been closed via the following commit(s):

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

commit c177d1212996d8cf74d5fc8b1b613fdb1dd4e7c9
Author:     John Helmert III <ajak@gentoo.org>
AuthorDate: 2022-01-06 18:52:29 +0000
Commit:     John Helmert III <ajak@gentoo.org>
CommitDate: 2022-01-06 19:07:27 +0000

    dev-util/rizin: workaround build failure with tree-sitter[-ts-cli] and nodejs
    
    Closes: https://bugs.gentoo.org/830068
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 .../files/rizin-0.3.2-never-rebuild-parser.patch   | 36 ++++++++++++++++++++++
 dev-util/rizin/rizin-0.3.2.ebuild                  |  3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)