crystal-lang / crystal_lib

Automatic binding generator for native libraries in Crystal
138 stars 30 forks source link

Compilation problem with Crystal 0.35.1 on Linux Mint 20 - Intel i7 #73

Open alexbottoni opened 3 years ago

alexbottoni commented 3 years ago

Looks like we have a problem:

$ crystal src/main.cr -- examples/lib_git2.cr
Showing last frame. Use --error-trace for full trace.

In src/crystal_lib/lib_body_transformer.cr:56:17

56 | rescue ex : Crystal::CodeError ^ Error: undefined constant Crystal::CodeError

######## This happens when trying to use make, as well:

$ make
crystal build src/main.cr Showing last frame. Use --error-trace for full trace.

In src/crystal_lib/lib_body_transformer.cr:56:17

56 | rescue ex : Crystal::CodeError

######## This is the error trace:

$ crystal build src/main.cr --error-trace
In src/main.cr:5:20

5 | transformed = node.transform visitor ^-------- Error: instantiating 'Crystal::ASTNode+#transform(CrystalLib::LibTransformer)'

In /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:26

7 | node = transformer.transform self ^-------- Error: instantiating 'CrystalLib::LibTransformer#transform(Crystal::ASTNode+)'

In src/crystal_lib/lib_transformer.cr:21:29

21 | node.body = node.body.transform CrystalLib::LibBodyTransformer.new(nodes) ^-------- Error: instantiating 'Crystal::ASTNode+#transform(CrystalLib::LibBodyTransformer)'

In /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:26

7 | node = transformer.transform self ^-------- Error: instantiating 'CrystalLib::LibBodyTransformer#transform(Crystal::ASTNode+)'

In src/crystal_lib/lib_body_transformer.cr:56:17

56 | rescue ex : Crystal::CodeError

########## I'm using Linux Mint 20 Ulyana on a Intel i7 machine. Crystal is as follows:

$ crystal --version
Crystal 0.35.1 [5999ae29b] (2020-06-19)

LLVM: 8.0.0 Default target: x86_64-unknown-linux-gnu

bcardiff commented 3 years ago

The master of this repo requires Crystal 0.36.0 since #72 was merged.

Either update to latest crystal or use ref: 513e51e0eea9341cd095c820a4563bbf6a53a2e5 (last commit with 0.35 support) in your shard.yml declaration of crystal_lib dependency.