-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with julia version 1.10.1 on linux systems #464
Comments
I experienced this as well, and came here to look if this was reported already, I'm using a Debian (testing-branch) system, using Python |
Is this possibly about a specific Python version(s) such as (or how they are compiled "GCC 11.2.0"): I can't reproduce on (my Linux Mint):
I skipped 2. in case it matters, not sure about a "clean conda environment", and why should it matter? In case it helps anyone, I did not get the latest version with
|
The issue over on Julia: JuliaLang/julia#53363 |
For people looking for a
|
I can reproduce this error with default python 3.11.4 from ubuntu 23.04, but it works with pyenv python versions 3.11.6, 3.11.8 & 3.12.2 |
OK, as far as I can tell (based on comments by @topolarity) the issue occurs when Python was not built with the Fortunately this flag can be detected. Could everyone who's experienced this (@Brusa99, @bjodah, @feefladder, @dpinol, @LilithHafner) run the following command
on whichever versions of Python you have installed. Please report back the value (0 or 1) and whether that version of Python segfaults or not. The hypothesis is that it works when it is 1 and segfaults when 0. Fortunately this at least gives us a way to detect the problem, and issue warnings or restrict to Julia <=1.10.0 appropriately. |
conda-forge/python-feedstock#222 Looks like pyjulia already experienced some issues with statically linked Python. |
I ran the command and got |
I ran the command from a new virtualenv and got a |
I got a
And we can see that it is statically linked, because there is no link to |
I have never been able to reproduce this issue and still cannot.
This is consistent with @cjdoris's hypothesis. |
Unfortunately, the build flags depend on the maintainer (not just the default build flags from Python). On my system (Ubuntu), the Debian-provided They are both statically-linked (but report $ ldd $(which python3.11) | grep python
$ ldd $(which python3) | grep python
$ python3 -c "import sysconfig; print(sysconfig.get_config_var('PY_ENABLE_SHARED'))"
1
$ python3.11 -c "import sysconfig; print(sysconfig.get_config_var('PY_ENABLE_SHARED'))"
1 The direct test is to inspect the relocations in the binary: $ readelf -rW $(which python3.11) | grep environ
0000000000a92620 000006a400000005 R_X86_64_COPY 0000000000a92620 __environ@GLIBC_2.2.5 + 0
$ readelf -rW $(which python3) | grep environ
0000000000562cb8 0000002900000006 R_X86_64_GLOB_DAT 0000000000000000 environ@GLIBC_2.2.5 + 0 The |
Also as a heads up, there's a work-around being landed for 1.10.3: JuliaLang/julia#53643 |
Linking related issue seen in PySR: MilesCranmer/PySR#561 |
There's a new version of juliacall out which requires julia <=1.10.0, so if you upgrade juliacall things should work again. I'll allow 1.10.3 and 1.11 again later once those are out and shown to work OK. |
I confirmed that JuliaCall works with 1.10.3 so I have made a release (JuliaCall 0.9.20) with the updated julia compat entries. |
Affects: JuliaCall
Describe the bug
The new version 1.10.1 release broke the package juliacall on Linux systems.
When importing the package from python a segmentation fault occurs.
How to reproduce:
pip install juliacall
import juliacall
Note: this does not happen with version 1.10.0 and on Mac devices.
Your system
The bug is present both on manjaro linux (Manjaro Linux x86_64, kernel: 6.1.71-1-MANJARO) and on Ubuntu (Ubuntu 20.04.5 LTS x86_64, kernel 5.15.0-1054-azure).
I raised the issue also on the julia github
The text was updated successfully, but these errors were encountered: