3
7
Fork
You've already forked channel
0

Build failure on FreeBSD #13

Closed
opened 2026年06月12日 06:57:46 +02:00 by atomkarinca · 3 comments

I tried to build channel on FreeBSD and got this error:

install
└─ install channel
 └─ compile exe channel Debug native 1 errors
src/main.zig:177:32: error: expected type '[]c.pollfd__struct_24834', found '*[2]os.linux.pollfd'
 _ = try std.posix.poll(&pollfds, -1);
 ^~~~~~~~
src/main.zig:177:32: note: pointer type child 'os.linux.pollfd' cannot cast into pointer type child 'c.pollfd__struct_24834'
/usr/local/lib/zig/std/os/linux.zig:7427:27: note: struct declared here
pub const pollfd = extern struct {
 ~~~~~~~^~~~~~
/usr/local/lib/zig/std/c.zig:4306:20: note: struct declared here
 else => extern struct {
 ~~~~~~~^~~~~~
/usr/local/lib/zig/std/posix.zig:1003:18: note: parameter type declared here
pub fn poll(fds: []pollfd, timeout: i32) PollError!usize {
 ^~~~~~~~
referenced by:
 callMain [inlined]: /usr/local/lib/zig/std/start.zig:737:30
 callMainWithArgs [inlined]: /usr/local/lib/zig/std/start.zig:638:20
 main: /usr/local/lib/zig/std/start.zig:663:28
 1 reference(s) hidden; use '-freference-trace=4' to see all references
error: 1 compilation errors
failed command: /usr/local/bin/zig build-exe -I/usr/local/include -L/usr/local/lib -lxkbcommon -ODebug --dep wayland --dep tributary --dep c -Mroot=/home/atom/soft/channel/src/main.zig -I/usr/local/include -I/usr/local/include/libepoll-shim -L/usr/local/lib -lwayland-client -lm -ODebug -Mwayland=.zig-cache/o/cceb8e95059809b64c7f8107e296df5e/wayland.zig -ODebug --dep options --dep wayland -Mtributary=/home/atom/soft/channel/zig-pkg/tributary-0.2.0-tqCfWzeVAACK6V4N7B3kCRvYV8Q1YUWzN_71dgisbvdt/src/root.zig -I/usr/local/include -ODebug -Mc=.zig-cache/o/1857904c3456a65996fd1a96bde223dd/c_headers.zig -Moptions=.zig-cache/c/b5c8484f73495c7c4aa2d625b0e70dcf/options.zig -lc --cache-dir .zig-cache --global-cache-dir /home/atom/.cache/zig --name channel --zig-lib-dir /usr/local/lib/zig/ --listen=-
Build Summary: 4/7 steps succeeded (1 failed)
install transitive failure
└─ install channel transitive failure
 └─ compile exe channel Debug native 1 errors
error: the following build command failed with exit code 1:
.zig-cache/o/394383837cbe23dd91d643c8bae23891/build /usr/local/bin/zig /usr/local/lib/zig /home/atom/soft/channel .zig-cache /home/atom/.cache/zig --seed 0x2a29288d -Z1499a456fbbc3dd7

I'm on FreeBSD 15.0 latest repository. Zig version on this repository is 0.16.0 and my cpu is amd64.

I tried to build channel on FreeBSD and got this error: ``` install └─ install channel └─ compile exe channel Debug native 1 errors src/main.zig:177:32: error: expected type '[]c.pollfd__struct_24834', found '*[2]os.linux.pollfd' _ = try std.posix.poll(&pollfds, -1); ^~~~~~~~ src/main.zig:177:32: note: pointer type child 'os.linux.pollfd' cannot cast into pointer type child 'c.pollfd__struct_24834' /usr/local/lib/zig/std/os/linux.zig:7427:27: note: struct declared here pub const pollfd = extern struct { ~~~~~~~^~~~~~ /usr/local/lib/zig/std/c.zig:4306:20: note: struct declared here else => extern struct { ~~~~~~~^~~~~~ /usr/local/lib/zig/std/posix.zig:1003:18: note: parameter type declared here pub fn poll(fds: []pollfd, timeout: i32) PollError!usize { ^~~~~~~~ referenced by: callMain [inlined]: /usr/local/lib/zig/std/start.zig:737:30 callMainWithArgs [inlined]: /usr/local/lib/zig/std/start.zig:638:20 main: /usr/local/lib/zig/std/start.zig:663:28 1 reference(s) hidden; use '-freference-trace=4' to see all references error: 1 compilation errors failed command: /usr/local/bin/zig build-exe -I/usr/local/include -L/usr/local/lib -lxkbcommon -ODebug --dep wayland --dep tributary --dep c -Mroot=/home/atom/soft/channel/src/main.zig -I/usr/local/include -I/usr/local/include/libepoll-shim -L/usr/local/lib -lwayland-client -lm -ODebug -Mwayland=.zig-cache/o/cceb8e95059809b64c7f8107e296df5e/wayland.zig -ODebug --dep options --dep wayland -Mtributary=/home/atom/soft/channel/zig-pkg/tributary-0.2.0-tqCfWzeVAACK6V4N7B3kCRvYV8Q1YUWzN_71dgisbvdt/src/root.zig -I/usr/local/include -ODebug -Mc=.zig-cache/o/1857904c3456a65996fd1a96bde223dd/c_headers.zig -Moptions=.zig-cache/c/b5c8484f73495c7c4aa2d625b0e70dcf/options.zig -lc --cache-dir .zig-cache --global-cache-dir /home/atom/.cache/zig --name channel --zig-lib-dir /usr/local/lib/zig/ --listen=- Build Summary: 4/7 steps succeeded (1 failed) install transitive failure └─ install channel transitive failure └─ compile exe channel Debug native 1 errors error: the following build command failed with exit code 1: .zig-cache/o/394383837cbe23dd91d643c8bae23891/build /usr/local/bin/zig /usr/local/lib/zig /home/atom/soft/channel .zig-cache /home/atom/.cache/zig --seed 0x2a29288d -Z1499a456fbbc3dd7 ``` I'm on FreeBSD 15.0 latest repository. Zig version on this repository is 0.16.0 and my cpu is amd64.

I hadn't though about supporting freebsd so far.
7844f81a45 should be an improvement but I still include a linux header.
not sure if freebsd has some sort of shim for this or how this works exactly.

I hadn't though about supporting freebsd so far. 7844f81a456e6913f1b1bbd574acf276d0f21731 should be an improvement but I still include a linux header. not sure if freebsd has some sort of shim for this or how this works exactly.

it seems that freebsd does have evdev headers :D
it might actually work now

it seems that freebsd does have evdev headers :D it might actually work now

it built successfully now, thanks a lot, that was really fast. you can add freebsd to supported platform now, i guess :)

it built successfully now, thanks a lot, that was really fast. you can add freebsd to supported platform now, i guess :)
Sign in to join this conversation.
No Branch/Tag specified
main
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
0.2.1
0.2
0.2.0
0.1.1
0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Sivecano/channel#13
Reference in a new issue
Sivecano/channel
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?