On 07/05/2025 02:59, Simon Richter wrote:
Hi,

On 5/6/25 20:31, Ahmad Khalifa wrote:

The problem seems that it is generating a relative path to its own
command expanded via PATH, which doesn't work because there is no /share
symlink but there is /usr/share/.

Perfectly reasonable method to support installing to /usr, /usr/local, $HOME/.local, ...

I disagree. These paths should be taken from configure arguments and compiled in, because distributions may change the layout of the package -- e.g. dlopen()ing a shared library requires looking into the multi- arch directory, and configuration files for packages in /usr are routinely found in /etc, while configuration files for manually installed packages below /usr/local can be in /usr/local/etc as well.

Hardcoding relative paths is going to be brittle, especially if the configuration system allows deviating from the default layout, and the amount of hackery required to make both work together is not worth it.

Sure, compiled-in PREFIX is better.

Scripts and interpreted languages can't always do that to find their runtime data.

bin/ launcher symlinks, it's pretty common to rely on relative paths for those:
$ find /usr/bin/ /usr/local/bin -type l -ls | grep ' ../' | wc -l
247

None of it is an issue if /usr/bin is higher priority.


--
Regards,
Ahmad

Reply via email to