Project

Profile

Help

Bug #5559

closed

Saxonc library failure on Macos M1 chips

Added by O'Neil Delpratt almost 2 years ago. Updated over 1 year ago.

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

100%

Estimated time:
Found in version:
11.3
Fixed in version:
12.0
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 almost 2 years 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.

Actions #2

Updated by O'Neil Delpratt over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 12.0

Bug issue fixed in SaxonC 12.0 as we have now moved to using Graalvm native-image.

Please register to edit this issue

Also available in: Atom PDF