-
Notifications
You must be signed in to change notification settings - Fork 50
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
local_zig still downloads from upstream #241
Comments
aw crap. I'm so sorry. I think what is happening is that I disabled implicit libc and zig doesn't currently have an obvious way to load the libc headers without loading libc. ziglang/zig#7687 and if I'm not mistaken freebsd requires libc on account of it being the official OS syscall entry point (*bsd does not guarantee kernel syscall stability). Do you have any suggestions on how to set up freebsd CI pipelines? I want this to not be a problem moving forward. |
can you try including |
per chat, that doesn't seem to help either - it does add this to the generated defmodule Ziggle do
use Zig,
system_include_dirs: ["/usr/include", "/usr/lib/include"],
link_libc: true
...
lib.linkSystemLibrary("c");
lib.addSystemIncludeDir("/usr/include");
lib.addSystemIncludeDir("/usr/lib/include"); and shows
|
Reporting the same issue here - will try to fix on my system and post an update if I get it working. defmodule LiveCounter.Count do
use GenServer
use Zig, local_zig: true, link_libc: true
error
(file paths shortened above for brevity) |
odd finding : in lib/zig/command.ex. line 18 def compile(compiler, zig_tree) do
zig_executable = if compiler.module_spec.local_zig do
Logger.debug("Using local zig")
System.find_exectuable("zig")
else
Logger.debug("Not using local zig")
... Regardless of the setting of local_zig in my app code, the variable isnt getting set by the time it gets to compiler.ex If I force hack the code to use the system zig, that does seem to work. Just leaves the weird include errors - having a look at that now |
OK - in lib/zig/builder.ex, which I think has the template for generating the build.zig file I changed the target definition from to a generic And now it compiles without all the include errors. No idea if this is a fix - Im just hacking, so treat with caution :) ... a few moments later : |
this should be resolved now in d1afc54 (note this is currently in devel and will be merged as part of 0.8.1 release) |
I did a minimal zigler nif https://git.sr.ht/~dch/ziggle using hex published 0.7.2 & zig 0.7.1 & also tried latest master.
Any suggestions?
Using a full local zig with the same hack as last time:
which is ... equally bad
The text was updated successfully, but these errors were encountered: