Closed aminya closed 4 years ago
Caused by unsafe_load()
in f()
By removing unsafe_load()
we get:
Happens when the shell command runs.
Interesting. I thought jl_n_threads
would be universal. There's probably another function that will suffice for this test. Will have to look.
It is not just this one. Running
test/globals.jl
gives a lot of similar errors:
Interesting. Must be a deeper bug. I can look, but probably not for a couple of days.
I think the problem is that the macro jlrun
cannot find libjulia
. It should try to link to lib/libjulia.dll.a
. It has a different name on Linux (and probably MacOS, too). This line probably needs to splice in a different library name, depending on the platform.
I addressed this in the PR now, but still doesn't work.
I played around with this locally for a bit and couldn't find a gcc command that would work.
There are some stuff to test from the documentation: https://docs.julialang.org/en/v1/manual/embedding/#
I hate compiling on Windows. Looks like it might be an ordering issue (hint here). So, the compile statement needs to have test.o -ljulia.dll
instead of -ljulia.dll test.o
.
Yay, I think it is solved
When running test/ccalls.jl
https://travis-ci.com/tshort/StaticCompiler.jl/jobs/261775338#L137