Opened 16 years ago
Closed 15 years ago
#17633 closed defect (fixed)
MacPorts port needs to be built from an /opt/local-installed MacPorts
Reported by: | blb@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.9.0 |
Component: | base | Version: | 1.7.0 |
Keywords: | prefix | Cc: | raimue (Rainer Müller) |
Port: |
Description
Building the MacPorts port with a MacPorts install not using /opt/local as its prefix can cause issues. Overriding prefix in the MacPorts Portfile (either directly or just overriding --prefix in configure.pre_args) doesn't work as MacPorts' configure (via MP_PATH_SCAN) will now ignore /opt/local, not your true MacPorts prefix. Hence it can pick up stuff installed in your true MacPorts install.
This is best demonstrated by installing MacPorts to an alternate path (for this example, /mp), and installing the tcl and curl ports. Now, if you just run the configure phase on the MacPorts port, you'll see
checking for Tcl configuration... found /usr/lib/tclConfig.sh checking for existence of /usr/lib/tclConfig.sh... loading checking for Tcl public headers... /usr/include checking for tclsh... /mp/bin/tclsh checking for Tcl package directory... /mp/lib/tcl8.5 checking whether tclsh was compiled with threads... yes checking for curl-config... /mp/bin/curl-config checking for curl_easy_strerror in -lcurl... no
Note that it now picks up the tcl and curl from your initial MacPorts install because you've overridden what it thinks of as prefix, and hence doesn't ignore the original install's prefix.
For now, the MacPorts Portfile errors out if you try to use a port from anywhere but /opt/local.
Change History (6)
comment:1 Changed 16 years ago by mmpestorich (Mike M Pestorich)
comment:2 Changed 15 years ago by jmroot (Joshua Root)
There were also multiple hardcoded /opt/local references in the preflight script, though that's now reduced to one in InstallationCheck.
comment:3 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts 1.8.0 → MacPorts 1.8.1 |
---|
comment:4 Changed 15 years ago by raimue (Rainer Müller)
Cc: | raimue@… added |
---|
Would configure.env PATH=/bin:/sbin:/usr/bin:/usr/sbin
in the MacPorts Portfile be a possible solution?
comment:5 Changed 15 years ago by blb@…
Milestone: | MacPorts 1.8.1 → MacPorts 1.9.0 |
---|
comment:6 Changed 15 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I was able to get around this by commenting out MP_PATH_SCAN in configure.ac and regenerating the configure files by running regen.sh.
I don't know the ramifications of disabling the MP_PATH_SCAN routine, but do know that by enusring my path is set correctly prior to installing the port and disabling that routine allowed the configure script to properly detect the correct tcl and curl installations when installing to a different prefix.