Project

Profile

Help

Bug #5860

closed

Self built python extension failure to link library

Added by O'Neil Delpratt almost 2 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Python Build
Start date:
2023-01-26
Due date:
% Done:

0%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
12.0
Fixed in version:
12.5
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

Reported by userL https://saxonica.plan.io/boards/4/topics/9261

There is a problem to self build the python library from the pypi directory.

Currently if we build the wheel with the command:

python3 setup.py bdist_wheel

or building the extension locallly:

python3 setup.py build_ext -if

It builds successfully (although user reported that they had to make changes in the setup file to locate the library). When we run a sample python script we get the following error:

Traceback (most recent call last):
  File "/Users/ond1/work/saxondev/build/temp/libsaxon-EEC-mac-x86_64-v12.0/pypi/samples/saxon_example.py", line 1, in <module>
    import saxoncee
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/saxoncee.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace (_addProcessorDataPair)
Actions #1

Updated by O'Neil Delpratt 6 months ago

  • Assignee changed from O'Neil Delpratt to Matt Patterson
Actions #2

Updated by Matt Patterson 5 months ago

  • Status changed from New to Resolved
  • Fixed in version set to 12.5

This has been addressed with improved build scripts in the saxon12 branch.

The hec_python_build_wheel task (or pec_... or eec_...) builds a wheel that does not have libsaxon bundled.

The hec_python_repair_wheel task takes the wheel from the previous task and runs the platform-appropriate utility on it to bundle libsaxon correctly.

(There's also an hec_python_install_wheel which takes the repaired wheel and installs it into the Venv for the current branch, but that seems less relevant here.)

Actions #3

Updated by O'Neil Delpratt 4 months ago

  • Status changed from Resolved to Closed

Bug fix applied in the Saxon 12.5 Maintenance release.

Please register to edit this issue

Also available in: Atom PDF