[
https://issues.apache.org/jira/browse/PYLUCENE-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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 <module>
> 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 <module>
> 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)