From b787aba1bf6944c600800762d3c4d8aa554037a6 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sun, 24 Oct 2021 21:12:57 -0400 Subject: [PATCH] Workaround missing main symbol in Python >= 3.9 --- src/startup.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/startup.jl b/src/startup.jl index 1c182c0a..d208040c 100644 --- a/src/startup.jl +++ b/src/startup.jl @@ -73,7 +73,7 @@ else libpy_handle = proc_handle # Now determine the name of the python library that these symbols are from some_address_in_libpython = Libdl.dlsym(libpy_handle, :Py_GetVersion) - some_address_in_main_exe = Libdl.dlsym(proc_handle, Sys.isapple() ? :_mh_execute_header : :main) + some_address_in_main_exe = Libdl.dlsym(proc_handle, Sys.isapple() ? :_mh_execute_header : :_start) dlinfo1 = Ref{Dl_info}() dlinfo2 = Ref{Dl_info}() ccall(:dladdr, Cint, (Ptr{Cvoid}, Ptr{Dl_info}), some_address_in_libpython,