sampotter / python-embree

Apache License 2.0
20 stars 6 forks source link

Compilation error while installing #23

Closed gaelccc closed 11 months ago

gaelccc commented 11 months ago

While installing the library with pip I get the following compilation error:

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          def __cinit__(self):
              self._device = rtcNewDevice(NULL)

              # TODO: hardcode an error function until we decide on a nice
              # way of exposing error functions to the library user
              rtcSetDeviceErrorFunction(self._device, simple_error_function, NULL);
                                                      ^
      ------------------------------------------------------------

      embree.pyx:548:48: Cannot assign type 'void (void *, RTCError, const char *) except *' to 'RTCErrorFunction'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void *, RTCError, const char *) except *'.

The only way I found to succesfully install the library is by commenting that line (rtcSetDeviceErrorFunction(self._device, simple_error_function, NULL);).

I tried it with different versions of gcc (9.2, 11.2, 12.1) and I get always the same error. Since this seems to be a Cython-related error it is worth specifying that I am using Cython 0.29.36