Re: hit installation broken

  • From: Mike Pall <mike-1507@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 20 Jul 2015 12:11:52 +0200

Laurent Deniau wrote:

Giving the PREFIX during the compilation worked, but the problem is that I
don't know the PREFIX during the build (and not even once installed) when it
is "distributed", and setting a relative path doesn't work. In my case, the
user will be allowed to download a self-contained application and put it
where he/she wants on is computer as soon as the starting script is in its
PATH. Is it a recent change, or I just didn't notice it before?

It has always been that way on POSIX systems. Even plain Lua
hardcodes the module paths in the binary (except, it doesn't
come with any external modules).

[
NB: There's no 100% portable and reliable solution to derive the
absolute path of an executable from within itself for POSIX systems:
http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe
]

--Mike

Other related posts: