Why are you using “–output-bc”? I do not know that option.
Have you tried julia test.jl?
EDIT: Searching by Internet, I think it was used to Generate LLVM bitcode, it is nothing you should require. You also can see it with @code_llvm in the julia REPL.
Why are you using “–output-bc”? I do not know that option.
Have you tried julia test.jl ?
I want to compile my julia code not to interpret it.
EDIT: Searching by Internet, I think it was used to Generate LLVM bitcode, it is nothing you should require. You also can see it with @code_llvm in the julia REPL.
yeah I tried that I put the generated code in a text file called test.ll tried to run it using the command
joseph@joseph-X541UJ:~/Documents/Julia$ lli-9 test.ll
lli-9: test.ll:3:15: error: use of undefined type named 'jl_value_t'
%0 = alloca %jl_value_t addrspace(10)*
^
You need to give an explicit path to the sysimage when you use the --output option ( -J path/to/sysimage ).
I tired to generate one using the command but it gives the same error.
joseph@joseph-X541UJ:~/Documents/Julia$ julia --output-ji test.jl
ERROR: could not open file boot.jl
joseph@joseph-X541UJ:~/Documents/Julia$ julia --output-ji /home/joseph/Documents/Julia/test.jl
ERROR: could not open file boot.jl
You have to use the default sysimage, located wherever your julia install is located.
May I ask why you need LLVM bitcode? Julia code is not interpreted by default (though using a REPL makes it seem that way). Rather, your code is compiled to native code at first run and executed afterwards.
ERROR: LoadError: ArgumentError: Package Distributed not found in current path:
- Run `import Pkg; Pkg.add("Distributed")` to install the Distributed package.
The error makes some sense since I have using Distributed in the file in.jl.
PS: After some googling I found that this could be related to the environment variable $JULIA_LOAD_PATH. I’ve tried setting it to path-to-julia/julia/usr/share/julia/stdlib/vx.x, but no still got the same error.