New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/34030#issuecomment-967754923 Comment: > We need more expert advice with relocation. I think one way would be to compile sage in-place, then remove all unnecessary stuff (or vinstall all necessary stuff). I'll give it a try later. The alternative is how sage builds binary tarballs: compile sage in a directory with a particular pathname (long enough), then search-and-replace this pathname with the location it will be installed. In their binary tarballs they do this search-and-replace step the first time sage runs after being extracted, in this way sage can be extracted anywhere and will fix its paths the first time it runs. We would do this at xbps-src install time.