Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do the installed symlinks need to be absolute? #611

Open
Zalewa opened this issue Dec 14, 2022 · 1 comment
Open

Do the installed symlinks need to be absolute? #611

Zalewa opened this issue Dec 14, 2022 · 1 comment

Comments

@Zalewa
Copy link
Contributor

Zalewa commented Dec 14, 2022

Currently all the symbolic links that are installed with make install are absolute with the prefix dir being prepended to them.

$ find . -type l -exec echo -n {} '-> ' \; -exec readlink {} \;
./libexec/icecc/icecc-create-env -> /opt/icecc/icecream_debug_amd64/bin/icecc-create-env
./libexec/icecc/bin/g++ -> /opt/icecc/icecream_debug_amd64/bin/icecc
./libexec/icecc/bin/gcc -> /opt/icecc/icecream_debug_amd64/bin/icecc
./libexec/icecc/bin/cc -> /opt/icecc/icecream_debug_amd64/bin/icecc
./libexec/icecc/bin/clang -> /opt/icecc/icecream_debug_amd64/bin/icecc
./libexec/icecc/bin/clang++ -> /opt/icecc/icecream_debug_amd64/bin/icecc
./libexec/icecc/bin/c++ -> /opt/icecc/icecream_debug_amd64/bin/icecc
./bin/icerun -> /opt/icecc/icecream_debug_amd64/bin/icecc

Is there a reason they couldn't be relative, like this?

$ find . -type l -exec echo -n {} '-> ' \; -exec readlink {} \;
./libexec/icecc/icecc-create-env -> ../../bin/icecc-create-env
./libexec/icecc/bin/g++ -> ../../../bin/icecc
./libexec/icecc/bin/gcc -> ../../../bin/icecc
./libexec/icecc/bin/cc -> ../../../bin/icecc
./libexec/icecc/bin/clang -> ../../../bin/icecc
./libexec/icecc/bin/oko -> ../../../bin/icecc
./libexec/icecc/bin/clang++ -> ../../../bin/icecc
./libexec/icecc/bin/c++ -> ../../../bin/icecc
./bin/icerun -> icecc

I don't see drawbacks to this, and it would help make the package be more relocatable after make install.

@coolo
Copy link
Contributor

coolo commented Dec 30, 2022

Calculating relative symlinks in a portable way is harder. I bet there are autoconf macros to check if $LN_S supports --relative, you may want to look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants