Skip to content
Snippets Groups Projects

Add FreeBSD download URLs

Merged Herbert Valerio Riedel requested to merge github/fork/gwils/freebsd into master

Created by: gwils

This does not currently work because the Makefile it calls requires GNU make (ie. it does not work with BSD make). We can fix this by having FreeBSD call gmake instead of make, but I haven't figured out how to do that yet (bash is not my specialty).

So if anybody would like to do that or help me with it, we can get FreeBSD support happening!

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Contributor

    cabal-install downloads are missing afais

  • Created by: gwils

    There is already one for 2.4.1.0, which I successfully used.

  • Contributor

    We can fix this by having FreeBSD call gmake instead of make, but I haven't figured out how to do that yet (bash is not my specialty).

    You can try the following

    # @FUNCTION: emake
    # @USAGE: [arguments]
    # @DESCRIPTION:
    # Wrapper around 'make', may call 'gmake' if it exists.
    emake() {
        # avoid re-checking for gmake
        if [ -n "${MAKE}" ] ; then
            edo ${MAKE} "$@"
        else
            if command_exists gmake ; then
                MAKE=gmake
                edo ${MAKE} "$@"
            else
                MAKE=make
                edo ${MAKE} "$@"
            fi
        fi
    }

    And then replace all our edo make calls in ghcup with emake.

  • Created by: gwils

    I've marked this "ready for review". Note that the binaries don't work very well on FreeBSD12 (which I'm running). @hvr is trying to find the relevant issue, which relates to ABI differences between FreeBSD 11 and 12

  • IIrc the ABI issues are due to https://lists.freebsd.org/pipermail/freebsd-fs/2017-April/024684.html which affects syscalls such as stat(2) at the ABI level. Basically we need to be mindful to use the appropriate bindists for fbsd11 and fbsd12 respectively

  • Created by: gwils

    Perhaps I should mark these as freebsd=11 rather than just freebsd. Thoughts?

  • Ghost User
  • Contributor

    Perhaps I should mark these as freebsd=11 rather than just freebsd. Thoughts?

    That would enable us to merge the current PR I guess. Does ghcup detect the 11 part correctly?

  • Created by: gwils

    It does now! On FreeBSD 11, I built and ran tests of lens on all major ghc releases that ghcup supports. The tests all pass except for the doctests.

    For 8.0.2, I've put FreeBSD 9 or 10 or 11, because the release notes claim that build will work on those versions. For later versions I've been more conservative.

  • Ghost User
  • Herbert Valerio Riedel
  • Created by: gwils

    By the way, I can smash this all into one or two commits if you'd prefer.

  • Please register or sign in to reply
    Loading