Closed rofinn closed 8 years ago
I do not have a mac could you test if interchanging @executable_path
in https://github.com/dhoegh/BuildExecutable.jl/blob/aa248281d766c95161538b6b1f3980c55f58474a/src/BuildExecutable.jl#L179 with @loader_path
fixes the problem?
So, that doesn't fix the problem and produces the same result cause sys.buildfile
is always the full path on the host system cause of this line buildpath = abspath(dirname(Libdl.dlpath(debug ? "libjulia-debug" : "libjulia")))
. I think the only way to get build_executable
to do what I'm thinking is to have it take a flag that tells it to copy the julia build to the executable build directory and changes the buildpath accordingly. If that sounds reasonable I'll try and getting something working on the weekend when I have some time.
That sounds reasonable, as BuildExecutable produces a portable executable on windows but not on linux and mac. If you could figure out how to make the mac executable portable that would be greatly appreciated. As it would make the experience across platforms better and it could potentially also lead to a fix on to make the linux executable portable. I have tried briefly to look into the issue on linux, but did not manage.
Found a fix for OSX. Just needed an extra line to change the @rpath
to point to @executable_path
rather than the host julia install directory (sys.buildpath
).
I will close this as i think this is fixed in #14. Please respond if this is not the case.
Sorry to bug you folks again, but would it be possible to give
build_executable
an option to bundle julia and all its dependencies into the executable for distributing to other machines that don't have julia installed?For example, if I build my playground script on my host machine and try to transfer the build directory to a vm I get the following error.
From what I can tell the julia rpath is hard coded to the machine the executable was built on