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 support #67

Open
iron-udjin opened this issue Sep 12, 2023 · 6 comments
Open

Add FreeBSD support #67

iron-udjin opened this issue Sep 12, 2023 · 6 comments

Comments

@iron-udjin
Copy link

Please add FreeBSD support. Currently it doesn't build under FreeBSD 13.2-RELEASE and zig-0.11:

$ zig build
zig build-lib xev Debug native: error: the following command failed with 1 compilation errors:
/usr/local/bin/zig build-lib /tmp/libxev/src/c_api.zig -lc --cache-dir /tmp/libxev/zig-cache --global-cache-dir /home/iron/.cache/zig --name xev -static --listen=- 
zig build-lib xev Debug native: error: the following command failed with 1 compilation errors:
/usr/local/bin/zig build-lib /tmp/libxev/src/c_api.zig --cache-dir /tmp/libxev/zig-cache --global-cache-dir /home/iron/.cache/zig --name xev -dynamic --listen=- 
Build Summary: 2/7 steps succeeded; 2 failed (disable with --summary none)
install transitive failure
├─ install xev transitive failure
│  └─ zig build-lib xev Debug native 1 errors
├─ zig build-lib xev Debug native (reused)
├─ install xev transitive failure
│  └─ zig build-lib xev Debug native 1 errors
└─ zig build-lib xev Debug native (reused)
src/main.zig:43:13: error: no default backend for this target
            @compileError("no default backend for this target");
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.zig:6:28: note: called from here
const xev = Backend.default().Api();
            ~~~~~~~~~~~~~~~^~

Compile Log Output:
@as(target.Target.Os, .{.tag = .freebsd, .version_range = .{ .semver = .{.min = .{ ... }, .max = .{ ... }} }})
src/main.zig:43:13: error: no default backend for this target
            @compileError("no default backend for this target");
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.zig:6:28: note: called from here
const xev = Backend.default().Api();
            ~~~~~~~~~~~~~~~^~

Compile Log Output:
@as(target.Target.Os, .{.tag = .freebsd, .version_range = .{ .semver = .{.min = .{ ... }, .max = .{ ... }} }})

$ zig version
0.11.0

Thank you!

@cryptocode
Copy link

I have a FreeBSD branch of libxev, which constituted most of the work of bringing Ghostty to FreeBSD 14.1.

It's mostly a matter of making the kqueue backend comptime configurable so the MachPort parts can be conditionally included.

I could shape that up for a PR, though a potential sticky point is the GH actions runner situation: actions/runner#385

Should the CI be sorted first? If not, let me know and I can make a PR and discuss from there.

@mitchellh
Copy link
Owner

I'm happy accepting a PR for libxev without tests. Just note that without automated tests it more likely future work will regress the behavior...

@Owl-Lord
Copy link

I have a FreeBSD branch of libxev, which constituted most of the work of bringing Ghostty to FreeBSD 14.1.

It's mostly a matter of making the kqueue backend comptime configurable so the MachPort parts can be conditionally included.

I could shape that up for a PR, though a potential sticky point is the GH actions runner situation: actions/runner#385

Should the CI be sorted first? If not, let me know and I can make a PR and discuss from there.

is there any news on this?

@cryptocode
Copy link

@Owl-Lord I decided not to PR because 1) I don't think it's a good idea until a CI solution for FreeBSD is established, and 2) when building Ghostty on various FreeBSD installations, sometimes there were linker errors (gtk related if I recall correctly) which needs more work.

I did however make Ghostty run on FreeBSD 14.1 and if someone wants to pick up where I left, there really aren't that many changes:

cryptocode@0c8d27a
cryptocode/ghostty@7aeadb0

This would minimally require a rebase + fixing the gtk linking issues that occur on some FreeBSD installations.

A potential CI workaround could be to employ https://github.com/vmactions/freebsd-vm

@Owl-Lord
Copy link

i think a friend of mine might be able to work with that.
saddly i dont know enough zig or am deep enough into the ports system to really do alot

@Owl-Lord
Copy link

Owl-Lord commented Jan 2, 2025

do you know of any place to search for people whod like to pick this up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants