Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBSD ports Crystal not building #14026

Closed
TheWanderer1983 opened this issue Nov 29, 2023 · 9 comments
Closed

OpenBSD ports Crystal not building #14026

TheWanderer1983 opened this issue Nov 29, 2023 · 9 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:bsd

Comments

@TheWanderer1983
Copy link

Hello all,

Not really specific to the package but I thought I would reach out given https://crystal-lang.org/install/on_openbsd/ page.

Currently the ports version is broken and needs repair. I've seen not initiative via the ports mailing list to fix it. Is there any kind soul who would like to fix this?

Regards
Dylan

@TheWanderer1983 TheWanderer1983 added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Nov 29, 2023
@GeopJr
Copy link
Contributor

GeopJr commented Nov 29, 2023

I'll take a look

@GeopJr
Copy link
Contributor

GeopJr commented Nov 29, 2023

Duplicate of / related to #13665

@straight-shoota
Copy link
Member

This should be resolved with #15122

@TheMBL09898
Copy link

Compiling in OpenBSD 7.6 still fails, gmake returns:

Using /usr/local/bin/llvm-config-17 [version=17.0.6]
c++ -c  -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/local/llvm17/include -std=c++17   -fno-exceptions -funwind-tables -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
CRYSTAL_CONFIG_BUILD_COMMIT="c5455ce" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH="1734780009"  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.

In /usr/local/lib/crystal/compiler/crystal/syntax/ast.cr:125:5

 125 | enum Keyword
       ^
Error: can't reopen enum and add more constants to it
gmake: *** [Makefile:246: .build/crystal] Error 1

@GeopJr
Copy link
Contributor

GeopJr commented Dec 22, 2024

Probably open a new issue, this was specifically about indirect branch tracking

@ysbaddaden
Copy link
Contributor

Yeah, that's a crystal path issue.

@TheMBL09898
Copy link

Could you guys hint me on how to fix that or the build commands you used to compile successfully on OpenBSD?... I know it's not the appropriate place, but I can't find any information anywhere else. Sorry

@straight-shoota
Copy link
Member

@TheMBL09898 It's probably best to ask in the support section on the Crystal forum: https://forum.crystal-lang.org/c/help-support/11 (or in a community chat channel). Please include repeatable steps (the exact commands you ran that ended up with that error message).

@ysbaddaden
Copy link
Contributor

The crystal binary is probably a shell script that sets some environment vars then calls the actual crystal binary. Those env vars likely conflict with the ones declared by the Makefile and the compiler ends up loading the stdlib twice (from install then got clone) which conflicts.

You may copy the actual binary as .build/crystal then force a rebuild with gmake -B or adapt the shell script to only set the env vars when unset.

For further help please reach to the forum, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:bsd
Projects
None yet
Development

No branches or pull requests

6 participants