#Having hard time understanding Julia's compile flags
1 messages · Page 1 of 1 (latest)
Try
julia --output-o objout.o mainthing.jl
You may also need to specify sysimage file if you get "boot.jl not found" error. Check out the docs here:
https://docs.juliahub.com/PackageCompiler/MMV8C/1.1.0/devdocs/sysimages_part_1.html#.-Creating-the-object-file-1
Thanks. Appreciated
Gave +1 Julia Points to @unborn crater
Although now, this outputs this ---> next msg
Got same exception when trying to create a pointer to a memory address. The only thing that mainthing.jl containts is
print("it works apparently")
My assumption is that julia somehow hates memory operations, even "under-the-hood" ones. Which is weird, considering Ptr{T} yknow, exists.
I got this error too. Googling around, this seems to be the best way to compile julia binaries?
https://github.com/JuliaComputing/static-julia
Although it's merged with PackageCompiler.jl now. The examples in this one are fairly easy to follow though so I'd probably try this first.
We still are not able to compile Julia code into binaries but as sysimages (which I will be probably corrected soon because they do seem to be binaries). So far this is the only thing we can do.
.julia/environments/helix-lsp via v1.8.3
❯ ldd languageserver.so
linux-vdso.so.1 (0x00007ffc60994000)
libjulia.so.1 => not found
libjulia-internal.so.1 => not found
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007ff984600000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff993ae1000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff993ac0000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff984405000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff993bdf000)
Similarly, there is another project that also have similar goals https://github.com/tshort/StaticCompiler.jl
Compiles Julia code to a standalone library (experimental) - GitHub - tshort/StaticCompiler.jl: Compiles Julia code to a standalone library (experimental)