-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
incorrect "error: dependency loop detected" #16419
Comments
Looks like the same report as done in #14353. In your case, Yesterday, I had the same dependency loop compilation problem for some C-imported header file which was doing a similar thing from a translated |
Implement audio playback, hopefully motivation is self explanatory The audio landscape is vast in linux, we have alsa, pulse, jack, pipewire and alsa, pulse, jack interfaces into pipewire, alsa interfaces into pulse, etc. Instead of trying to deal with this ourselves, pull in an audio lib to deal with it for us Just skimming online, miniaudio fits well. PortAudio and libsoundio also seem to both be good candidates. No strong reasoning went into this choice, the single header impl of miniaudio felt easy to work with. We were tricked though, with the default miniaudio impl we hit a zig compiler bug that triggers circular dependencies. Something about using a struct pointer in a function pointer stored by the struct, see ziglang/zig#18247 (comment) Patch miniaudio to just use void pointers instead, this doesn't seem to have any negative effects Add an audio player abstraction that just injects a sin wave for now, add test binary to try it Potentially related issues... ziglang/zig#12325 ziglang/zig#16419
Implement audio playback, hopefully motivation is self explanatory The audio landscape is vast in linux, we have alsa, pulse, jack, pipewire and alsa, pulse, jack interfaces into pipewire, alsa interfaces into pulse, etc. Instead of trying to deal with this ourselves, pull in an audio lib to deal with it for us Just skimming online, miniaudio fits well. PortAudio and libsoundio also seem to both be good candidates. No strong reasoning went into this choice, the single header impl of miniaudio felt easy to work with. We were tricked though, with the default miniaudio impl we hit a zig compiler bug that triggers circular dependencies. Something about using a struct pointer in a function pointer stored by the struct, see ziglang/zig#18247 (comment) Patch miniaudio to just use void pointers instead, this doesn't seem to have any negative effects Add an audio player abstraction that just injects a sin wave for now, add test binary to try it Potentially related issues... ziglang/zig#12325 ziglang/zig#16419 ziglang/zig#19392
Implement audio playback, hopefully motivation is self explanatory The audio landscape is vast in linux, we have alsa, pulse, jack, pipewire and alsa, pulse, jack interfaces into pipewire, alsa interfaces into pulse, etc. Instead of trying to deal with this ourselves, pull in an audio lib to deal with it for us Just skimming online, miniaudio fits well. PortAudio and libsoundio also seem to both be good candidates. No strong reasoning went into this choice, the single header impl of miniaudio felt easy to work with. We were tricked though, with the default miniaudio impl we hit a zig compiler bug that triggers circular dependencies. Something about using a struct pointer in a function pointer stored by the struct, see ziglang/zig#18247 (comment) Patch miniaudio to just use void pointers instead, this doesn't seem to have any negative effects Extract audio frames from ffmepg, and feed them into our audio subsystem. Not a ton to say here, everything is just using the APIs provided by miniaudio and ffmpeg Replace test video with a 20s segment of big buck bunny Potentially related issues... ziglang/zig#12325 ziglang/zig#16419 ziglang/zig#19392
Same happens for libuv, dependency loop detected for const ConnectionCb = *const fn (server: *c.uv_stream_t, status: i32) void;
pub fn init(loop: Loop) Tcp {
var handle: c.uv_tcp_t = undefined;
c.uv_tcp_init(loop.loop, &handle);
return .{ .handle = handle, .addr = .{} };
}
pub fn listen(self: Tcp, addr: []const u8, port: i32, backlog: usize, cb: ConnectionCb) !void {
c.uv_ip4_addr(addr, port, &self.addr);
c.uv_tcp_bind(&self.handle, @bitCast(addr), 0);
const result = c.uv_listen(@alignCast(self.handle), backlog, cb);
try errors.translate(result);
} |
Zig Version
0.11.0-dev.3952+82a9d5d78
Steps to Reproduce and Observed Behavior
The following code refuses to compile on 0.11.0-dev.3952+82a9d5d78 but compiles just fine on Godbolt on 0.10.0. So, the dependency loop error if presumably false.
Expected Behavior
Expected to compile.
The text was updated successfully, but these errors were encountered: