Skip to content

Build libicsneo master (icspb/protobuf) in wheel builds#236

Merged
drebbe-intrepid merged 3 commits into
masterfrom
fix/libicsneo-master-icspb
Jul 8, 2026
Merged

Build libicsneo master (icspb/protobuf) in wheel builds#236
drebbe-intrepid merged 3 commits into
masterfrom
fix/libicsneo-master-icspb

Conversation

@drebbe-intrepid

@drebbe-intrepid drebbe-intrepid commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

libicsneo now permanently depends on icspb (protobuf), so python_ics's Linux/macOS wheel builds must build it. The previous attempt to bump the pin (#234 follow-up) failed CI with:

_deps/icspb-build/protos/: No such file or directory
make[3]: *** [_deps/icspb-build/protos/settings/manufacturing/v1/mfg_config.pb.h] Error 1

Root cause

protobuf v33's protobuf_generate() (used by icspb) declares the generated .pb.h/.pb.cc as custom-command outputs but never creates PROTOC_OUT_DIR — and protoc does not create its own output root. The Ninja generator pre-creates directories for declared outputs; Unix Makefiles (what build_libicsneo.py used by default) does not. A/B-verified in docker on the same libicsneo commit (4ed29b4): Makefiles reproduces the exact CI error, Ninja builds clean.

Changes

  • Bump LIBICSNEO_VERSION to current master 4ed29b4
  • Configure libicsneo with -G Ninja on Linux/macOS; add ninja to [build-system] requires so the binary is on the isolated build env's PATH in every cibuildwheel environment
  • Set ICSPB_BOOTSTRAP_DIR to a shared root outside the libicsneo build dir: icspb compiles protobuf from source at configure time, and the Linux job builds 5 Pythons × 2 archs with a git clean between each — sharing the bootstrap (it self-partitions by <system>-<processor>) means one protobuf compile per arch instead of ten. This matters most for aarch64 under QEMU.
  • macOS: pass CMAKE_OSX_ARCHITECTURES/CMAKE_OSX_DEPLOYMENT_TARGET as environment variables too — icspb's nested protobuf bootstrap is a separate execute_process cmake that inherits env but not -D cache entries, and would otherwise produce arm64-only static libs that break the universal2 link.

Verification

  • Docker A/B on 4ed29b4: Makefiles → exact CI failure; Ninja → icspb target builds.
  • Full local cibuildwheel --only cp312-manylinux_x86_64 run with these changes: wheel builds end-to-end; libicsneolegacy.so contains the icspb proto descriptors and protobuf runtime; wheel passes check-wheel-contents --ignore W009,W010.
  • macOS universal2 is exercised by this PR's CI.

ABI parity (updated)

The header sync landed upstream: the pin is now master 0dd8dbf, whose vendored icsnVC40.h is byte-identical to this repo's 3.26.3.9 header (verified). Linux/macOS wheels now match the Windows ABI — Galaxy2 1204, Comet3 918, Gigastar2 2400, GLOBAL_SETTINGS 2406.

🤖 Generated with Claude Code

drebbe-intrepid and others added 3 commits July 7, 2026 16:52
…trap

libicsneo now requires icspb, whose protobuf codegen breaks under the
default Unix Makefiles generator: protobuf v33's protobuf_generate()
never creates PROTOC_OUT_DIR and only Ninja pre-creates declared output
dirs, so protoc fails with '_deps/icspb-build/protos/: No such file or
directory' (reproduced and A/B-verified in docker on 4ed29b4).

- bump LIBICSNEO_VERSION to current master (4ed29b4)
- configure with -G Ninja on Linux/macOS; add ninja to build requires
- share ICSPB_BOOTSTRAP_DIR across cibuildwheel builds so protobuf
  compiles once per arch, not once per python (vital under QEMU aarch64)
- macOS: pass OSX arch/deployment target via environment so icspb's
  nested protobuf bootstrap builds universal2 instead of arm64-only

Verified locally: cp312-manylinux_x86_64 wheel builds end-to-end in
docker; libicsneolegacy.so links icspb descriptors; wheel passes
check-wheel-contents.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cibuildwheel deletes each python's isolated build env, but the macOS
libicsneo build dir is reused across pythons; CMake cached the previous
env's ninja path and cp311+ configures failed with 'no such file or
directory'. Reproduced the stale-cache mechanism in docker and verified
that passing -DCMAKE_MAKE_PROGRAM=<current ninja> at configure fixes the
reconfigure. (Ubuntu's failure in the same run was fail-fast collateral;
Windows 'failure' was a cancelled job with every step green.)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Upstream's vendored icsnVC40.h is now byte-identical to this repo's
(verified), closing the Linux/macOS ABI gap for the grown/new device
settings structs (Galaxy2 1204, Comet3 918, Gigastar2 2400,
GLOBAL_SETTINGS 2406).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@drebbe-intrepid drebbe-intrepid merged commit 45167e0 into master Jul 8, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant