Changes between Version 141 and Version 142 of FAQ


Ignore:
Timestamp:
Nov 13, 2015, 1:20:01 PM (9 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

minor edits to /usr/local section including adding a note to that trace mode doesn't work on El Capitan yet

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v141 v142  
    7676=== So with MacPorts under /opt/local I can use /usr/local freely? === #usrlocal
    7777
    78 No, not entirely. Even with MacPorts living elsewhere, `/usr/local` can still interfere.
     78No. Even though MacPorts is installed elsewhere, software installed in `/usr/local` can still interfere with MacPorts.
    7979Some software (especially the GNU auto* tools and gcc) looks into `/usr/local` for external headers, libraries, and binaries. Certain ports might (and do) fail to build because during their build something incompatible is found and picked up
    8080from `/usr/local`. Good ports avoid this by explicitly specifying `--with-libfoo=/opt/local/lib/` or explicitly disabling all such possible dependencies altogether with `--disable-foo` or `--without-bar` but not all ports are able to do that.
    8181
    8282If you ask on a MacPorts mailing list about a port failing to build because it chokes on something
    83 that it found and picked up in `/usr/local` you will probably be advised to temporarily rename
    84 `/usr/local` to make it disappear entirely for the duration of the build.
    85 Obviously, this wouldn't be possible to do if MacPorts itself lived under `/usr/local`.
    86 
    87 Note that starting with 2.3.0, MacPorts can automatically hide `/usr/local` (and all other files a port does not depend on) from ports' build systems. This feature is called trace mode and is activated by providing the `-t` flag to `port`, e.g.
     83that it found and picked up in `/usr/local` you will be asked to remove what you've installed in `/usr/local`
     84or to temporarily rename `/usr/local` to make it disappear entirely for the duration of the build.
     85
     86Note that starting with 2.3.0, MacPorts can automatically hide `/usr/local` (and all other files a port does not depend on) from ports' build systems.
     87This feature is called trace mode and is activated by providing the `-t` flag to `port`, e.g.
    8888{{{
    8989sudo port -t install <portname>
    9090}}}
    9191You'll notice a small performance penalty when using trace mode, and a very small number of ports will fail to build due to the changes in the environment (currently, only the `go` and `sbcl` ports are known to be affected). Warnings about sandbox violations are normal when using trace mode. If a port fails to build in trace mode, the problem is very likely a bug. You should file a ticket if none exists yet.
     92
     93Note that trace mode in MacPorts 2.3.4 and earlier is not compatible with El Capitan.
     94A fix has been committed in r141420 but not yet released in a stable version of MacPorts.
    9295
    9396=== How do I remove or uninstall MacPorts? === #uninstall