[MacPorts] #71583: Multiple ports opportunistically use whatever they find on /usr/local

MacPorts noreply at macports.org
Wed Dec 18 09:17:19 UTC 2024


#71583: Multiple ports opportunistically use whatever they find on /usr/local
--------------------------+--------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  base          |    Version:  2.10.5
 Keywords:                |       Port:
--------------------------+--------------------
 AFAIK, `/usr/local` should just never be used for anything by default
 (unless portfile explicitly asks for it). I happened to have some libs
 installed there from ages ago (old version of `gfortran` from R), and once
 I removed that, a lot of ports are broken, since they linked to
 `/usr/local/lib/libgcc_s.1.dylib`. For example:
 {{{
 36-100% otool -L /opt/local/bin/smake
 /opt/local/bin/smake:
         /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
 (compatibility version 1.0.0, current version 275.0.0)
 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 (compatibility version 150.0.0, current version 511.1.0)
         /opt/local/lib/libintl.8.dylib (compatibility version 13.0.0,
 current version 13.0.0)
         /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
 current version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 117.0.0)
 }}}

 While it is my problem that I had an unneeded lib, it may be quite common,
 since some 3rd-party software, unfortunately, uses this location (not just
 Homebrew).

 Is there a way to prevent `/usr/local` being used, regardless of what
 happens to be installed there and whether a given port passes flags to
 `/usr/local` from its side (i.e. not portfile, but the source code)?

-- 
Ticket URL: <https://trac.macports.org/ticket/71583>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list