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

feat: add helix #6338

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

etcusrvar
Copy link
Contributor

Description

add helix- https://helix-editor.com

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

draft PR status

This currently builds, installs, and works correctly on avoton-7.1.
all-supported doesn't yet build without errors.

@hgy59
Copy link
Contributor

hgy59 commented Nov 29, 2024

Thanks for contributing.

helix is candiate to be added to synocli-file package.
For the actual development it is ok to have it as dedicated spk.
Later (before merging), we should move spk/helix to diyspk/helix and include helix in spk/synocli-file.

But there is a cross compilation error when building the tree-sitter crate.
Without this fixed, helix would be available for x64 only.

I already found this issue when I tried to build helix 1 1/2 year ago, ....

@hgy59
Copy link
Contributor

hgy59 commented Nov 29, 2024

This is the build error for aarch64-7.1

The wrong CFLAG -m64 is typically for x64, but must not be used for other archs.
I have not a clue where this comes from...

The following warnings were emitted during compilation:

warning: [email protected]: aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-m64’

error: failed to run custom build command for `tree-sitter v0.22.6`

Caused by:
  process didn't exit successfully: `/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-e2838712e9319bfa/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=CARGO_FEATURE_WASM
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/alloc.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/wasm_store.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/wasm
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/get_changed_ranges.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/language.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/tree.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/lib.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/tree_cursor.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/get_changed_ranges.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/tree_cursor.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/lexer.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/host.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/parser.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/stack.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/language.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/subtree.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/point.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/unicode.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/alloc.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/clock.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/atomic.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/reduce_action.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/length.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/reusable_node.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/wasm_store.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/error_costs.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/stack.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/unicode
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/array.h
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/query.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/node.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/tree.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/subtree.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/lexer.c
  cargo:rerun-if-changed=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/parser.c
  OUT_DIR = Some(/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-f4b304b61a55b470/out)
  TARGET = Some(x86_64-unknown-linux-gnu)
  OPT_LEVEL = Some(0)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some(/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc)
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(false)
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some(-I/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include -I/spksrc/cross/helix/work-aarch64-7.1/install/usr/local/helix/include )
  OUT_DIR = Some(/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-f4b304b61a55b470/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some(-I/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include -I/spksrc/cross/helix/work-aarch64-7.1/install/usr/local/helix/include )
  OUT_DIR = Some(/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-f4b304b61a55b470/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some(-I/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include -I/spksrc/cross/helix/work-aarch64-7.1/install/usr/local/helix/include )
  OUT_DIR = Some(/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-f4b304b61a55b470/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some(-I/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include -I/spksrc/cross/helix/work-aarch64-7.1/install/usr/local/helix/include )
  OUT_DIR = Some(/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-f4b304b61a55b470/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some(-I/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include -I/spksrc/cross/helix/work-aarch64-7.1/install/usr/local/helix/include )
  cargo:warning=aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-m64’

  --- stderr


  error occurred: Command "/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src" "-I" "/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/wasm" "-I" "/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/include" "-I/spksrc/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include" "-I/spksrc/cross/helix/work-aarch64-7.1/install/usr/local/helix/include" "-o" "/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-f4b304b61a55b470/out/e2a9901b8fe01e95-lib.o" "-c" "/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/src/lib.c" with args aarch64-unknown-linux-gnu-gcc did not execute successfully (status code exit status: 1).

@etcusrvar
Copy link
Contributor Author

I added CARGO_BUILD_ARGS += -vv to cross/helix/Makefile, and it gave a bit more info--

process didn't exit successfully: `
CARGO=/spksrc/distrib/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo
CARGO_CFG_PANIC=unwind
CARGO_CFG_TARGET_ABI=''
CARGO_CFG_TARGET_ARCH=x86_64
CARGO_CFG_TARGET_ENDIAN=little
CARGO_CFG_TARGET_ENV=gnu
CARGO_CFG_TARGET_FAMILY=unix
CARGO_CFG_TARGET_FEATURE=fxsr,sse,sse2
CARGO_CFG_TARGET_HAS_ATOMIC=16,32,64,8,ptr
CARGO_CFG_TARGET_OS=linux
CARGO_CFG_TARGET_POINTER_WIDTH=64
CARGO_CFG_TARGET_VENDOR=unknown
CARGO_CFG_UNIX=''
CARGO_ENCODED_RUSTFLAGS=''
CARGO_MANIFEST_DIR=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6
CARGO_MANIFEST_LINKS=tree-sitter
CARGO_MANIFEST_PATH=/spksrc/distrib/cargo/registry/src/index.crates.io-6f17d22bba15001f/tree-sitter-0.22.6/Cargo.toml
CARGO_PKG_LICENSE=MIT
CARGO_PKG_LICENSE_FILE=''
CARGO_PKG_NAME=tree-sitter
CARGO_PKG_README=binding_rust/README.md
CARGO_PKG_REPOSITORY='https://github.com/tree-sitter/tree-sitter'
CARGO_PKG_RUST_VERSION=1.65
CARGO_PKG_VERSION=0.22.6
CARGO_PKG_VERSION_MAJOR=0
CARGO_PKG_VERSION_MINOR=22
CARGO_PKG_VERSION_PATCH=6
CARGO_PKG_VERSION_PRE=''
DEBUG=false
HOST=x86_64-unknown-linux-gnu
LD_LIBRARY_PATH='/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/deps:/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt:/spksrc/distrib/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib:/spksrc/distrib/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib'
NUM_JOBS=4
OPT_LEVEL=0
OUT_DIR=/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-4fe5024e6456f75e/out
PROFILE=release
RUSTC=/spksrc/distrib/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc
RUSTDOC=/spksrc/distrib/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustdoc
TARGET=x86_64-unknown-linux-gnu
/spksrc/cross/helix/work-aarch64-7.1/helix-24.07/target/opt/build/tree-sitter-359b4f37ca1845b5/build-script-build
` (exit status: 1)

I tried changing things like CARGO_CFG_TARGET_ARCH and TARGET in the Makefile, but even when explicitly setting them to appropriate aarch64... values, they still show up as x86_64... values.

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

Successfully merging this pull request may close these issues.

2 participants