Hi there,
I have an internal company package that is working fine on previous Julia versions, but suddenly throws an error upon precompilation in julia 1.8. See error below. Any help or tips are much appreciated.
It looks like unique
is failing, so I removed all explicit usage of unique
as a test, but precompilation still fails.
The error is complaining about a missing method of ==
. Source code on float.jl line 448 seems to be comparing an Int and a Float. But I can trigger that code just fine on a REPL.
julia> @which Int(1.66679e+09) == 1.66679e+09
==(y::Int64, x::Float64) in Base at float.jl:450
This is the offending precompilation error:
julia> using MyPackage
[ Info: Precompiling MyPackage
fatal: error thrown and no exception handler available.
MethodError(f=Base.:(==), args=(1.66679e+09, 1.66679e+09), world=0x00000000000084b5)
jl_method_error_bare at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1879
jl_method_error at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1897
jl_lookup_generic_ at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2530
ijl_apply_generic at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2545
== at .\float.jl:448
== at .\float.jl:450
isequal at .\operators.jl:146
hash at .\float.jl:518 [inlined]
hash at .\tuple.jl:434 [inlined]
hash at .\tuple.jl:434
hash at .\tuple.jl:434 [inlined]
hash at .\hashing.jl:20 [inlined]
hashindex at .\dict.jl:169 [inlined]
ht_keyindex at .\dict.jl:284
haskey at .\dict.jl:569 [inlined]
in at .\set.jl:66
unknown function (ip: 000000001ee6b3ba)
unique at .\set.jl:140
_unique_dims at .\multidimensional.jl:1653 [inlined]
#unique#563 at .\multidimensional.jl:1651 [inlined]
unique at .\multidimensional.jl:1651
jfptr_unique_34512.clone_1 at C:\Users\matcox\AppData\Local\Programs\Julia-1.8.2\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1839 [inlined]
write_dependency_list at /cygdrive/c/buildbot/worker/package_win64/build/src\dump.c:1388 [inlined]
ijl_save_incremental at /cygdrive/c/buildbot/worker/package_win64/build/src\dump.c:2645
jl_write_compiler_output at /cygdrive/c/buildbot/worker/package_win64/build/src\precompile.c:65
ijl_atexit_hook at /cygdrive/c/buildbot/worker/package_win64/build/src\init.c:207
jl_repl_entrypoint at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:720
mainCRTStartup at /cygdrive/c/buildbot/worker/package_win64/build/cli\loader_exe.c:59
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
My version info:
julia> versioninfo()
Julia Version 1.8.2
Commit 36034abf26 (2022-09-29 15:21 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 Ă— Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores
Environment:
JULIA_PKG_PRECOMPILE_AUTO = 0