Hello,

turns out, that CPython3 defines the module init function PyMODINIT_FUNC as follows:

extern "C" PyObject *

on the other hand, visibility attributes are supposed to be defined before the actual type, but since it's a define, one can't really get in between.

I would content, that CPython should in fact, provide a visibility definition here. Otherwise, every module runs into it. Do you agree, I reckon having seen your name in other place, that you might know, Jakub.

When it's not a type, as with CPython2:

extern "C" void

then it's acceptable, to define attributes afterwards. So Nuitka, using -fvisibility=hidden runs into trouble here. There is actually a bug report for gcc (the number I forgot), that complained about it, but that is how it should be, for pointers as return types, it won't work to define attributes after it.

The solution is to test for __GNUC__ and to make its own declaration, not using PyMODINIT_FUNC.

I am going to make a new release of Nuitka. The test didn't notice, because although it compiled all modules of Nuitka into single modules (that is the test, can be done more efficient), it was not copying the "nuitka" binary, and therefore it was location the "nuitka" package relative to that original place, not using them at all.

So that had been broken for a while. It also found other (minor) issues, of why modules didn't work at all for Python3, and when they did, not correctly. Fixed them too.

Will be fixed in 0.4.4 release. (If you or anybody need/want it sooner, checkout "factory" branch of official Nuitka repository. It's where I prepare releases, but reserve the right rebase often as I improve things.)

Yours,
Kay


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to