[jira] [Commented] (PYLUCENE-66) JCC doesn't build with Python 3.11.

2022-11-01 Thread A. Coady (Jira)


[ 
https://issues.apache.org/jira/browse/PYLUCENE-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17627368#comment-17627368
 ] 

A. Coady commented on PYLUCENE-66:
--

(/) Verified build on python:3.11 docker image.

> JCC doesn't build with Python 3.11.
> ---
>
> Key: PYLUCENE-66
> URL: https://issues.apache.org/jira/browse/PYLUCENE-66
> Project: PyLucene
>  Issue Type: Bug
> Environment: Python 3.11, PyLucene 9.4.1-rc
>Reporter: A. Coady
>Priority: Major
>
> {{#10 10.86 In file included from /usr/local/include/python3.11/Python.h:44,}}
> {{#10 10.86 from _jcc3/java/lang/Object.h:18,}}
> {{#10 10.86 from jcc3/sources/functions.cpp:23:}}
> {{#10 10.86 jcc3/sources/functions.cpp: In function ‘void 
> installType(PyTypeObject*{*}, PyType_Def{*}, PyObject*, char*, int)’:}}
> {{#10 10.86 /usr/local/include/python3.11/object.h:136:30: error: lvalue 
> required as left operand of assignment}}
> {{#10 10.86 136 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob))}}
> {{#10 10.86 | ~{~}{{~}}^{{~}}{~}~}}
> {{#10 10.86 jcc3/sources/functions.cpp:1742:13: note: in expansion of macro 
> ‘Py_TYPE’}}
> {{#10 10.86 1742 | Py_TYPE(*type) = PY_TYPE(FinalizerClass);}}
> {{#10 10.86 | ^~~}}
> {{#10 10.89 error: command '/usr/bin/gcc' failed with exit code 1}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (PYLUCENE-66) JCC doesn't build with Python 3.11.

2022-10-31 Thread A. Coady (Jira)


 [ 
https://issues.apache.org/jira/browse/PYLUCENE-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

A. Coady updated PYLUCENE-66:
-
Environment: Python 3.11, PyLucene 9.4.1-rc  (was: Python 3.11)

> JCC doesn't build with Python 3.11.
> ---
>
> Key: PYLUCENE-66
> URL: https://issues.apache.org/jira/browse/PYLUCENE-66
> Project: PyLucene
>  Issue Type: Bug
> Environment: Python 3.11, PyLucene 9.4.1-rc
>Reporter: A. Coady
>Priority: Major
>
> {{#10 10.86 In file included from /usr/local/include/python3.11/Python.h:44,}}
> {{#10 10.86 from _jcc3/java/lang/Object.h:18,}}
> {{#10 10.86 from jcc3/sources/functions.cpp:23:}}
> {{#10 10.86 jcc3/sources/functions.cpp: In function ‘void 
> installType(PyTypeObject*{*}, PyType_Def{*}, PyObject*, char*, int)’:}}
> {{#10 10.86 /usr/local/include/python3.11/object.h:136:30: error: lvalue 
> required as left operand of assignment}}
> {{#10 10.86 136 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob))}}
> {{#10 10.86 | ~{~}{{~}}^{{~}}{~}~}}
> {{#10 10.86 jcc3/sources/functions.cpp:1742:13: note: in expansion of macro 
> ‘Py_TYPE’}}
> {{#10 10.86 1742 | Py_TYPE(*type) = PY_TYPE(FinalizerClass);}}
> {{#10 10.86 | ^~~}}
> {{#10 10.89 error: command '/usr/bin/gcc' failed with exit code 1}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (PYLUCENE-66) JCC doesn't build with Python 3.11.

2022-10-31 Thread A. Coady (Jira)
A. Coady created PYLUCENE-66:


 Summary: JCC doesn't build with Python 3.11.
 Key: PYLUCENE-66
 URL: https://issues.apache.org/jira/browse/PYLUCENE-66
 Project: PyLucene
  Issue Type: Bug
 Environment: Python 3.11
Reporter: A. Coady


{{#10 10.86 In file included from /usr/local/include/python3.11/Python.h:44,}}
{{#10 10.86 from _jcc3/java/lang/Object.h:18,}}
{{#10 10.86 from jcc3/sources/functions.cpp:23:}}
{{#10 10.86 jcc3/sources/functions.cpp: In function ‘void 
installType(PyTypeObject*{*}, PyType_Def{*}, PyObject*, char*, int)’:}}
{{#10 10.86 /usr/local/include/python3.11/object.h:136:30: error: lvalue 
required as left operand of assignment}}
{{#10 10.86 136 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob))}}
{{#10 10.86 | ~{~}{{~}}^{{~}}{~}~}}
{{#10 10.86 jcc3/sources/functions.cpp:1742:13: note: in expansion of macro 
‘Py_TYPE’}}
{{#10 10.86 1742 | Py_TYPE(*type) = PY_TYPE(FinalizerClass);}}
{{#10 10.86 | ^~~}}
{{#10 10.89 error: command '/usr/bin/gcc' failed with exit code 1}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (PYLUCENE-65) Support the default java on debian in `setup.py`.

2022-08-19 Thread A. Coady (Jira)
A. Coady created PYLUCENE-65:


 Summary: Support the default java on debian in `setup.py`.
 Key: PYLUCENE-65
 URL: https://issues.apache.org/jira/browse/PYLUCENE-65
 Project: PyLucene
  Issue Type: Improvement
Reporter: A. Coady


On debian, the `default-java` package does not have `jre/lib/amd64` in its 
path, so it breaks the `linux/x86_64` build. The `temurin` flags have the 
correct paths, so one easy fix would be to change the [temurin 
check|https://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/setup.py?revision=1900087=markup#l194]
 to:
{code:python}
    if 'temurin' in JDK['linux'] or 'default' in JDK['linux']:
{code}
That would also support `linux/aarch64` without any further changes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (PYLUCENE-52) JCC build fails with Python 3.8.

2021-12-11 Thread A. Coady (Jira)


 [ 
https://issues.apache.org/jira/browse/PYLUCENE-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

A. Coady resolved PYLUCENE-52.
--
Resolution: Fixed

> JCC build fails with Python 3.8.
> 
>
> Key: PYLUCENE-52
> URL: https://issues.apache.org/jira/browse/PYLUCENE-52
> Project: PyLucene
>  Issue Type: Bug
> Environment: linux
>Reporter: A. Coady
>Priority: Major
> Attachments: pylucene-lpython.patch
>
>
> JCC build fails with
> {{/usr/bin/ld: cannot find -lpython3.8m}}
> because 3.8 dropped the m flag.
> https://docs.python.org/3.8/whatsnew/3.8.html#build-and-c-api-changes



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (PYLUCENE-61) `adoptopenjdk` succeeded by `temurin` on macOS.

2021-10-01 Thread A. Coady (Jira)
A. Coady created PYLUCENE-61:


 Summary: `adoptopenjdk` succeeded by `temurin` on macOS.
 Key: PYLUCENE-61
 URL: https://issues.apache.org/jira/browse/PYLUCENE-61
 Project: PyLucene
  Issue Type: Bug
 Environment: macOS
Reporter: A. Coady


{code:java}
% brew info adoptopenjdk
adoptopenjdk: 16.0.1,9
https://adoptopenjdk.net/
/usr/local/Caskroom/adoptopenjdk/16.0.1,9 (196.9MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/adoptopenjdk.rb
==> Name
AdoptOpenJDK Java Development Kit
==> Description
JDK from the Java User Group (JUG)
==> Artifacts
OpenJDK16U-jdk_x64_mac_hotspot_16.0.1_9.pkg (Pkg)
==> Caveats
Temurin is the official successor to this software:


  brew install --cask temurin


adoptopenjdk has been officially discontinued upstream.
It may stop working correctly (or at all) in recent versions of macOS.
{code}
The support for `darwin/adoptopenjdk` in `setup.py` is based on checking 
whether `adoptopenjdk` is in `JAVAHOME`. Under `temurin`, the check defaults to 
`darwin/home`, breaking the paths for `INCLUDES` and `LFLAGS`.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (PYLUCENE-52) JCC build fails with Python 3.8.

2019-10-15 Thread A. Coady (Jira)
A. Coady created PYLUCENE-52:


 Summary: JCC build fails with Python 3.8.
 Key: PYLUCENE-52
 URL: https://issues.apache.org/jira/browse/PYLUCENE-52
 Project: PyLucene
  Issue Type: Bug
 Environment: linux
Reporter: A. Coady


JCC build fails with

{{/usr/bin/ld: cannot find -lpython3.8m}}

because 3.8 dropped the m flag.

https://docs.python.org/3.8/whatsnew/3.8.html#build-and-c-api-changes



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (PYLUCENE-50) StoredField of an int has the wrong type.

2019-06-17 Thread A. Coady (JIRA)
A. Coady created PYLUCENE-50:


 Summary: StoredField of an int has the wrong type.
 Key: PYLUCENE-50
 URL: https://issues.apache.org/jira/browse/PYLUCENE-50
 Project: PyLucene
  Issue Type: Bug
 Environment: Python 3 official docker container, 8.1.1rc
Reporter: A. Coady


The StoredField constructor is interpreting ints as bytes.  It's only 
reproducing on the 8 rc.

{{import lucene}}
 {{lucene.initVM()}}
 {{from org.apache.lucene import document}}
  
 {{field = document.StoredField('', 0)}}
 {{print(field.numericValue(), field.binaryValue())}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (PYLUCENE-45) JArray.cast_ raises SystemError in Python 3.

2018-10-15 Thread A. Coady (JIRA)
A. Coady created PYLUCENE-45:


 Summary: JArray.cast_ raises SystemError in Python 3.
 Key: PYLUCENE-45
 URL: https://issues.apache.org/jira/browse/PYLUCENE-45
 Project: PyLucene
  Issue Type: Bug
Reporter: A. Coady


`JArray_string.cast_` raises `SystemError` in Python 3 and 7.5 rc.

 
{code:java}
a = lucene.JArray_string('text')
lucene.JArray_string.cast_(a)
{code}
 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PYLUCENE-42) JCC build fails with Python 3.7 (release candidate).

2018-06-06 Thread A. Coady (JIRA)


[ 
https://issues.apache.org/jira/browse/PYLUCENE-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16504169#comment-16504169
 ] 

A. Coady commented on PYLUCENE-42:
--

Adding {{const}} fixes issue.

> JCC build fails with Python 3.7 (release candidate).
> 
>
> Key: PYLUCENE-42
> URL: https://issues.apache.org/jira/browse/PYLUCENE-42
> Project: PyLucene
>  Issue Type: Bug
>Reporter: A. Coady
>Priority: Major
>  Labels: build
> Attachments: patch.txt
>
>
> Using PyLucene 7.2.0-rc1 and the official docker image {{python:rc}}.
> {code}
> gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
> -Wstrict-prototypes -fPIC -D_java_generics -DJCC_VER="3.1" 
> -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux 
> -I_jcc3 -Ijcc3/sources -I/usr/local/include/python3.7m -c 
> jcc3/sources/jcc.cpp -o build/temp.linux-x86_64-3.7/jcc3/sources/jcc.o 
> -DPYTHON -fno-strict-aliasing -Wno-write-strings
> cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
> C/ObjC but not for C++
> jcc3/sources/jcc.cpp: In function ‘PyObject* initVM(PyObject*, PyObject*, 
> PyObject*)’:
> jcc3/sources/jcc.cpp:486:52: error: invalid conversion from ‘const char*’ to 
> ‘char*’ [-fpermissive]
>  char *option = PyUnicode_AsUTF8(arg);
> ^
> error: command 'gcc' failed with exit status 1
> The command '/bin/sh -c cd jcc && JCC_JDK=/usr/lib/jvm/default-java 
> python setup.py install' returned a non-zero code: 1
> make: *** [rc] Error 1
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (PYLUCENE-42) JCC build fails with Python 3.7 (release candidate).

2018-06-06 Thread A. Coady (JIRA)


 [ 
https://issues.apache.org/jira/browse/PYLUCENE-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

A. Coady updated PYLUCENE-42:
-
Attachment: patch.txt

> JCC build fails with Python 3.7 (release candidate).
> 
>
> Key: PYLUCENE-42
> URL: https://issues.apache.org/jira/browse/PYLUCENE-42
> Project: PyLucene
>  Issue Type: Bug
>Reporter: A. Coady
>Priority: Major
>  Labels: build
> Attachments: patch.txt
>
>
> Using PyLucene 7.2.0-rc1 and the official docker image {{python:rc}}.
> {code}
> gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
> -Wstrict-prototypes -fPIC -D_java_generics -DJCC_VER="3.1" 
> -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux 
> -I_jcc3 -Ijcc3/sources -I/usr/local/include/python3.7m -c 
> jcc3/sources/jcc.cpp -o build/temp.linux-x86_64-3.7/jcc3/sources/jcc.o 
> -DPYTHON -fno-strict-aliasing -Wno-write-strings
> cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
> C/ObjC but not for C++
> jcc3/sources/jcc.cpp: In function ‘PyObject* initVM(PyObject*, PyObject*, 
> PyObject*)’:
> jcc3/sources/jcc.cpp:486:52: error: invalid conversion from ‘const char*’ to 
> ‘char*’ [-fpermissive]
>  char *option = PyUnicode_AsUTF8(arg);
> ^
> error: command 'gcc' failed with exit status 1
> The command '/bin/sh -c cd jcc && JCC_JDK=/usr/lib/jvm/default-java 
> python setup.py install' returned a non-zero code: 1
> make: *** [rc] Error 1
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (PYLUCENE-42) JCC build fails with Python 3.7 (release candidate).

2018-06-06 Thread A. Coady (JIRA)
A. Coady created PYLUCENE-42:


 Summary: JCC build fails with Python 3.7 (release candidate).
 Key: PYLUCENE-42
 URL: https://issues.apache.org/jira/browse/PYLUCENE-42
 Project: PyLucene
  Issue Type: Bug
Reporter: A. Coady


Using PyLucene 7.2.0-rc1 and the official docker image {{python:rc}}.
{code}
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -fPIC -D_java_generics -DJCC_VER="3.1" 
-I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux 
-I_jcc3 -Ijcc3/sources -I/usr/local/include/python3.7m -c jcc3/sources/jcc.cpp 
-o build/temp.linux-x86_64-3.7/jcc3/sources/jcc.o -DPYTHON -fno-strict-aliasing 
-Wno-write-strings
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC 
but not for C++
jcc3/sources/jcc.cpp: In function ‘PyObject* initVM(PyObject*, PyObject*, 
PyObject*)’:
jcc3/sources/jcc.cpp:486:52: error: invalid conversion from ‘const char*’ to 
‘char*’ [-fpermissive]
 char *option = PyUnicode_AsUTF8(arg);
^
error: command 'gcc' failed with exit status 1
The command '/bin/sh -c cd jcc && JCC_JDK=/usr/lib/jvm/default-java python 
setup.py install' returned a non-zero code: 1
make: *** [rc] Error 1
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (PYLUCENE-38) JCC build error under recents versions of clang.

2017-10-17 Thread A. Coady (JIRA)
A. Coady created PYLUCENE-38:


 Summary: JCC build error under recents versions of clang.
 Key: PYLUCENE-38
 URL: https://issues.apache.org/jira/browse/PYLUCENE-38
 Project: PyLucene
  Issue Type: Bug
 Environment: macOS
Reporter: A. Coady


{code:none}
jcc3/sources/JArray.cpp:315:66: error: ordered comparison between pointer and 
zero ('PyObject *' (aka '_object *') and 'int')
PyList_Type.tp_as_sequence->sq_inplace_concat(list, arg) < 0)
 ^ ~
jcc3/sources/JArray.cpp:330:64: error: ordered comparison between pointer and 
zero ('PyObject *' (aka '_object *') and 'int')
PyList_Type.tp_as_sequence->sq_inplace_repeat(list, n) < 0)
~~ ^ ~
{code}

Comparisons between NULL and integers have been elevated from a warning to an 
error in recent versions of clang.  And presumably the error handling wasn't 
working anyway.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)