Skip to content

Support for NetBSD #6733

Open
Open

Description

@diabloblanko

Maybe there's not a lot desktop NetBSD users, but i am.

Activity

  1. mpilgrem commented on May 8, 2025

    @mpilgrem
    Member

    @diabloblanko, thanks for reporting. I am not familar with BSD(s): does supporting NetBSD differ from supporting FreeBSD?

    I am aware that @arrowd makes available binary distributions for GHC for FreeBSD/x86_64 and they are added to Stack's default set-up dictionary under freebsd64-ino64: see, for example, commercialhaskell/stackage-content#231. @arrowd may be at the coalface of using Stack on BSD(s).

    The GHCup project builds things for a wider range of platforms, but I see that it documents that it does not build Stack executables for FreeBSD/x86_64: https://www.haskell.org/ghcup/install/#supported-platforms. I do not know why (whether it is, for example, due to prioritisation given limited capacity or for something lacking in Stack's source code). @hasufell may be able provide more colour.

  2. hasufell commented on May 8, 2025

    @hasufell
    Contributor

    does supporting NetBSD differ from supporting FreeBSD

    They are not binary compatible, afaik.

    but I see that it documents that it does not build Stack executables for FreeBSD/x86_64

    We do: https://downloads.haskell.org/ghcup/unofficial-bindists/stack/3.5.1/

  3. mpilgrem commented on May 8, 2025

    @mpilgrem
    Member

    @hasufell, thanks for input. I'll raise a pull request to update GHCup's online documentation.

  4. mpilgrem commented on May 8, 2025

    @mpilgrem
    Member

    Given @hasufell's input and some consistent output from ChatGPT, I now understand that:

    FreeBSD executables do not run natively on NetBSD by default, but NetBSD can run them with some limitations through binary compatibility.

    So, I assume that the starting point for any Stack support for NetBSD is GHC support for NetBSD. The GHC project's support for platforms is 'tiered' and set out here: https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms.

    While FreeBSD/x86_64 and OpenBSD/x86_64 are Tier 2, there is no reference to NetBSD. That means that somebody would have to build 'unofficial' GHC for the NetBSD platform.

  5. hasufell commented on May 8, 2025

    @hasufell
    Contributor

    OpenBSD documented under tier 2 seems a bit comical. I don't recall there ever being bindists.

  6. arrowd commented on May 8, 2025

    @arrowd
    Contributor

    NetBSD pkgsrc does have a port for GHC: https://github.com/NetBSD/pkgsrc/tree/trunk/lang/ghc94/
    I'd suggest approaching the maintainer of this port and ask him to create an additional Makefile target that'd produce a stack bindist, like it is done in FreeBSD Ports: https://github.com/freebsd/freebsd-ports/blob/a06b6f254a05bf49913b639efe826666f6618e61/lang/ghc/Makefile#L288
    Once you have an established way to produce bootstraps, just create a PR to this repository, as Mike explained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions