You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Petrus Hyvönen <pe...@gmail.com> on 2021/12/28 15:41:20 UTC

Experience with JCC >=3.9.9 and windows

Hi,

I am trying to build JCC (3.11) for conda-forge packaging and is struggling
a bit with building JCC for windows platform when version is 3.9.9 or
higher (3.10). The odd thing is that 3.9.7 is working, which is using (to
my current knowledge) the same other packages as 3.9.9 and other settings.
I do think the PATH's and such is right, otherwise 3.9.7 wouldn't work (in
principle)

Likely some minor issue I've not noticed - but just to check - does someone
else have similar issues with building on windows? Or got it to work would
be good to know?

For linux and mac it all builds well on 3.9.9 as well as 3.10.

>>> import jcc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\XXXX\lib\site-packages\jcc\__init__.py", line 31, in <module>
    import jcc._jcc3 as _jcc3

ImportError: DLL load failed while importing _jcc3: The specified module
could not be found.

Probably something simple that I haven't been able to track down.
Speculating in some changes in python for 3.9.9, there are some minor
changes in importlib but what I can see it shouldn't affect (
https://bugs.python.org/issue45765).

Any feedback welcome :)

Best Regards
/Petrus



-- 
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00

Re: Experience with JCC >=3.9.9 and windows

Posted by Petrus Hyvönen <pe...@gmail.com>.
Hi,

I just got some response on this through conda-forge community, that this
would be due that the DLL resolution order was changed in 3.8 (but
temporary reverted in conda-forge python).

https://github.com/conda-forge/python-feedstock/issues/552

I will try to test this,  if correct it will need to also go into the
generation of wrapper code I would assume.

Best Regards
/Petrus





On Tue, Dec 28, 2021 at 10:33 PM Petrus Hyvönen <pe...@gmail.com>
wrote:

> Short update, I have now debugged the python 3.9.9 (not working) and 3.9.7
> (working) side by side. It seems like there is a difference in behavior of
> the "import jcc._jcc3 as _jcc3" in __init__.py of jcc that triggers the
> find_spec() method in the _distutils_hack module. The return of this
> function seems to behave differently in the different python versions (from
> what I can find). I am not fully understanding this import magics, but
> could be that there is an issue with setuptools,,,, or something completely
> different :)
>
> Regards
> /Petrus
>
>
> On Tue, Dec 28, 2021 at 4:41 PM Petrus Hyvönen <pe...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I am trying to build JCC (3.11) for conda-forge packaging and is
>> struggling a bit with building JCC for windows platform when version is
>> 3.9.9 or higher (3.10). The odd thing is that 3.9.7 is working, which is
>> using (to my current knowledge) the same other packages as 3.9.9 and other
>> settings. I do think the PATH's and such is right, otherwise 3.9.7 wouldn't
>> work (in principle)
>>
>> Likely some minor issue I've not noticed - but just to check - does
>> someone else have similar issues with building on windows? Or got it to
>> work would be good to know?
>>
>> For linux and mac it all builds well on 3.9.9 as well as 3.10.
>>
>> >>> import jcc
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "C:\XXXX\lib\site-packages\jcc\__init__.py", line 31, in <module>
>>     import jcc._jcc3 as _jcc3
>>
>> ImportError: DLL load failed while importing _jcc3: The specified module
>> could not be found.
>>
>> Probably something simple that I haven't been able to track down.
>> Speculating in some changes in python for 3.9.9, there are some minor
>> changes in importlib but what I can see it shouldn't affect (
>> https://bugs.python.org/issue45765).
>>
>> Any feedback welcome :)
>>
>> Best Regards
>> /Petrus
>>
>>
>>
>> --
>> _____________________________________________
>> Petrus Hyvönen, Uppsala, Sweden
>> Mobile Phone/SMS:+46 73 803 19 00
>>
>
>
> --
> _____________________________________________
> Petrus Hyvönen, Uppsala, Sweden
> Mobile Phone/SMS:+46 73 803 19 00
>


-- 
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00

Re: Experience with JCC >=3.9.9 and windows

Posted by Petrus Hyvönen <pe...@gmail.com>.
Short update, I have now debugged the python 3.9.9 (not working) and 3.9.7
(working) side by side. It seems like there is a difference in behavior of
the "import jcc._jcc3 as _jcc3" in __init__.py of jcc that triggers the
find_spec() method in the _distutils_hack module. The return of this
function seems to behave differently in the different python versions (from
what I can find). I am not fully understanding this import magics, but
could be that there is an issue with setuptools,,,, or something completely
different :)

Regards
/Petrus


On Tue, Dec 28, 2021 at 4:41 PM Petrus Hyvönen <pe...@gmail.com>
wrote:

> Hi,
>
> I am trying to build JCC (3.11) for conda-forge packaging and is
> struggling a bit with building JCC for windows platform when version is
> 3.9.9 or higher (3.10). The odd thing is that 3.9.7 is working, which is
> using (to my current knowledge) the same other packages as 3.9.9 and other
> settings. I do think the PATH's and such is right, otherwise 3.9.7 wouldn't
> work (in principle)
>
> Likely some minor issue I've not noticed - but just to check - does
> someone else have similar issues with building on windows? Or got it to
> work would be good to know?
>
> For linux and mac it all builds well on 3.9.9 as well as 3.10.
>
> >>> import jcc
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "C:\XXXX\lib\site-packages\jcc\__init__.py", line 31, in <module>
>     import jcc._jcc3 as _jcc3
>
> ImportError: DLL load failed while importing _jcc3: The specified module
> could not be found.
>
> Probably something simple that I haven't been able to track down.
> Speculating in some changes in python for 3.9.9, there are some minor
> changes in importlib but what I can see it shouldn't affect (
> https://bugs.python.org/issue45765).
>
> Any feedback welcome :)
>
> Best Regards
> /Petrus
>
>
>
> --
> _____________________________________________
> Petrus Hyvönen, Uppsala, Sweden
> Mobile Phone/SMS:+46 73 803 19 00
>


-- 
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00