Skip to content

[BUG] Installation fails on Apple Silicon (ARM) Mac — pyboolnet BNetToPrime binary incompatible #6

Open

Description

@eltonengkilde

Environment

  • macOS (Apple Silicon / ARM M-series chip)
  • Python 3.13 (Anaconda)
  • BoolDog 0.1.0 installed via pip

Problem
BoolDog cannot be used on Apple Silicon Macs because pyboolnet ships
an Intel-only binary (BNetToPrime_mac64) that crashes immediately with:

OSError: [Errno 86] Bad CPU type in executable:
'.../pyboolnet/binaries/mac64/BNetToPrime/BNetToPrime_mac64'

This error is raised as soon as any BoolDogModel is instantiated,
making the package completely unusable on ARM hardware.

Steps to reproduce
pip install booldog

Then in Python:
import booldog
nodes = [booldog.classes.BoolDogNode(identifier='A', rule='B'),
booldog.classes.BoolDogNode(identifier='B', rule='A')]
m = booldog.BoolDogModel(nodes) # crashes here

Expected behaviour
Model instantiation should work on Apple Silicon.

Possible fix
pyboolnet would need to ship an ARM-native binary for BNetToPrime,
or BoolDog could document a workaround (e.g. running under Rosetta 2,
or using a Linux/Docker environment).

Apple Silicon Macs are now the standard hardware for Mac users,
so this affects a large portion of the potential user base. Do you have any other idea of how to work around this problem?

Activity

  1. carissableker commented on May 13, 2026

    @carissableker
    Member

    Hi @eltonengkilde, thanks for your report!

    This is not something I want to fix in BoolDog, but should be fixed in pyboolnet itself, ideally by compiling new binaries. I unfortunately don't have access to a Mac to develop or test workarounds (even just for documentation). I'll raise the issue upstream at pyboolnet (unless you'd like to?).

    A Docker image is a good idea, though, and I can work on that.

    In the meantime, you can use BoolDog in Google Colab (example).

  2. carissableker commented on May 13, 2026

    @carissableker
    Member

    TODO - make a note in Known installation issues

  3. carissableker commented on Jul 6, 2026

    @carissableker
    Member

    Update after digging into this on the pyboolnet side (carissableker/pyboolnet, tracking hklarner/pyboolnet#126):

    I added CI for pyboolnet running on macos-latest (which is Apple Silicon on GitHub Actions), and the exact scenario from this issue (instantiating a BoolDogModel, which calls BNetToPrime under the hood) does not reproduce there. It runs successfully in both pyboolnet's own test suite and in BoolDog's own CI on the same runner type.

    To find out why, I added a diagnostic step that checks for Rosetta 2 directly (run log). Rosetta 2 is confirmed present and working on the GitHub-hosted macOS runner:

    --- native arch ---
    arm64
    --- oahd translation daemon (modern check) ---
    457 /usr/libexec/rosetta/oahd
    --- rosetta runtime present ---
    ... /Library/Apple/usr/libexec/oah/libRosettaRuntime ...
    --- direct test: actually run something under x86_64 ---
    x86_64 execution via Rosetta: OK
    

    Since BNetToPrime_mac64 is an Intel binary, I think you are correct that using Rosetta 2 is a work around.

    I've added a note to BoolDog's Known installation issues docs.

  4. added a commit that references this issue on Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwaitingWaiting on another (upstream) issue or update

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions