Skip to content
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

LLVM snooping broken on nightly #270

Closed
timholy opened this issue Dec 6, 2021 · 2 comments · Fixed by JuliaLang/julia#43634
Closed

LLVM snooping broken on nightly #270

timholy opened this issue Dec 6, 2021 · 2 comments · Fixed by JuliaLang/julia#43634
Assignees

Comments

@timholy
Copy link
Owner

timholy commented Dec 6, 2021

On nightly,

julia> ccall(:jl_dump_emitted_mi_name, Nothing, (Ptr{Nothing},), C_NULL)
ERROR: could not load symbol "jl_dump_emitted_mi_name":
/home/tim/src/julia-master/julia: undefined symbol: jl_dump_emitted_mi_name
Stacktrace:
 [1] top-level scope
   @ ./REPL[2]:1

I notice this ccall is not tested anywhere in Julia's tests; that would be a good idea, to ensure it remains callable.

I don't use the LLVM functionality so I'm assigning this to @NHDaly (feel free to reassign to someone else).

@NHDaly
Copy link
Collaborator

NHDaly commented Jan 2, 2022

Thanks @timholy - great catch! Oops, sorry it wasn't tested... :/

It looks like maybe something changed in the julia build where you now need to put JL_DLLEXPORT in a Header file in order to get the function exported...?
Currently, it's only exported from this .cpp file:
https://github.com/JuliaLang/julia/blob/602b46c55387c527192d2db0d9a71a118678b816/src/codegen.cpp#L105-L109

Ah, I think this was the change, which seems to now (sometimes?) require you to list your exported function name in this .inc file:
JuliaLang/julia#38160
It looks like the exported functions we use elsewhere in the package got pulled in (probably because they were tested 😜):
https://github.com/JuliaLang/julia/blob/6735cb62858d22a532d17bc810378dee3dc2ea8d/src/jl_exported_funcs.inc

So i think i'll need to add this function to that list.
Thanks @timholy! 👍

@timholy
Copy link
Owner Author

timholy commented Jan 3, 2022

Thanks so much for fixing this!

Fixed by JuliaLang/julia#43634

@timholy timholy closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants