Macports's buggy configure scripts

Juan Manuel Palacios jmpp at macports.org
Fri May 9 00:01:13 PDT 2008


On May 8, 2008, at 10:13 PM, Shreevatsa R wrote:

> The site doesn't seem to be working, so reporting a bug here:
>
> The guide says that to install two different MacPorts copies, one must
> use --with-tclpackage. But try this:
> ./configure --prefix=PREFIX1 --with-tclpackage=TCLPREFIX1 && make &&
> make install
> ./configure && make && make install.
> Now go in /opt/local and grep for TCLPREFIX1.
> Sigh.
>
> Actually, even installing two different things:
> ./configure --prefix=PREFIX1 --with-tclpackage=TCLPREFIX1 && make &&
> make install
> ./configure --prefix=PREFIX2 --with-tclpackage=TCLPREFIX2 && make &&
> make install
> did not work for me -- installing from the second prefix's binary
> would install it under the first prefix.




$[jmpp @MacBookPro: base](156/0,0) -> ./build.sh
Building sources...
./configure --prefix=/opt/mp1 --with-install-user=root --with-install- 
group=admin --with-tclinclude=/usr/include --with-tcl=/usr/lib --with- 
tclpackage=/opt/mp1/Library/Tcl && make

---snip---

$[jmpp @MacBookPro: base](157/0,0) -> sudo make install
Password:

Upgrading your existing MacPorts installation to the new namespace if  
necessary:

[ ! -d /opt/mp1/Library/Tcl/darwinports1.0 ] || rm -rf /opt/mp1/ 
Library/Tcl/darwinports1.0

---snip---

$[jmpp @MacBookPro: base](158/0,0) -> make distclean

---snip---

$[jmpp @MacBookPro: base](161/2,0) -> ./build.sh
Building sources...
./configure --prefix=/opt/mp2 --with-install-user=root --with-install- 
group=admin --with-tclinclude=/usr/include --with-tcl=/usr/lib --with- 
tclpackage=/opt/mp2/Library/Tcl && make

---snip---

$[jmpp @MacBookPro: base](162/0,0) -> sudo make install

Upgrading your existing MacPorts installation to the new namespace if  
necessary:

[ ! -d /opt/mp2/Library/Tcl/darwinports1.0 ] || rm -rf /opt/mp2/ 
Library/Tcl/darwinports1.0

---snip---

$[jmpp @MacBookPro: base](163/0,0) -> cd /opt/

$[jmpp @MacBookPro: opt](164/0,0) -> ls
total 0
drwxr-xr-x  13 root  admin   442B May  4 01:04 local/
drwxr-xr-x  14 root  admin   476B May  9 02:09 mp1/
drwxr-xr-x  14 root  admin   476B May  9 02:10 mp2/

$[jmpp @MacBookPro: opt](181/0,0) -> grep macports_conf_path mp1/ 
Library/Tcl/macports1.0/macports_autoconf.tcl
     variable macports_conf_path "/opt/mp1/etc/macports"

$[jmpp @MacBookPro: opt](184/0,0) -> grep macports_fastload mp1/bin/port
     [file join "/opt/mp1/Library/Tcl" macports1.0  
macports_fastload.tcl]}

$[jmpp @MacBookPro: opt](194/0,0) -> ls mp1/bin/portf
lrwxr-xr-x  1 root  admin     4B May  9 02:09 mp1/bin/portf@ -> port


$[jmpp @MacBookPro: opt](195/0,0) -> grep macports_conf_path mp2/ 
Library/Tcl/macports1.0/macports_autoconf.tcl
     variable macports_conf_path "/opt/mp2/etc/macports"

$[jmpp @MacBookPro: opt](196/0,0) -> grep macports_fastload mp2/bin/port
     [file join "/opt/mp2/Library/Tcl" macports1.0  
macports_fastload.tcl]}

$[jmpp @MacBookPro: opt](197/0,0) -> ls mp2/bin/portf
lrwxr-xr-x  1 root  admin     4B May  9 02:10 mp2/bin/portf@ -> port


	So, as you can see, everything works if you simply "distclean"  
between the first config and the second, to remove the build results  
*and* the autoconf generated files. I could agree that our build  
system maybe doesn't have the best of dependency logic or whatever  
(maybe proper cleaning actions?) if what you want doesn't work with a  
plain reconf or even a "make clean" between reconfs, but in such case  
we're open to hear suggestions (best if they come accompanied by  
patches!).

	As to why things are the way they are, e.g. not autoconfing the regen  
of the port(1) script , I honestly can't remember the reasoning that  
lead the original designers to write what we now have, a sed action to  
shoehorn the proper paths into the scripts. But, as stated, we're open  
to improvements of any kind.

	In any case, the point stands, what you want to do is achievable with  
a "distclean" in between reconfs.


>
>
> Somehow, it doesn't surprise me at all that even MacPorts's own
> configure scripts are broken.


	Do help us improve MacPorts if the impression you have is such a bad  
one.


-jmpp



More information about the macports-dev mailing list