Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #28

Closed
4l1fe opened this issue Sep 7, 2022 · 8 comments
Closed

Build error #28

4l1fe opened this issue Sep 7, 2022 · 8 comments

Comments

@4l1fe
Copy link

4l1fe commented Sep 7, 2022

Could you help me to solve a compilation problem.

$ cargo install --path . --force --features "python"
  Installing kak-tree v0.1.0 (/home/user/kak-tree)
    Updating crates.io index
warning: In file included from vendor/tree-sitter-python/src/parser.c:1:
warning: vendor/tree-sitter-python/src/parser.c: In function ‘ts_lex_keywords’:
warning: vendor/tree-sitter-python/src/tree_sitter/parser.h:131:8: warning: variable ‘eof’ set but not used [-Wunused-but-set-variable]
warning:   131 |   bool eof = false;             \
warning:       |        ^~~
warning: vendor/tree-sitter-python/src/parser.c:2803:3: note: in expansion of macro ‘START_LEXER’
warning:  2803 |   START_LEXER();
warning:       |   ^~~~~~~~~~~
warning: vendor/tree-sitter-rust/src/scanner.c: In function ‘tree_sitter_rust_external_scanner_destroy’:
warning: vendor/tree-sitter-rust/src/scanner.c:12:54: warning: unused parameter ‘p’ [-Wunused-parameter]
warning:    12 | void tree_sitter_rust_external_scanner_destroy(void *p) {}
warning:       |                                                ~~~~~~^
warning: vendor/tree-sitter-rust/src/scanner.c: In function ‘tree_sitter_rust_external_scanner_reset’:
warning: vendor/tree-sitter-rust/src/scanner.c:13:52: warning: unused parameter ‘p’ [-Wunused-parameter]
warning:    13 | void tree_sitter_rust_external_scanner_reset(void *p) {}
warning:       |                                              ~~~~~~^
warning: vendor/tree-sitter-rust/src/scanner.c: In function ‘tree_sitter_rust_external_scanner_serialize’:
warning: vendor/tree-sitter-rust/src/scanner.c:14:60: warning: unused parameter ‘p’ [-Wunused-parameter]
warning:    14 | unsigned tree_sitter_rust_external_scanner_serialize(void *p, char *buffer) { return 0; }
warning:       |                                                      ~~~~~~^
warning: vendor/tree-sitter-rust/src/scanner.c:14:69: warning: unused parameter ‘buffer’ [-Wunused-parameter]
warning:    14 | unsigned tree_sitter_rust_external_scanner_serialize(void *p, char *buffer) { return 0; }
warning:       |                                                               ~~~~~~^~~~~~
warning: vendor/tree-sitter-rust/src/scanner.c: In function ‘tree_sitter_rust_external_scanner_deserialize’:
warning: vendor/tree-sitter-rust/src/scanner.c:15:58: warning: unused parameter ‘p’ [-Wunused-parameter]
warning:    15 | void tree_sitter_rust_external_scanner_deserialize(void *p, const char *b, unsigned n) {}
warning:       |                                                    ~~~~~~^
warning: vendor/tree-sitter-rust/src/scanner.c:15:73: warning: unused parameter ‘b’ [-Wunused-parameter]
warning:    15 | void tree_sitter_rust_external_scanner_deserialize(void *p, const char *b, unsigned n) {}
warning:       |                                                             ~~~~~~~~~~~~^
warning: vendor/tree-sitter-rust/src/scanner.c:15:85: warning: unused parameter ‘n’ [-Wunused-parameter]
warning:    15 | void tree_sitter_rust_external_scanner_deserialize(void *p, const char *b, unsigned n) {}
warning:       |                                                                            ~~~~~~~~~^
warning: vendor/tree-sitter-rust/src/scanner.c: In function ‘tree_sitter_rust_external_scanner_scan’:
warning: vendor/tree-sitter-rust/src/scanner.c:25:51: warning: unused parameter ‘payload’ [-Wunused-parameter]
warning:    25 | bool tree_sitter_rust_external_scanner_scan(void *payload, TSLexer *lexer,
warning:       |                                             ~~~~~~^~~~~~~
warning: In file included from vendor/tree-sitter-rust/src/parser.c:1:
warning: vendor/tree-sitter-rust/src/parser.c: In function ‘ts_lex_keywords’:
warning: vendor/tree-sitter-rust/src/tree_sitter/parser.h:131:8: warning: variable ‘eof’ set but not used [-Wunused-but-set-variable]
warning:   131 |   bool eof = false;             \
warning:       |        ^~~
warning: vendor/tree-sitter-rust/src/parser.c:4786:3: note: in expansion of macro ‘START_LEXER’
warning:  4786 |   START_LEXER();
warning:       |   ^~~~~~~~~~~
   Compiling kak-tree v0.1.0 (/home/user/kak-tree)
error: linking with `cc` failed: exit status: 1

Not sure if it's kak-tree issue , probably of tree-sitter-python

@ul
Copy link
Owner

ul commented Sep 7, 2022

Interesting, I get the same warning, but the build finishes successfully. I upgraded tree-sitter-*, would you mind trying again with the fresh master?

@4l1fe
Copy link
Author

4l1fe commented Sep 8, 2022

Recloned the repo, tried to recompile it with the same command and got the same error unfortunately.

@4l1fe
Copy link
Author

4l1fe commented Sep 8, 2022

Here is a full log of compiling

@ul
Copy link
Owner

ul commented Sep 8, 2022

I believe it's the same problem as described here Wilfred/difftastic#339
I'm happy to accept PR with the solution similar to Wilfred/difftastic@a247218

@4l1fe
Copy link
Author

4l1fe commented Sep 9, 2022

I believe it's the same problem as described here Wilfred/difftastic#339 I'm happy to accept PR with the solution similar to Wilfred/difftastic@a247218

It looks the same, yeah. Well, i'm a way far from Rust to make a PR. This error actually stopped me using Kakoune as your plugin is the only of tree sitter.

What do you think about if i take older versions of Cargo and etc? Worth it to try?

@4l1fe
Copy link
Author

4l1fe commented Sep 12, 2022

Solved. Compiled successfully downgrading rust version rustup default '1.60', a previous one was 1.62.

Also tried 1.63, 1.61 , they raise the same error.

Some more debug info

❯ cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)

❯ uname -a
Linux vol-host 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

❯ rustc -V
rustc 1.60.0 (7737e0b5c 2022-04-04)

@4l1fe 4l1fe closed this as completed Sep 12, 2022
@ul
Copy link
Owner

ul commented Sep 13, 2022

I'm glad that it helped. I hope the upstream issue will be fixed soon, and you can upgrade Rust back.

@CharlesGueunet
Copy link

Unfortunately, it seems the solution does not work anymore, using 1.60 I have the following error:

❯ cargo install --path . --force --features "rust c cpp python javascript bash"
  Installing kak-tree v0.1.0 (/home/user/.config/kak-tree)
    Updating crates.io index
error: failed to compile `kak-tree v0.1.0 (/home/user/.config/kak-tree)`, intermediate artifacts can be found at `/home/user/.config/kak-tree/target`

Caused by:
  package `time v0.3.20` cannot be built because it requires rustc 1.63.0 or newer, while the currently active rustc version is 1.60.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants