You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python package works on Julia 1.11 and 1.13 but errors on 1.12 #735
Julia is statically compiling its own internal version of lzma. However it is not the complete liblzma, just a few bits. For some reason I don't understand some of those bits of liblzma in julia leak out and shadow some bits from the full liblzma loaded by the python package.
The result is that the version of liblzma that initializes the encoder is different from the version of liblzma that runs the encoder.
Activity
cjdoris commentedon Dec 17, 2025
What is
pytype(Py(UInt8[]))in the working/non-working cases.Do you still see the error if you start Julia with
-t1?Is the version of imagecodecs the same in the working/non-working cases?
nhz2 commentedon Dec 18, 2025
In both cases. I have
JULIA_NUM_THREADS = 1env variable set.Interestingly, it sometimes does work on 1.12.3 if I repeat the import four times:
cjdoris commentedon Dec 18, 2025
Ok that's very strange. That hints at a more fundamental bug.
Try this?
nhz2 commentedon Jul 1, 2026
With help from Claude and Codex I finally think I know what is going on here.
https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/LibUnwind/LibUnwind%401.8.3/bundled/patches/libunwind-configure-static-lzma.patch
Julia is statically compiling its own internal version of lzma. However it is not the complete liblzma, just a few bits. For some reason I don't understand some of those bits of liblzma in julia leak out and shadow some bits from the full liblzma loaded by the python package.
The result is that the version of liblzma that initializes the encoder is different from the version of liblzma that runs the encoder.
cjdoris commentedon Jul 1, 2026
What happens if you run this on each version of Julia?
nhz2 commentedon Jul 1, 2026
1.11.9:
50040042
1.12.6:
50020052
1.13.0-rc1:
50080012
So it looks like 1.12 is using a much older version of liblzma
nhz2 commentedon Jul 3, 2026
I've tested julia 1.12 with the libunwind .so files from JuliaPackaging/Yggdrasil#14113 and that fixes the problem.
LibUnwind_jll: Update to v1.8.3+1 (#62366)
LibUnwind_jll: Update to v1.8.3+1 (#62366)
LibUnwind_jll: Update to v1.8.3+1 (#62366)