murtaza64 / tree-sitter-groovy

Tree sitter parser for groovy
MIT License
14 stars 10 forks source link

Crate can not be build on M1 MacOS 13.2.1 #12

Closed LetsMelon closed 2 months ago

LetsMelon commented 2 months ago

Example main.rs:

use tree_sitter::Parser;

fn main() {
    let code = "def x = 10";

    let mut parser = Parser::new();
    parser
        .set_language(tree_sitter_groovy::language())
        .expect("Error loading Rust grammar");

    parser.parse(code, None).unwrap();
}

Dependencies:

[dependencies]
tree-sitter = "0.20.10"
tree-sitter-groovy = { git = "https://github.com/murtaza64/tree-sitter-groovy.git", rev = "6c5c8813233fe326e24c5ef032858d13f8006a8d" }

[build-dependencies]
cc = "*"

Error:

note: ld: warning: object file (/Users/.../target/debug/deps/libtree_sitter_groovy-9c3a91abc7ffa795.rlib(2e40c9e35e9506f4-parser.o)) was built for newer macOS version (13.3) than being linked (13.0)
          ld: warning: object file (/Users/.../target/debug/deps/libtree_sitter-4212bba4d9708ba1.rlib(2e40c9e35e9506f4-lib.o)) was built for newer macOS version (13.3) than being linked (13.0)
          Undefined symbols for architecture arm64:
            "_tree_sitter_YOUR_LANGUAGE_NAME", referenced from:
                tree_sitter_groovy::language::h114082ef323a1027 in libtree_sitter_groovy-9c3a91abc7ffa795.rlib(tree_sitter_groovy-9c3a91abc7ffa795.tree_sitter_groovy.e126e71c72f745cb-cgu.0.rcgu.o)
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm currently upgrading my laptop to macOS 14.5 to see if I can build the crate with a newer version. Do you know if I have an error somewhere, or if there is an error somewhere else?

LetsMelon commented 2 months ago

I think https://github.com/murtaza64/tree-sitter-groovy/pull/8 fixes the error, at least it builds

LetsMelon commented 2 months ago

I will close this issue because the crate works with #8.