• eleijeep@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    I see what you mean, very clever solution if a program is using the configure prefix by compiling it into the binary.

    That can’t be very common though is it? Usually the configure prefix is just used by make install to install the binaries into the prefix. If the compiled program needs to know where it is installed it can read argv[0].

    Have you seen this used somewhere?

    • pelya@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      I am using this myself in Android app, where you can write files only inside /data/data/your.app.id/

      So naturally, if you want to publish a different app, your.app.id will be different, so you need to recompile all your Linux tools that you bundle inside your app.

      If you are not running your Linux tools on Android, you’d probably be better off using Docker or a chroot.