[jira] [Commented] (PYLUCENE-69) Linking libjvm seems to prevent PyPi upload
[ https://issues.apache.org/jira/browse/PYLUCENE-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17815416#comment-17815416 ] Andi Vajda commented on PYLUCENE-69: Try with the latest but I doubt you'll be able to build a wheel that includes the JVM. > Linking libjvm seems to prevent PyPi upload > --- > > Key: PYLUCENE-69 > URL: https://issues.apache.org/jira/browse/PYLUCENE-69 > Project: PyLucene > Issue Type: Question >Reporter: Clément Jonglez >Priority: Major > > As mentioned in > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-68] , I am > trying to package the Orekit Python wrapper from [~petrush] (which uses JCC) > to PyPi. > I used the --wheel option to compile a wheel and not an egg, and I tried to > upload the wheel to PyPi. > But PyPi refuses my wheel with the answer : > {noformat} > Binary wheel 'orekit-11.3.3-cp312-cp312-linux_x86_64.whl' has an unsupported > platform tag 'linux_x86_64'. {noformat} > After reading about why this error occurs ( > [https://peps.python.org/pep-0513/#rationale] ) , I tried to convert the > wheel to a manylinux wheel by using: > > {code:java} > auditwheel repair dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl{code} > > Which returned the following error: > > {noformat} > auditwheel: error: cannot repair > "dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl" to "manylinux_2_5_x86_64" > ABI because of the presence of too-recent versioned symbols. You'll need to > compile the wheel on an older toolchain.{noformat} > > I then ran the following command to get more information about which symbols > are problematic in the wheel: > > {code:java} > auditwheel-symbols --manylinux 2_34 > dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl{code} > > Which returned: > > {noformat} > orekit/_orekit.cpython-312-x86_64-linux-gnu.so is not manylinux_2_34 > compliant because it links the following forbidden libraries: > libjvm.so{noformat} > > > I tried removing -ljvm from the LFLAGS list in jcc's config.py, but as > expected the Python program then fails on starting the JVM: > {noformat} > Traceback (most recent call last): > File "/media/ssd/git/orekit_python_artifacts/test/AbstractDetectorTest.py", > line 3, in > import orekit > File > "/home/yzokras/Documents/orekit-pip/orekit312/lib/python3.12/site-packages/orekit-12.0-py3.12-linux-x86_64.egg/orekit/__init__.py", > line 7, in > from . import _orekit > ImportError: > /home/yzokras/Documents/orekit-pip/orekit312/lib/python3.12/site-packages/orekit-12.0-py3.12-linux-x86_64.egg/orekit/_orekit.cpython-312-x86_64-linux-gnu.so: > undefined symbol: JNI_GetDefaultJavaVMInitArgs{noformat} > > I don't have any more clues... Alternatively, I could try to package the > Orekit Python wrapper as a source distribution (using > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-27] and > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-68] ), but > this would mean that a user would need to wait approx. 10 minutes for the > wheel to compile when running pip install... > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (PYLUCENE-69) Linking libjvm seems to prevent PyPi upload
[ https://issues.apache.org/jira/browse/PYLUCENE-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17785302#comment-17785302 ] Clément Jonglez commented on PYLUCENE-69: - Thank you for the honest answer! I'll try uploading a source distribution to PyPi instead of binaries then. > Linking libjvm seems to prevent PyPi upload > --- > > Key: PYLUCENE-69 > URL: https://issues.apache.org/jira/browse/PYLUCENE-69 > Project: PyLucene > Issue Type: Question >Reporter: Clément Jonglez >Priority: Major > > As mentioned in > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-68] , I am > trying to package the Orekit Python wrapper from [~petrush] (which uses JCC) > to PyPi. > I used the --wheel option to compile a wheel and not an egg, and I tried to > upload the wheel to PyPi. > But PyPi refuses my wheel with the answer : > {noformat} > Binary wheel 'orekit-11.3.3-cp312-cp312-linux_x86_64.whl' has an unsupported > platform tag 'linux_x86_64'. {noformat} > After reading about why this error occurs ( > [https://peps.python.org/pep-0513/#rationale] ) , I tried to convert the > wheel to a manylinux wheel by using: > > {code:java} > auditwheel repair dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl{code} > > Which returned the following error: > > {noformat} > auditwheel: error: cannot repair > "dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl" to "manylinux_2_5_x86_64" > ABI because of the presence of too-recent versioned symbols. You'll need to > compile the wheel on an older toolchain.{noformat} > > I then ran the following command to get more information about which symbols > are problematic in the wheel: > > {code:java} > auditwheel-symbols --manylinux 2_34 > dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl{code} > > Which returned: > > {noformat} > orekit/_orekit.cpython-312-x86_64-linux-gnu.so is not manylinux_2_34 > compliant because it links the following forbidden libraries: > libjvm.so{noformat} > > > I tried removing -ljvm from the LFLAGS list in jcc's config.py, but as > expected the Python program then fails on starting the JVM: > {noformat} > Traceback (most recent call last): > File "/media/ssd/git/orekit_python_artifacts/test/AbstractDetectorTest.py", > line 3, in > import orekit > File > "/home/yzokras/Documents/orekit-pip/orekit312/lib/python3.12/site-packages/orekit-12.0-py3.12-linux-x86_64.egg/orekit/__init__.py", > line 7, in > from . import _orekit > ImportError: > /home/yzokras/Documents/orekit-pip/orekit312/lib/python3.12/site-packages/orekit-12.0-py3.12-linux-x86_64.egg/orekit/_orekit.cpython-312-x86_64-linux-gnu.so: > undefined symbol: JNI_GetDefaultJavaVMInitArgs{noformat} > > I don't have any more clues... Alternatively, I could try to package the > Orekit Python wrapper as a source distribution (using > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-27] and > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-68] ), but > this would mean that a user would need to wait approx. 10 minutes for the > wheel to compile when running pip install... > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (PYLUCENE-69) Linking libjvm seems to prevent PyPi upload
[ https://issues.apache.org/jira/browse/PYLUCENE-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17785230#comment-17785230 ] Andi Vajda commented on PYLUCENE-69: JCC is a python/c++ code generator for wrapping Java libraries using JNI. Any JCC-built Python extension embeds a Java Virtual Machine. If PyPI doesn't allow you to upload libjvm.so then you cannot ship JCC-produced binaries on PyPI. Only source distributions are then possible. And yes, building binaries can take time and requires that at least a C++ compiler be present as well. Knowledge how to operate a C++ compiler and linker is also useful. I think you should reset your expectation a bit here. Even _if_ could do this, the wheel would be enormous: the number of Python * C++ * Java * OS versions possible makes for a lot of combos. There is a reason I don't ever ship binaries, it's just too much (!) > Linking libjvm seems to prevent PyPi upload > --- > > Key: PYLUCENE-69 > URL: https://issues.apache.org/jira/browse/PYLUCENE-69 > Project: PyLucene > Issue Type: Question >Reporter: Clément Jonglez >Priority: Major > > As mentioned in > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-68] , I am > trying to package the Orekit Python wrapper from [~petrush] (which uses JCC) > to PyPi. > I used the --wheel option to compile a wheel and not an egg, and I tried to > upload the wheel to PyPi. > But PyPi refuses my wheel with the answer : > {noformat} > Binary wheel 'orekit-11.3.3-cp312-cp312-linux_x86_64.whl' has an unsupported > platform tag 'linux_x86_64'. {noformat} > After reading about why this error occurs ( > [https://peps.python.org/pep-0513/#rationale] ) , I tried to convert the > wheel to a manylinux wheel by using: > > {code:java} > auditwheel repair dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl{code} > > Which returned the following error: > > {noformat} > auditwheel: error: cannot repair > "dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl" to "manylinux_2_5_x86_64" > ABI because of the presence of too-recent versioned symbols. You'll need to > compile the wheel on an older toolchain.{noformat} > > I then ran the following command to get more information about which symbols > are problematic in the wheel: > > {code:java} > auditwheel-symbols --manylinux 2_34 > dist/orekit-11.3.3-cp312-cp312-linux_x86_64.whl{code} > > Which returned: > > {noformat} > orekit/_orekit.cpython-312-x86_64-linux-gnu.so is not manylinux_2_34 > compliant because it links the following forbidden libraries: > libjvm.so{noformat} > > > I tried removing -ljvm from the LFLAGS list in jcc's config.py, but as > expected the Python program then fails on starting the JVM: > {noformat} > Traceback (most recent call last): > File "/media/ssd/git/orekit_python_artifacts/test/AbstractDetectorTest.py", > line 3, in > import orekit > File > "/home/yzokras/Documents/orekit-pip/orekit312/lib/python3.12/site-packages/orekit-12.0-py3.12-linux-x86_64.egg/orekit/__init__.py", > line 7, in > from . import _orekit > ImportError: > /home/yzokras/Documents/orekit-pip/orekit312/lib/python3.12/site-packages/orekit-12.0-py3.12-linux-x86_64.egg/orekit/_orekit.cpython-312-x86_64-linux-gnu.so: > undefined symbol: JNI_GetDefaultJavaVMInitArgs{noformat} > > I don't have any more clues... Alternatively, I could try to package the > Orekit Python wrapper as a source distribution (using > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-27] and > [https://issues.apache.org/jira/projects/PYLUCENE/issues/PYLUCENE-68] ), but > this would mean that a user would need to wait approx. 10 minutes for the > wheel to compile when running pip install... > -- This message was sent by Atlassian Jira (v8.20.10#820010)