Hi, can you please send the patch?
(In reply to Gabriel M. Dutra from comment #1) I'm not too familiar with ports unfortunately. Is there no maintainer for this port?
I had a short look at this, the trivial portbump (update DISTVERSION, distinfo etc) is insufficient. A compile-time error against boehm-gc (garbage collector dependency) needs better eyes than I: =========================================================================== =======================<phase: build >============================ ===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0 ===> Building for crystal-1.13.2 Using /usr/local/bin/llvm-config16 [version=16.0.6]c++ -c -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/local/llvm16/include -std=c++17 -fno-exceptions -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS CRYSTAL_CONFIG_BUILD_COMMIT="84f389ac5424" CRYSTAL_CONFIG_PATH=lib:/usr/local/lib/crystal SOURCE_DATE_EPOCH="1724112000" CRYSTAL_CONFIG_LIBRARY_PATH='$ORIGIN/../lib/crystal' ./bin/crystal build --progress --stats --threads 1 --release --no-debug -D strict_multi_assign -D preview_overload_order --link-flags=" -fstack-protector-strong " -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2 Using compiled compiler at .build/crystal [1/13] Parse Parse: 00:00:00.000029265 ( 1.08MB) [1/13] Parse [2/13] Semantic (top level) Semantic (top level): 00:00:00.422623703 ( 186.00MB) [2/13] Semantic (top level) [3/13] Semantic (new) Semantic (new): 00:00:00.002523794 ( 186.00MB) [3/13] Semantic (new) [4/13] Semantic (type declarations) Semantic (type declarations): 00:00:00.051350170 ( 202.00MB) [4/13] Semantic (type declarations) [5/13] Semantic (abstract def check) Semantic (abstract def check): 00:00:00.083600182 ( 210.00MB) [5/13] Semantic (abstract def check) [6/13] Semantic (restrictions augmenter) Semantic (restrictions augmenter): 00:00:00.018897988 ( 210.00MB) Showing last frame. Use --error-trace for full trace. There was a problem expanding macro 'macro_35918929520' Code in src/gc/boehm.cr:387:3 387 | {% if flag?(:preview_mt) %} ^ Called macro defined in src/gc/boehm.cr:387:3 387 | {% if flag?(:preview_mt) %} Which expanded to: > 2 | # support for legacy gc releases > 3 | def self.set_stackbottom(stack_bottom : Void*) > 4 | LibGC.stackbottom = stack_bottom ^---------- Error: undefined fun 'stackbottom=' for LibGC [6/13] Semantic (restrictions augmenter) [7/13] Semantic (ivars initializers) gmake: *** [Makefile:227: .build/crystal] Error 1 *** Error code 1 Stop. Mohamed you might want to open a bug upstream at crystal-lang and see if they have any suggestions.
full poudriere log https://pkg.skunkwerks.at/poudriere/data/14_1_x64-default/2024-09-03_13h49m13s/logs/errors/crystal-1.13.2.log
Created attachment 253451 [details] naive portbump, doesn't build per PR info still needs fix for boehm-gc error
I recommend asking on the Crystal forums about the porting issues: https://forum.crystal-lang.org/c/help-support/11
The problem seems to be with the old bootstrap compiler used (1.5.1). The `has_method?` macro doesn't seem to work correctly in it: $ curl -OL https://github.com/dmgk/crystal-bootstrap/releases/download/1.5.1/crystal-1.5.1-amd64-llvm14.tar.xz $ tar -xf crystal-1.5.1-amd64-llvm14.tar.xz $ cat boehm.cr @[Link("gc-threaded")] lib LibGC fun set_stackbottom = GC_set_stackbottom(th : ThreadHandle, sb : StackBase*) : ThreadHandle end module GC {% if !LibGC.has_method?(:set_stackbottom) %} {% raise "has_method? failed" %} {% end %} end $ CRYSTAL_PATH=/usr/local/lib/crystal .build/crystal build boehm.cr # build with the 1.5.1 compiler Showing last frame. Use --error-trace for full trace. In boehm.cr:6:3 6 | {% if !LibGC.has_method?(:set_stackbottom) %} ^ Error: has_method? failed $ crystal build boehm.cr # build with the 1.10.1 compiler $ Will have to update the bootstrap compiler to eg. 1.10.1, the current version in ports, and it should work then.
found https://github.com/crystal-lang/crystal/commit/6d75bf013c68a1b74c96b6a9592aed638cefedb9 this is not sufficient. But we can build crystal 1.5.1 -> 1.10.1 -> 1.15.1 Asked upstream https://github.com/crystal-lang/crystal/issues/15633 if we can skip the intermediary step somehow.
hi Dmitri, can you ACK this review https://reviews.freebsd.org/D49663 please? thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c96bd72c84ec617d1a54b5adef9c1862132db961 commit c96bd72c84ec617d1a54b5adef9c1862132db961 Author: Dave Cottlehuber <dch@FreeBSD.org> AuthorDate: 2025-05-23 22:12:05 +0000 Commit: Dave Cottlehuber <dch@FreeBSD.org> CommitDate: 2025-05-23 23:21:57 +0000 lang/crystal: update to 1.16.3 - take ownership - thanks @straight-shoota & @ysbaddaden for diagnosis & patches - ChangeLog https://github.com/crystal-lang/crystal/releases PR: 276271 Sponsored by: SkunkWerks, GmbH lang/crystal/Makefile | 68 +++++++++------- lang/crystal/distinfo | 6 +- lang/crystal/pkg-plist | 213 +++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 241 insertions(+), 46 deletions(-)