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

Prefer cc and c++ when using CMake on FreeBSD #139

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

mudge
Copy link
Contributor

@mudge mudge commented Apr 9, 2024

As of FreeBSD 10.X, clang is installed as the default compiler with "cc" and "c++" as aliases to "clang" and "clang++" respectively.

test/test_cmake.rb Outdated Show resolved Hide resolved
@mudge mudge marked this pull request as ready for review April 9, 2024 07:37
@flavorjones
Copy link
Owner

flavorjones commented Apr 10, 2024

@mudge Thanks for this. Ideally I'd like FreeBSD included in the CI matrix. Let me do that in a separate PR and then we can rebase this.

Edit: that PR is #140

also split fedora out into two jobs (unit and examples)
@flavorjones
Copy link
Owner

@mudge I've pushed a commit onto this branch that has CI set up on FreeBSD. You can see the pristine state of those CI jobs at #140 which seem to be failing on:

  • test:unit failures related to the compiler config (possibly fixed by this PR?)
  • test:example failures related to, I think, BSD make vs GNU make

Let's see what happens! 🤞

@flavorjones
Copy link
Owner

flavorjones commented Apr 10, 2024

🎉 the unit tests are passing in this PR because you've configured the compiler! whee!

Do you want to try to address the make issues from test:examples in this PR, too?

@mudge
Copy link
Contributor Author

mudge commented Apr 11, 2024

I'm not too familiar with make on FreeBSD but I'm guessing we need to use gmake instead (which may require installing via pkg install devel/gmake first)?

As of FreeBSD 10.X, clang is installed as the default compiler with "cc"
and "c++" as aliases to "clang" and "clang++" respectively.
By default, "make" on FreeBSD is not compatible with the GNU make
expected by the example libraries that test:examples will attempt to
compile.

GNU make _is_ available for FreeBSD but isn't installed by default so we
explicitly download it and set the MAKE environment variable so
MiniPortile will use it.
@mudge
Copy link
Contributor Author

mudge commented Apr 12, 2024

As gmake is not available by default on FreeBSD, I'm not sure how you'd feel about defaulting to that within MiniPortile itself (though I suppose cmake isn't available out of the box either). I also suppose this would vary between recipes: some might work with BSD make and others with GNU.

As a middle ground, I've added e0de764 which explicitly installs devel/gmake and instructs MiniPortile to use it by setting the MAKE environment variable to gmake. This should hopefully get the tests passing but I'll leave it to you whether we want to set to be the default on FreeBSD.

@flavorjones
Copy link
Owner

@mudge That's perfect! Thank you for doing that, the bsd job is green: https://github.com/flavorjones/mini_portile/actions/runs/8661982917/job/23757576215?pr=139

I'll merge and cut a release later today!

@flavorjones flavorjones merged commit 5fe79a4 into flavorjones:main Apr 12, 2024
34 checks passed
@flavorjones
Copy link
Owner

Just shipped 2.8.6: Release 2.8.6 / 2024-04-14 · flavorjones/mini_portile

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