Skip to content

Commit 5bea9e1

Browse files
authored
Workaround missing main symbol in Python >= 3.9 (JuliaPy#937)
1 parent 4e5c12c commit 5bea9e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/startup.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ else
7373
libpy_handle = proc_handle
7474
# Now determine the name of the python library that these symbols are from
7575
some_address_in_libpython = Libdl.dlsym(libpy_handle, :Py_GetVersion)
76-
some_address_in_main_exe = Libdl.dlsym(proc_handle, Sys.isapple() ? :_mh_execute_header : :main)
76+
some_address_in_main_exe = Libdl.dlsym(proc_handle, Sys.isapple() ? :_mh_execute_header : :_start)
7777
dlinfo1 = Ref{Dl_info}()
7878
dlinfo2 = Ref{Dl_info}()
7979
ccall(:dladdr, Cint, (Ptr{Cvoid}, Ptr{Dl_info}), some_address_in_libpython,

0 commit comments

Comments
 (0)