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

Trying to compile duplicate symbols crashes Julia REPL #169

Open
minecraft2048 opened this issue Sep 19, 2024 · 0 comments
Open

Trying to compile duplicate symbols crashes Julia REPL #169

minecraft2048 opened this issue Sep 19, 2024 · 0 comments

Comments

@minecraft2048
Copy link

This is on Julia 1.10, Arch Linux and StaticCompiler v0.7.2:

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0 (2023-12-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using StaticCompiler

julia> using StaticTools

julia> struct hello_struct
           a::Int
           b::Int
       end

julia> function my_add(a,b)
           return a+b
       end
my_add (generic function with 1 method)

julia> function my_add(s::hello_struct)
           return s.a + s.b
       end
my_add (generic function with 2 methods)

julia> StaticCompiler.generate_obj(((my_add, (Int,Int)),(my_add, (hello_struct,))), "test")
error: Linking globals named 'my_add': symbol multiply defined!

byakuya@ifrit-hpc /r/m/b/1/s/julia-gnuradio-interop [1]> 

It makes sense for generate_obj to fail to generate object code with duplicate symbols (ideally we implement Itanium ABI name mangling though, #162), but it shouldn't crash the whole Julia REPL

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

No branches or pull requests

1 participant