cmdstanr icon indicating copy to clipboard operation
cmdstanr copied to clipboard

FreeBSD support

Open tenomoto opened this issue 1 year ago • 6 comments

Submission Checklist

  • [ ] Run unit tests
  • [X] Declare copyright holder and agree to license (see below)

Summary

The make command on FreeBSD is BSD make. gmake should be called instead of make.

  • Add a function to detect FreeBSD.
  • Modify make_cmd() to return gmake on FreeBSD.
  • replace hard coded make to make_cmd().

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Takeshi Enomoto

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

  • Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
  • Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

tenomoto avatar Feb 25 '24 02:02 tenomoto

Thank you for the PR @tenomoto! @andrjohns @rok-cesnovar Any issues with adding this?

I think the test failures (at least the ones I've checked) are unrelated to these changes: I need to update one test after the latest release of the loo package.

jgabry avatar Feb 25 '24 21:02 jgabry

I think the test failures (at least the ones I've checked) are unrelated to these changes: I need to update one test after the latest release of the loo package.

Just merged the fix into this branch so we'll see if everything passes now

jgabry avatar Feb 25 '24 23:02 jgabry

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 88.31%. Comparing base (4b94b11) to head (c137627).

:exclamation: Current head c137627 differs from pull request most recent head 4976da1. Consider uploading reports for the commit 4976da1 to get more accurate results

Files Patch % Lines
R/utils.R 75.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #922      +/-   ##
==========================================
- Coverage   88.32%   88.31%   -0.02%     
==========================================
  Files          12       12              
  Lines        4548     4551       +3     
==========================================
+ Hits         4017     4019       +2     
- Misses        531      532       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Feb 26 '24 02:02 codecov-commenter

@tenomoto Is there a reason to require GNU make on FreeBSD? MacOS uses BSD make with no issues

andrjohns avatar Feb 26 '24 07:02 andrjohns

@tenomoto Before this can be merged, cmdstan itself should be able to run on FreeBSD, which does not appear to be the case.

I just spun up a FreeBSD VM, and the stanc3 transpiler does not have FreeBSD-compatible binaries. Additionally, the OS detection used in the Makefiles for the various submodules and libraries in cmdstan does not handle FreeBSD.

The contribution is very much appreciated, but we can't introduce codepaths which imply support that doesn't exist

andrjohns avatar Feb 26 '24 09:02 andrjohns

I just spun up a FreeBSD VM, and the stanc3 transpiler does not have FreeBSD-compatible binaries. Additionally, the OS detection used in the Makefiles for the various submodules and libraries in cmdstan does not handle FreeBSD.

Thanks for checking this @andrjohns

jgabry avatar Feb 26 '24 17:02 jgabry