bitwalker / bitwalker/picosat_elixir
Issue compiling using Burrito and Zig
- Dominant language
- C
- Stars
- 34
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I am trying to compile this project as it is part of the Elixir Ash library.
I am compiling it using Burrito which is using Zig (Mingw)
I have tried to make my own `.h` files that link to the files inside Zig but it is a never ending rabit hole as file x links to y and y to z and so on...
This is the output I get:
```
52.41 --> Going to recompile NIF for cross-build: picosat_elixir -> x86_64-windows
52.58 rm -f /app/deps/picosat_elixir/priv/lib/picosat_elixir/priv/picosat_nif.so
52.58 rm -f /app/deps/picosat_elixir/priv/*.o
52.58 zig cc -target x86_64-windows -O2 -dynamic -shared -Wl,-undefined=dynamic_lookup -std=c99 -finline-functions -Wall -O3 -DNDEBUG -fPIC -I /tmp/unpacked_erts_F32707FEA96460E8/otp-windows/erts-14.2.2/include -o /app/deps/picosat_elixir/priv/picosat.o -c /app/deps/picosat_elixir/c_src/picosat.c
52.60 /app/deps/picosat_elixir/c_src/picosat.c:2282:50: warning: variable 'count_resolved' set but not used [-Wunused-but-set-variable]
52.60 unsigned num_true, num_undef, num_false, size, count_resolved;
52.60 ^
52.61 /app/deps/picosat_elixir/c_src/picosat.c:5334:12: warning: variable 'collect' set but not used [-Wunused-but-set-variable]
52.61 unsigned collect, delta;
52.61 ^
52.61 /app/deps/picosat_elixir/c_src/picosat.c:6467:12: warning: variable 'num_non_false' set but not used [-Wunused-but-set-variable]
52.61 unsigned num_non_false;
52.61 ^
52.63 /app/deps/picosat_elixir/c_src/picosat.c:8149:10: fatal error: 'sys/resource.h' file not found
52.63 #include
52.63 ^~~~~~~~~~~~~~~~
52.63 3 warnings and 1 error generated.
52.63 make: *** [Makefile:49: /app/deps/picosat_elixir/priv/picosat.o] Error 1
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with c_src/picosat.c and Makefile, then reproduce the shown zig cc cross-build for x86_64-windows. Investigate the missing sys/resource.h reported by the compiler and verify completion by successfully compiling the NIF for that target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, elixir, zig
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100