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

Add FreeBSD to CirrusCI jobs. #340

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Add FreeBSD to CirrusCI jobs. #340

merged 1 commit into from
Sep 7, 2022

Conversation

jemc
Copy link
Contributor

@jemc jemc commented Sep 7, 2022

This will let us do binary releases (and basic smoke tests) on FreeBSD.

@jemc jemc self-assigned this Sep 7, 2022
@jemc jemc force-pushed the add/freebsd-ci branch 3 times, most recently from 5c99c81 to 16f1ca3 Compare September 7, 2022 18:49
This will let us do binary releases (and basic smoke tests) on FreeBSD.
@jemc jemc changed the title WIP: Add FreeBSD CI Add FreeBSD to CirrusCI jobs. Sep 7, 2022
@jemc jemc marked this pull request as ready for review September 7, 2022 20:11
@jemc jemc merged commit 83e71e7 into main Sep 7, 2022
@jemc jemc deleted the add/freebsd-ci branch September 7, 2022 20:11
@mneumann
Copy link
Contributor

mneumann commented Sep 7, 2022

@jemc is this working on your box? I am having trouble with the semantic version of llvm-devel on my box, which is 15.0.0git. This is what works on my box:

gmake build/savi-release \
        LLVM_CONFIG=llvm-config14 \
        LIB_GC=/usr/local/lib/libgc-threaded.a

In addition, you need to patch Makefile:

diff --git a/Makefile b/Makefile
index 71faad2b..12ec69b3 100644
--- a/Makefile
+++ b/Makefile
@@ -171,6 +171,10 @@ ifneq (,$(findstring macos,$(TARGET_PLATFORM)))
        CRYSTAL_RT_LIBS+=-liconv
 endif
 
+ifneq (,$(findstring freebsd,$(TARGET_PLATFORM)))
+       CRYSTAL_RT_LIBS+=-L/usr/local/lib
+endif
+
 # This is the path to the Crystal standard library source code,
 # including the LLVM extensions C++ file we need to build and link.
 CRYSTAL_PATH?=$(shell env $(shell crystal env) printenv CRYSTAL_PATH | rev | cut -d ':' -f 1 | rev)

@jemc
Copy link
Contributor Author

jemc commented Sep 8, 2022

I added this CI and it does a successful build and a successful "smoke test" (compiling and running a simple program that merely prints to stdout). I didn't test anything beyond that at this time.

It passed CI here in this PR, but recently started failing this morning related to some LLVM versioning issue - which is really strange. I don't understand why it didn't fail yesterday when I tested this in CI. But I can try your fix.

@mneumann - What pkg install command do I need to use to get llvm-config14 available on the FreeBSD CI machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants