Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
home$ CXX=/usr/local/bin/clang++ gmake
Using /usr/bin/llvm-config [version=8.0.1]
/usr/local/bin/clang++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/include -O2 -pipe -fno-ret-protector -mno-retpoline -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -DNDEBUG -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
cc -fPIC -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
CRYSTAL_CONFIG_PATH="/home/wmoxam/projects/crystal/src" CRYSTAL_CONFIG_LIBRARY_PATH="" CRYSTAL_CONFIG_BUILD_COMMIT="5d135c22b" ./bin/crystal build -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
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 "/home/wmoxam/projects/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", "/home/wmoxam/projects/crystal/src/compiler/crystal/tools/init/template/example_spec.cr.ecr", "__io__") }}
^--
Error: Error executing run (exit code: 5): ecr/process "/home/wmoxam/projects/crystal/src/compiler/crystal/tools/init/template/example_spec.cr.ecr" "__io__"
stderr:
Failed to raise an exception: END_OF_STACK
[0x4b355a9b406] __crystal_sigfault_handler +8262
[0x4b355a77ded] __crystal_raise +45
[0x4b355a830a0] __crystal_realloc +36848
[0x4b355a7d542] __crystal_realloc +13458
[0x4b355a93ef8] __crystal_realloc +106056
[0x4b355a92fbc] __crystal_realloc +102156
[0x4b355a79f6d] main +61
[0x4b355a7513b] __start +315
gmake: *** [Makefile:132: .build/crystal] Error 1
home$ uname -a
OpenBSD 6.6 GENERIC.MP#355 amd64
@wmoxam

This comment has been minimized.

Copy link
Owner Author

@wmoxam wmoxam commented Oct 6, 2019

@KaneRoot

This comment has been minimized.

Copy link

@KaneRoot KaneRoot commented Apr 7, 2020

I do have the same problem now that I try to compile crystal version 0.31.0 on OpenBSD. I saw that the current package for 6.6 is way older than the current version on Linux (0.34.0 today). How to get the 0.30.1 compiling newer versions?
I didn't see anything related to that on Crystal github issues.

@wmoxam

This comment has been minimized.

Copy link
Owner Author

@wmoxam wmoxam commented Apr 7, 2020

I fixed this problem here: crystal-lang/crystal#8293

However, a new issue popped up in 0.32 which causes compilation to hang. I haven't had time to track that one down yet 😕

@wmoxam

This comment has been minimized.

Copy link
Owner Author

@wmoxam wmoxam commented Apr 7, 2020

At the very least you could apply the above fix to 0.31 to get it to compile + run.

@wmoxam

This comment has been minimized.

@KaneRoot

This comment has been minimized.

Copy link

@KaneRoot KaneRoot commented Apr 16, 2020

I compiled crystal with your patch on a fresh openbsd -current machine, it works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment