Project

Profile

Help

Bug #5559

open

Saxonc library failure on Macos M1 chips

Added by O'Neil Delpratt about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Category:
Documentation
Start date:
2022-06-11
Due date:
% Done:

0%

Estimated time:
Found in version:
11.3
Fixed in version:
Platforms:

Description

Reported by user on stackoverflow see: https://stackoverflow.com/questions/72569354/saxonc-python-extension-issue-with-macos

The SaxonC dylib library which is generated by Excelsior Jet fails on an M1 chip architecture.

The following error message occurs when I run the C++ samples:

Unable to load /Users/ond1/libsaxon-HEC-11.3/libsaxonhec.dylib
Error: : Undefined error: 0
Actions #1

Updated by O'Neil Delpratt about 2 months ago

  • Category changed from Mac Os X to Documentation

The Saxon/C library (i.e. libsaxonhec.dylib) is built using Excelsior Jet for a x86_64 MacOS machine. Users of SaxonC on these machines will encounter execution problems for the samples, command and Python/PHP extensions because they are building the executable for an arm64 machine.

The workaround is to run the build scripts with the arch -x86_64 command as prefix. See example below for SaxonC commands:

arch -x86_64 ./build64-mac.sh

When building the SaxonC python extension the following should work:

arch -x86_64 python3 saxon-setup.py build_ext -if

Unfortunately python3 needs to be run as x86_64:

arch -x86_64 python3 saxon_example3.py

It is unlikely that that this problem will be fixed on the SaxonC 11 branch. We will add a note in the documentation.

Please register to edit this issue

Also available in: Atom PDF