Skip to content

FreeBSD support? #1524

Closed
Closed

Description

@lorenbrichter

What platform is your computer?

FreeBSD

How did you attempt to install or upgrade?

Tried to install bun on a https://www.nearlyfreespeech.net server, which I now realize is running FreeBSD. Unfortunately it looks like bun only supports Linux.

What do you see instead?

ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2
Abort trap

Additional information

No response

Activity

  1. yonas commented on Feb 25, 2023

    @yonas

    FreeBSD support would be great.

  2. Dmitry-N-Medvedev commented on Aug 27, 2023

    @Dmitry-N-Medvedev

    I do also vote for FreeBSD support :)

  3. masterflitzer commented on Sep 11, 2023

    @masterflitzer

    yes i'd love to see bun supporting freebsd

  4. sermuns commented on Sep 13, 2023

    @sermuns

    Me too!

  5. jansc commented on Sep 21, 2023

    @jansc

    FreeBSD-support would be great!

  6. Vringe commented on Apr 15, 2024

    @Vringe

    Would love to see that too. hostpoint (big player in switzerland) runs entirely on FreeBSD.

  7. zigster64 commented on Jun 8, 2024

    @zigster64

    MeeToo

    Latest Zig 0.13 has an official FreeBSD release now (last active one was 0.11) ... so it should be 1 step easier

    Will have a look at whats involved in building bun from source, and adding a precompiled bun to bsd's pkg / ports

  8. mfechner commented on Sep 25, 2024

    @mfechner

    I see that zig 0.12.1 is available as a FreeBSD package.
    If someone want to help, we can prepare a new port and I can commit it into the FreeBSD ports repository.

  9. mfechner commented on Sep 28, 2024

    @mfechner

    I currently work on making zig 0.13.0 available:
    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279604

    after the mainainer accepted my PR, I will commit it.

    But if I try to compile bun on FreeBSD I just see:

    cmake .
    -- Configuring Bun
    -- Set CMAKE_VERSION: 3.30.3
    -- Set CMAKE_COMMAND: /usr/local/bin/cmake
    -- Set CMAKE_HOST_SYSTEM_NAME: FreeBSD
    -- Set CMAKE_HOST_SYSTEM_PROCESSOR: amd64
    CMake Error at cmake/Globals.cmake:77 (message):
      Unsupported CMAKE_HOST_SYSTEM_NAME: "FreeBSD"
    Call Stack (most recent call first):
      cmake/Globals.cmake:99 (unsupported)
      CMakeLists.txt:13 (include)
    
    
    -- Configuring incomplete, errors occurred!
    

    so there is maybe some additional work from the bun repository required.

    Can anyone help here?

  10. lin72h commented on Sep 29, 2024

    @lin72h

    I currently work on making zig 0.13.0 available: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279604

    after the mainainer accepted my PR, I will commit it.

    But if I try to compile bun on FreeBSD I just see:

    cmake .
    -- Configuring Bun
    -- Set CMAKE_VERSION: 3.30.3
    -- Set CMAKE_COMMAND: /usr/local/bin/cmake
    -- Set CMAKE_HOST_SYSTEM_NAME: FreeBSD
    -- Set CMAKE_HOST_SYSTEM_PROCESSOR: amd64
    CMake Error at cmake/Globals.cmake:77 (message):
      Unsupported CMAKE_HOST_SYSTEM_NAME: "FreeBSD"
    Call Stack (most recent call first):
      cmake/Globals.cmake:99 (unsupported)
      CMakeLists.txt:13 (include)
    

    looks like it's just "ifdef" guard against all the BSD systems

  11. added
    enhancementNew feature or request
    and removed
    bugSomething isn't working
    on Oct 1, 2024
  12. mfechner commented on Oct 31, 2024

    @mfechner

    Is there any interest here that the project team help to remove these "ifdefs" so I can test a build?
    It can also be a specific branch or a patch I can apply on top of a released version.

  13. DoctorRyner commented on Jan 19, 2025

    @DoctorRyner

    @mfechner did you try anything yet?

  14. 22 remaining items

  15. bluegod commented on Mar 31, 2026

    @bluegod

    any updates on this?

  16. akripo commented on Apr 1, 2026

    @akripo

    Since you already support Linux should not be that hard to make it run on FreeBSD🙏

  17. chiefMarlin commented on Apr 12, 2026

    @chiefMarlin

    I got Bun building and running on FreeBSD 15 amd64, based on @lwhsu's claude/freebsd-support branch with ~150 lines of additional patches. Build script and patches here: https://github.com/8ff/bun-freebsd

  18. UnitedMarsupials commented on Apr 15, 2026

    @UnitedMarsupials

    I got Bun building and running on FreeBSD 15 amd64, based on @lwhsu's claude/freebsd-support branch with ~150 lines of additional patches. Build script and patches here: https://github.com/8ff/bun-freebsd

    Great, thank you! Can you add a proper port now?

  19. chiefMarlin commented on Apr 15, 2026

    @chiefMarlin

    I got Bun building and running on FreeBSD 15 amd64, based on @lwhsu's claude/freebsd-support branch with ~150 lines of additional patches. Build script and patches here: https://github.com/8ff/bun-freebsd

    Great, thank you! Can you add a proper port now?

    A proper port is definitely the end goal, but it's a bit early - these patches still need to be reviewed and merged upstream first. Once Bun has official or semi-official FreeBSD support baked in, a port would make a lot more sense.

  20. yonas commented on Apr 15, 2026

    @yonas

    A proper port is definitely the end goal, but it's a bit early - these patches still need to be reviewed and merged upstream first. Once Bun has official or semi-official FreeBSD support baked in, a port would make a lot more sense.

    Or we can just put the patches in the port for now and remove them when they're upstreamed, which is what FreeBSD ports usually do.

  21. chiefMarlin commented on Apr 16, 2026

    @chiefMarlin

    A proper port is definitely the end goal, but it's a bit early - these patches still need to be reviewed and merged upstream first. Once Bun has official or semi-official FreeBSD support baked in, a port would make a lot more sense.

    Or we can just put the patches in the port for now and remove them when they're upstreamed, which is what FreeBSD ports usually do.

    I will look into this

  22. sgharms commented on Apr 16, 2026

    @sgharms

    Here for the bun on FreeBSD!

  23. dch commented on Apr 16, 2026

    @dch

    FreeBSD ports tree could have e.g. www/bun-devel with local patches if somebody wants to have a crack at this. I think both @lwhsu and @dch will be happy to help shepherd this in.

  24. added a commit that references this issue on Apr 26, 2026
    2ee9cad
  25. added a commit that references this issue on May 14, 2026
    da3ac1a
  26. xpader commented on Jun 7, 2026

    @xpader

    Still doesn't support ffi on freebsd.

  27. schmitmd commented on Jun 11, 2026

    @schmitmd
    1. The shell script at https://bun.sh/install has not been updated to detect and work correctly with FreeBSD.
    2. The main README has not had any additions to mention that FreeBSD is now an official platform, nor how to build for it.
    3. edit: this last one was my fault, I should've read the cpu requirements

    As far as I can tell, the x64 zipfiles in https://github.com/oven-sh/bun/releases/tag/bun-v1.3.14 were not built with the correct architecture mappings; I get illegal hardware instruction when trying to run the bun binary inside each of them on a standard x86_64 Intel Xeon CPU. 😕

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions