Changes required for > v0.14.0?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python, zig
- Domain
- build-system
Research direction
Start by reproducing the reported command with Zig 0.15.1 and target x86_64-linux-musl using the shown build.zig.zon and build.zig. Then inspect the dependency build.zig locations named in the errors, including the ConfigHeader and zlib integration sites. Done means the dependency builds and the example project completes zig build for that target.
Written by the indexing model from the issue text.
Description
I want to pull in this dependency in my project so my program can ingest python scripts and run them with some behaviour added. But just trying to get a basic version of this dependency pulled in on zig v0.15.1 doesn't work. Here is the basic and relevant examples:
build.zig.zon:
.{
.minimum_zig_version = "0.15.1",
.dependencies = .{
.cpython = .{
.url = "git+https://github.com/allyourcodebase/cpython.git#b9871b745dd11dd9b08e7ad1c8493403149a6f08",
.hash = "cpython-0.0.0-FN2rG3bEAQBfgfSVEVG1RkY4uwykTHwl6wM2gOD9xHMD",
},
},
}
build.zig:
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const cpython_dep = b.dependency("cpython", .{
.target = target,
.optimize = optimize,
});
const cpython_module = cpython_dep.module("cpython");
const exe = b.addExecutable(.{
.name = "testing",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
}),
});
exe.root_module.addImport("cpython", cpython_module);
b.installArtifact(exe);
}
the command im running and zig version:
ash@minty:~/git/personal/testing$ zig version
0.15.1
ash@minty:~/git/personal/testing$ zig build -Dtarget=x86_64-linux-musl
/home/ash/.cache/zig/p/cpython-0.0.0-FN2rG3bEAQBfgfSVEVG1RkY4uwykTHwl6wM2gOD9xHMD/build.zig:1238:22: error: no field named 'autoconf' in union 'Build.Step.ConfigHeader.Style'
.style = .{ .autoconf = upstream.path("pyconfig.h.in") },
^~~~~~~~
/usr/local/zig/lib/std/Build/Step/ConfigHeader.zig:7:19: note: union declared here
pub const Style = union(enum) {
^~~~~
referenced by:
build: /home/ash/.cache/zig/p/cpython-0.0.0-FN2rG3bEAQBfgfSVEVG1RkY4uwykTHwl6wM2gOD9xHMD/build.zig:96:42
runBuild__anon_76637: /usr/local/zig/lib/std/Build.zig:2215:44
10 reference(s) hidden; use '-freference-trace=12' to see all references
/home/ash/.cache/zig/p/zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h/build.zig:5:18: error: no field or member function named 'addStaticLibrary' in 'Build'
const lib = b.addStaticLibrary(.{
~^~~~~~~~~~~~~~~~~
/usr/local/zig/lib/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
/home/ash/.cache/zig/p/zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h/build.zig:5:18: note: method invocation only supports up to one level of implicit pointer dereferencing
/home/ash/.cache/zig/p/zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h/build.zig:5:18: note: use '.*' to dereference pointer
If this is something different and this is actually a me problem i apologise but would very much appreciate you pointing me in the right direction. I have not been able to figure this out and grok is suggesting is incompatibility with my zig version.
- Dominant language
- Zig
- Stars
- 19
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from allyourcodebase/cpython
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
allyourcodebase/cpython#17 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
allyourcodebase/cpython#10 · 1 reaction ·
All issues in allyourcodebase/cpython
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
agentic-workflows cascade-suspected
Difficulty 1/5 Under an hour Newbie friendliness 88/100