Comments (9)
Also, I have the most recent version of pcre2 on brew
You most definitely do not. The latest version is
10.43
Yep, just found out it wasn't linked, thank you!
from crystal.
Verified, works like a charm! I will make the PR now
from crystal.
When attempting to compile the project:
❯ make -j
Using /usr/local/opt/llvm/bin/llvm-config [version=17.0.6]
clang++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/local/Cellar/llvm/17.0.6_1/include -std=c++17 -stdlib=libc++ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
CRYSTAL_CONFIG_BUILD_COMMIT="4cea10199" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH="1712838701" CRYSTAL_CONFIG_LIBRARY_PATH='$ORIGIN/../lib/crystal' ./bin/crystal build -D strict_multi_assign -D preview_overload_order -Dwithout_interpreter -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2
Showing last frame. Use --error-trace for full trace.
There was a problem expanding macro 'embed'
Code in macro 'def_to_s'
2 | ECR.embed "/Users/frityet/Documents/Packages/crystal/src/compiler/crystal/tools/init/template/example_spec.cr.ecr", "__io__"
^
Called macro defined in src/ecr/macros.cr:69:3
69 | macro embed(filename, io_name)
Which expanded to:
> 1 | {{ run("ecr/process", "/Users/frityet/Documents/Packages/crystal/src/compiler/crystal/tools/init/template/example_spec.cr.ecr", "__io__") }}
^--
Error: Error executing run (exit code: 1): ecr/process /Users/frityet/Documents/Packages/crystal/src/compiler/crystal/tools/init/template/example_spec.cr.ecr __io__
stderr:
Unhandled exception: Invalid Int32: "36-RC1" (ArgumentError)
from /Users/frityet/.cache/crystal/Users-frityet-Documents-Packages-crystal-src-ecr-process.cr/macro_run in 'raise<ArgumentError>:NoReturn'
from /Users/frityet/.cache/crystal/Users-frityet-Documents-Packages-crystal-src-ecr-process.cr/macro_run in 'String#to_i32<Int32, Bool, Bool, Bool, Bool, Bool>:Int32'
from /Users/frityet/.cache/crystal/Users-frityet-Documents-Packages-crystal-src-ecr-process.cr/macro_run in '__crystal_main'
from /Users/frityet/.cache/crystal/Users-frityet-Documents-Packages-crystal-src-ecr-process.cr/macro_run in 'main'
from /usr/lib/dyld in 'start'
make: *** [.build/crystal] Error 1
from crystal.
This is failing on
Line 20 in 4cea101
XX.YY
but instead is XX-RC1
format. Probably should handle this I'd wager, but until then can probably just work around it by upgrading PCRE2 to a more recent version.from crystal.
This is failing on
Line 20 in 4cea101
because it seems the version of PCRE2 you have does not match the normal convention ofXX.YY
but instead isXX-RC1
format. Probably should handle this I'd wager, but until then can probably just work around it by upgrading PCRE2 to a more recent version.
Is it alright for me to make a patch to accommodate for this? Or is it out of scope
from crystal.
This patch should fix it:
--- i/src/regex/pcre2.cr
+++ w/src/regex/pcre2.cr
@@ -17,7 +17,7 @@ module Regex::PCRE2
version = self.version
dot = version.index('.') || raise RuntimeError.new("Invalid libpcre2 version")
space = version.index(' ', dot) || raise RuntimeError.new("Invalid libpcre2 version")
- {version.byte_slice(0, dot).to_i, version.byte_slice(dot + 1, space - dot - 1).to_i}
+ {version.byte_slice(0, dot).to_i, version.byte_slice(dot + 1, space - dot - 1).to_i(strict: false)}
end
# :nodoc:
You can monkey patch the getter into your code to test this.
from crystal.
Also, I have the most recent version of pcre2 on brew
You most definitely do not. The latest version is 10.43
. I don't even know where this 36-RC1
version is coming from 🤷. Probably old system version?
https://formulae.brew.sh/formula/pcre2
from crystal.
This patch should fix it:
--- i/src/regex/pcre2.cr +++ w/src/regex/pcre2.cr @@ -17,7 +17,7 @@ module Regex::PCRE2 version = self.version dot = version.index('.') || raise RuntimeError.new("Invalid libpcre2 version") space = version.index(' ', dot) || raise RuntimeError.new("Invalid libpcre2 version") - {version.byte_slice(0, dot).to_i, version.byte_slice(dot + 1, space - dot - 1).to_i} + {version.byte_slice(0, dot).to_i, version.byte_slice(dot + 1, space - dot - 1).to_i(strict: false)} end # :nodoc:You can monkey patch the getter into your code to test this.
Alright nice! Im guessing I shouldn't make a PR for this?
from crystal.
Feel free to do so if you can verify it actually works.
from crystal.
Related Issues (20)
- Weird compilation error happening only on CI Github Action HOT 8
- Fail to compile in path with whitespace HOT 3
- Compiler error when output directory for object file is missing HOT 3
- It's impossible to create a regex that is MULTILINE but not DOT_ALL HOT 2
- Error: read before assignment to local variable '' HOT 2
- `Enumerable` method to find the first truthy block result and return that result HOT 8
- Macro Code Coverage
- `MacroIf` then/else missing location information HOT 1
- Doc error for Channel#close, Channel#close? when channel is buffered channel.
- Invalid memory access in release mode with LLVM 18 HOT 2
- `Number.new` causes `IndexError` with blank value and `whitespace: false`
- Ensuring `class_getter` runs exactly once under concurrent access HOT 3
- Methods with a return type of `self` automatically return `self` HOT 3
- Store annotations within the node they annotate HOT 3
- Method overloads and type specificity are influenced by order of definition HOT 5
- Error: undefined method 'to_unsafe' for Foo (compile-time type is MyModule) HOT 4
- Filters do not work with dependencies tool on Windows HOT 1
- Zstd - "you've found a bug in the Crystal compiler. Please open an issue .. " HOT 2
- `XML::Error.errors` leaks memory HOT 16
- Nil assertion failed (NilAssertionError) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crystal.