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 download URLs #70

Merged
merged 6 commits into from
Feb 20, 2019
Merged

Add FreeBSD download URLs #70

merged 6 commits into from
Feb 20, 2019

Conversation

gwils
Copy link
Contributor

@gwils gwils commented Feb 17, 2019

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!

@hasufell
Copy link
Member

cabal-install downloads are missing afais

@gwils
Copy link
Contributor Author

gwils commented Feb 17, 2019

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

@hasufell
Copy link
Member

hasufell commented Feb 17, 2019

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.

@gwils gwils marked this pull request as ready for review February 17, 2019 10:03
@gwils
Copy link
Contributor Author

gwils commented Feb 17, 2019

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

@hvr
Copy link
Member

hvr commented Feb 17, 2019

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

@gwils
Copy link
Contributor Author

gwils commented Feb 18, 2019

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

ghcup Outdated Show resolved Hide resolved
@hasufell
Copy link
Member

hasufell commented Feb 18, 2019

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?

@gwils
Copy link
Contributor Author

gwils commented Feb 18, 2019

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.

Copy link
Member

@hasufell hasufell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix edo "${MAKE}" "$@" to edo ${MAKE} "$@"

ghcup Outdated Show resolved Hide resolved
@gwils
Copy link
Contributor Author

gwils commented Feb 20, 2019

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

@hasufell hasufell merged commit ae263ac into haskell:master Feb 20, 2019
@gwils gwils deleted the freebsd branch January 19, 2020 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants