Python bindings fail to link with Python 3.8+
Undefined symbols for architecture x86_64:
"_PyBool_Type", referenced from:
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyBytes_AsString", referenced from:
_xmlPythonFileReadRaw in libxml.o
_xmlPythonFileRead in libxml.o
_PystringSet_Convert in libxml.o
"_PyBytes_Size", referenced from:
_xmlPythonFileReadRaw in libxml.o
_xmlPythonFileRead in libxml.o
"_PyCallable_Check", referenced from:
_libxml_xmlSetEntityLoader in libxml.o
_libxml_xmlRegisterInputCallback in libxml.o
"_PyCapsule_GetName", referenced from:
_libxml_getObjDesc in libxml.o
"_PyCapsule_GetPointer", referenced from:
_libxml_getObjDesc in libxml.o
_libxml_xmlXPathDestructNsNode in types.o
"_PyCapsule_New", referenced from:
_libxml_xmlDocPtrWrap in types.o
_libxml_xmlNodePtrWrap in types.o
_libxml_xmlURIPtrWrap in types.o
_libxml_xmlNsPtrWrap in types.o
_libxml_xmlAttrPtrWrap in types.o
_libxml_xmlAttributePtrWrap in types.o
_libxml_xmlElementPtrWrap in types.o
...
"_PyCapsule_Type", referenced from:
_libxml_xmlFreeTextReader in libxml.o
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyDict_New", referenced from:
_pythonStartElement in libxml.o
"_PyDict_SetItem", referenced from:
_pythonStartElement in libxml.o
"_PyErr_NoMemory", referenced from:
_libxml_xmlRegisterInputCallback in libxml.o
"_PyErr_Occurred", referenced from:
_pythonInternalSubset in libxml.o
_pythonEntityDecl in libxml.o
_pythonNotationDecl in libxml.o
_pythonAttributeDecl in libxml.o
_pythonElementDecl in libxml.o
_pythonUnparsedEntityDecl in libxml.o
_pythonStartDocument in libxml.o
...
"_PyErr_Print", referenced from:
_libxml_xmlSchemaValidityErrorFunc in libxml.o
_libxml_xmlSchemaValidityWarningFunc in libxml.o
_pythonInternalSubset in libxml.o
_pythonEntityDecl in libxml.o
_pythonNotationDecl in libxml.o
_pythonAttributeDecl in libxml.o
_pythonElementDecl in libxml.o
...
"_PyErr_SetString", referenced from:
_libxml_xmlSetEntityLoader in libxml.o
_libxml_xmlRegisterInputCallback in libxml.o
_libxml_xmlUnregisterInputCallback in libxml.o
_libxml_C14NDocDumpMemory in libxml.o
_libxml_C14NDocSaveTo in libxml.o
_PyxmlNodeSet_Convert in libxml.o
_PystringSet_Convert in libxml.o
...
"_PyEval_CallMethod", referenced from:
_xmlPythonFileReadRaw in libxml.o
_xmlPythonFileCloseRaw in libxml.o
_xmlPythonFileWrite in libxml.o
_xmlPythonFileClose in libxml.o
_xmlPythonFileRead in libxml.o
"_PyEval_CallObjectWithKeywords", referenced from:
_libxml_xmlSchemaValidityErrorFunc in libxml.o
_libxml_xmlSchemaValidityWarningFunc in libxml.o
_libxml_xmlErrorFuncHandler in libxml.o
_libxml_xmlXPathFuncCallback in libxml.o
_libxml_xmlValidCtxtErrorFuncHandler in libxml.o
_libxml_xmlValidCtxtWarningFuncHandler in libxml.o
_libxml_xmlParserCtxtGenericErrorFuncHandler in libxml.o
...
"_PyExc_AssertionError", referenced from:
_libxml_xmlUnregisterInputCallback in libxml.o
"_PyExc_Exception", referenced from:
_libxml_C14NDocDumpMemory in libxml.o
_libxml_C14NDocSaveTo in libxml.o
"_PyExc_IndexError", referenced from:
_libxml_xmlUnregisterInputCallback in libxml.o
"_PyExc_MemoryError", referenced from:
_PyxmlNodeSet_Convert in libxml.o
_PystringSet_Convert in libxml.o
"_PyExc_TypeError", referenced from:
_libxml_C14NDocDumpMemory in libxml.o
_libxml_C14NDocSaveTo in libxml.o
_PyxmlNodeSet_Convert in libxml.o
_PystringSet_Convert in libxml.o
"_PyExc_ValueError", referenced from:
_libxml_xmlSetEntityLoader in libxml.o
_libxml_xmlRegisterInputCallback in libxml.o
"_PyFloat_FromDouble", referenced from:
_libxml_doubleWrap in types.o
_libxml_xmlXPathObjectPtrWrap in types.o
"_PyFloat_Type", referenced from:
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyList_GetItem", referenced from:
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyList_New", referenced from:
_pythonAttributeDecl in libxml.o
_libxml_xmlXPathObjectPtrWrap in types.o
"_PyList_SetItem", referenced from:
_pythonAttributeDecl in libxml.o
_libxml_xmlXPathObjectPtrWrap in types.o
"_PyList_Size", referenced from:
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyLong_AsLong", referenced from:
_xmlPythonFileWrite in libxml.o
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyLong_FromLong", referenced from:
_libxml_xmlSetEntityLoader in libxml.o
_libxml_saveNodeTo in libxml.o
_libxml_C14NDocSaveTo in libxml.o
_libxml_intWrap in types.o
_libxml_longWrap in types.o
_libxml_xmlXPathObjectPtrWrap in types.o
"_PyLong_FromVoidPtr", referenced from:
_libxml_nodeHash in libxml.o
"_PyModule_Create2", referenced from:
_PyInit_libxml2mod in libxml.o
"_PyObject_AsFileDescriptor", referenced from:
_libxml_PyFileGet in types.o
"_PyObject_GetAttrString", referenced from:
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyObject_HasAttrString", referenced from:
_pythonExternalEntityLoader in libxml.o
_xmlPythonFileWrite in libxml.o
_xmlPythonFileClose in libxml.o
_pythonInternalSubset in libxml.o
_pythonEntityDecl in libxml.o
_pythonNotationDecl in libxml.o
_pythonAttributeDecl in libxml.o
...
"_PyTuple_New", referenced from:
_libxml_xmlSchemaValidityErrorFunc in libxml.o
_libxml_xmlSchemaValidityWarningFunc in libxml.o
_libxml_xmlErrorFuncHandler in libxml.o
_libxml_xmlXPathFuncCallback in libxml.o
_libxml_xmlParserCtxtGetErrorHandler in libxml.o
_libxml_xmlTextReaderGetErrorHandler in libxml.o
_libxml_xmlValidCtxtErrorFuncHandler in libxml.o
...
"_PyTuple_SetItem", referenced from:
_libxml_xmlSchemaValidityErrorFunc in libxml.o
_libxml_xmlSchemaValidityWarningFunc in libxml.o
_libxml_xmlErrorFuncHandler in libxml.o
_libxml_xmlXPathFuncCallback in libxml.o
_libxml_xmlParserCtxtGetErrorHandler in libxml.o
_libxml_xmlTextReaderGetErrorHandler in libxml.o
_libxml_xmlValidCtxtErrorFuncHandler in libxml.o
...
"_PyType_IsSubtype", referenced from:
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyUnicode_AsUTF8AndSize", referenced from:
_xmlPythonFileReadRaw in libxml.o
_xmlPythonFileRead in libxml.o
_libxml_xmlXPathObjectPtrConvert in types.o
"_PyUnicode_FromString", referenced from:
_pythonAttributeDecl in libxml.o
_pythonStartElement in libxml.o
_libxml_charPtrWrap in types.o
_libxml_charPtrConstWrap in types.o
_libxml_xmlCharPtrWrap in types.o
_libxml_xmlCharPtrConstWrap in types.o
_libxml_constcharPtrWrap in types.o
...
"_PyUnicode_FromStringAndSize", referenced from:
_xmlPythonFileWrite in libxml.o
_libxml_C14NDocDumpMemory in libxml.o
"__PyArg_ParseTuple_SizeT", referenced from:
_libxml_xmlDebugMemory in libxml.o
_libxml_xmlCreateOutputBuffer in libxml.o
_libxml_xmlCreateInputBuffer in libxml.o
_libxml_xmlSetEntityLoader in libxml.o
_libxml_xmlRegisterInputCallback in libxml.o
_libxml_xmlCreatePushParser in libxml.o
_libxml_htmlCreatePushParser in libxml.o
...
"__PyObject_CallFunction_SizeT", referenced from:
_pythonExternalEntityLoader in libxml.o
_pythonInputOpenCallback in libxml.o
"__PyObject_CallMethod_SizeT", referenced from:
_pythonInternalSubset in libxml.o
_pythonEntityDecl in libxml.o
_pythonNotationDecl in libxml.o
_pythonAttributeDecl in libxml.o
_pythonElementDecl in libxml.o
_pythonUnparsedEntityDecl in libxml.o
_pythonStartDocument in libxml.o
...
"__Py_BuildValue_SizeT", referenced from:
_libxml_getObjDesc in libxml.o
_libxml_compareNodesEqual in libxml.o
"__Py_Dealloc", referenced from:
_libxml_xmlSetEntityLoader in libxml.o
_pythonExternalEntityLoader in libxml.o
_pythonInputOpenCallback in libxml.o
_xmlPythonFileReadRaw in libxml.o
_xmlPythonFileCloseRaw in libxml.o
_libxml_xmlUnregisterInputCallback in libxml.o
_libxml_xmlRegisterXPathFunction in libxml.o
...
"__Py_NoneStruct", referenced from:
_libxml_xmlPythonCleanupParser in libxml.o
_libxml_xmlDumpMemory in libxml.o
_libxml_xmlRegisterInputCallback in libxml.o
_pythonInputOpenCallback in libxml.o
_libxml_xmlUnregisterInputCallback in libxml.o
_libxml_xmlCreatePushParser in libxml.o
_libxml_htmlCreatePushParser in libxml.o
...
"__Py_TrueStruct", referenced from:
_libxml_xmlXPathObjectPtrConvert in types.o
The reason is that -lpython3.8 isn't included in PYTHON_LIBS; that's because python 3.8 added an --embed
argument to python-config that's required to include that library.