Skip to content

Link against Python3::Module#925

Closed
paulgessinger wants to merge 1 commit into
AIDASoft:masterfrom
paulgessinger:python-module
Closed

Link against Python3::Module#925
paulgessinger wants to merge 1 commit into
AIDASoft:masterfrom
paulgessinger:python-module

Conversation

@paulgessinger

Copy link
Copy Markdown
Contributor

instead of Python3::Python, which according to the documentation is meant for embedding the python interpreter.

BEGINRELEASENOTES

  • Thank you for writing the text to appear in the release notes. It will show up
    exactly as it appears between the two bold lines
  • ...

ENDRELEASENOTES

instead of `Python3::Python`, which according to the documentation is
meant for embedding the python interpreter.
@jmcarcell

Copy link
Copy Markdown
Member

Maybe both?

@paulgessinger

paulgessinger commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

@jmcarcell Python3::Python hard-adds -lintl in the compiler flags and doesn't propagate correctly in spack, at least on macOS. That breaks the macOS build unfortunately. This change works locally for me on macOS, but clearly has issues in the linux builds. Seems like the spack build produces very different python libraries depending on the platform.

@tmadlener

Copy link
Copy Markdown
Collaborator

I think Python3::Python is correct. Otherwise we get missing symbols see here:

  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `_Py_Dealloc'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyObject_SetAttrString'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyCMethod_New'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyErr_SetString'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyObject_HasAttrString'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyInstanceMethod_New'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyErr_Clear'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `_PyObject_CallMethod_SizeT'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyExc_IndexError'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyObject_GetAttrString'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyUnicode_AsUTF8'
  /cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: src/libpodio.so: undefined reference to `PyErr_Occurred'

I get a similar error when trying with this on Ubuntu on top of a spack built python.

@paulgessinger

Copy link
Copy Markdown
Contributor Author

@jmcarcell @tmadlener From googling, I think the way this is supposed to work is to ignore unresolved symbols at compile time / link time, and let the runtime linker resolve them when python runs.

I'm investigating.

@tmadlener

Copy link
Copy Markdown
Collaborator

Closing this in favor of #928

@tmadlener tmadlener closed this Jan 19, 2026
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.

3 participants