Skip to content

Instantly share code, notes, and snippets.

@wmoxam
Created October 6, 2019 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmoxam/ec0c03fe56ee4454c1238cdfb3701ed4 to your computer and use it in GitHub Desktop.
Save wmoxam/ec0c03fe56ee4454c1238cdfb3701ed4 to your computer and use it in GitHub Desktop.
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
Copy link
Author

wmoxam commented Oct 6, 2019

@KaneRoot
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

wmoxam commented Apr 12, 2020

@KaneRoot
Copy link

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