dhoegh / BuildExecutable.jl

Build a standalone executables from a Julia script
Other
156 stars 21 forks source link

Writing to /usr/lib #34

Open trans opened 7 years ago

trans commented 7 years ago

When I run the script:

using BuildExecutable
build_executable("neapolitan", "src/neapolitan-command.jl", "bin", "native")

I get this error:

ERROR: LoadError: Unable to modify /usr/lib/x86_64-linux-gnu/libneapolitan.ji

So it is trying to write to /usr/lib! How to fix?

dhoegh commented 7 years ago

I think the reason for this is that BuildExecutable requires write access to the path returned by: abspath(dirname(Libdl.dlpath("libjulia")))

alhirzel commented 7 years ago

Why is that? I would think any generated files would be put into the folder specified by the third argument. I think this would prevent users of normal packaging systems from using BuildExecutable. I think this also applies to the final output file (which is currently set to go into /usr/bin).

loicspace commented 7 years ago

You might have figured this out by now but running Julia with admin privileges should fix it, i.e., sudo julia.