undefined symbol: sipExportedExceptions_limacore
Laurent Claustre
claustre at esrf.fr
Mon Dec 1 14:47:26 GMT 2025
Hi,
thanks the exceptions flag helps definitively.
Now I have an other issue, this project limacore is using an other
module we bind with sip too, called processlib and I get this error when
importing limacore:
>>> from Lima import Core
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/opt/bliss/conda/miniconda/envs/lima_dev_sip6/lib/python3.12/site-packages/Lima/Core/__init__.py",
line 24, in <module>
from limacore import *
RuntimeError: the processlib module failed to register with the sip module
On 12/1/25 14:30, Phil Thompson wrote:
> I can't reproduce this. Did you enable exceptions support in
> pyproject.toml? See...
>
> https://python-sip.readthedocs.io/en/stable/pyproject_toml.html#bindings-sections
>
>
> Phil
>
> On 01/12/2025 08:06, Laurent Claustre wrote:
>> With sip 4 we got the good implementation in the generated c++ file:
>>
>> PyObject *sipExportedExceptions_limacore[2];
>>
>> But with sip 6 this is missing.
>>
>> On 12/1/25 08:10, Laurent Claustre wrote:
>>> Sorry, the implementation is missing.
>>>
>>> On 11/28/25 17:28, Phil Thompson wrote:
>>>> On 28/11/2025 16:07, Laurent Claustre wrote:
>>>>> Hello,
>>>>>
>>>>> porting our C++ project python binding from sip 4.19 to 6.14 we got
>>>>> the following error when importing the project module:
>>>>>
>>>>> /undefined symbol: sipExportedExceptions_limacore/
>>>>>
>>>>> Looking into the generated sipAPI project file (sipAPIlimacore.h)
>>>>> sipExportedExceptions_limacore is declared as "external":
>>>>>
>>>>> //* The exceptions defined in this module. */
>>>>> extern PyObject *sipExportedExceptions_limacore[];/
>>>>>
>>>>> But none of the .h/.cpp generated file contains its declaration. We
>>>>> have a Exceptions.sip file which looks like:
>>>>>
>>>>> /enum Layer {
>>>>> Common, Control, Hardware, CameraPlugin,
>>>>> };
>>>>>
>>>>> enum ErrorType {
>>>>> InvalidValue, NotSupported, Error,
>>>>> };
>>>>>
>>>>>
>>>>> %Exception Exception(SIP_Exception)
>>>>> {
>>>>> %TypeHeaderCode
>>>>> #include "lima/Exceptions.h"
>>>>> using namespace lima;
>>>>> %End
>>>>> %RaiseCode
>>>>> const std::string& tmpString = sipExceptionRef.getErrMsg();
>>>>> const char *detail = tmpString.c_str();
>>>>> PyErr_SetString(sipException_Exception, detail);
>>>>> %End
>>>>> };
>>>>> /
>>>>>
>>>>> Thanks for your help
>>>>>
>>>>> Laurent
>>>>
>>>> Compared to the 4.19 code is the declaration new or is the
>>>> implementation missing?
>>>>
>>>> Phil
>>>
--
Laurent Claustre
Beamline Control Unit
Instrumentation Services and Development Division
ESRF - The European Synchrotron
71, avenue des Martyrs
38000 Grenoble, FRANCE
Tel.: +33 (0)4.76.88.29.12
More information about the PyQt
mailing list