Binaries and alternate prefix

Ryan Schmidt ryandesign at macports.org
Wed Apr 15 00:54:25 PDT 2009


On Tue, Apr 14, 2009 at 8:27 PM, Jon Hermansen wrote:

> I seriously support the idea of setting up a build system /  
> distributing binary packages.

I think everybody is in favor of the idea. There are just many parts  
that need to get done. And I'm still trying to work out in my head  
what some of the disadvantages of binaries would be, and how we could  
possible handle those.


> Most modern Linux distributions (unless source-based) install files  
> contained within packages to one path, and one path only. Why does  
> it need to be more complicated? Make it a requirement that if you  
> want to use binary packages, for now, your prefix must be /opt/local.

Many users either prefer to or have no choice but to install into a  
prefix which doesn't require root to write to. MacPorts supports  
being installed into a different prefix partly for this purpose. I  
would like to support that flexibility, and indeed the entire set of  
MacPorts installation options, for binaries as well.

Thanks for the information on how Linux handles it; I wasn't aware.  
That means if we don't support alternate prefixes, we'd at least be  
in good company.

I personally install MacPorts to a different prefix, 1) because I  
want something shorter than "/opt/local" (I use "/mp"), and 2)  
because some port authors do not realize (or forget) that MacPorts  
can be installed in other prefixes and erroneously hardcode "/opt/ 
local" into their ports or patches, and I want to encounter an error  
message in these cases so that I can notice and report and/or correct  
that problem.

As proposed above, I think with a combination of install_name_tool  
and textual search/replace it could be possible to distribute install- 
time-relocatable binaries. But, our first priorities should be the  
basics that are required to provide binaries. We can always revisit  
non-standard prefixes once we have all that working.




More information about the macports-dev mailing list