'port build' different than 'make all'

Ryan Schmidt ryandesign at macports.org
Thu Jan 3 18:33:05 PST 2008


On Jan 3, 2008, at 18:48, jcharum wrote:

> I have altered the GHC Portfile to have no build section (and no  
> pre-build or
> post-build sections) and to set (amongst other things):
>
> build.cmd make
> build.type gnu
> build.args ""
> build.target all
>
> (1)
> $ sudo port configure
> $ cd
> /opt/local/var/macports/build/ 
> _opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ 
> ghc/work/ghc-6.6.1
> $ sudo make all
>
> (2)
> $ sudo port configure
> $ sudo port build
>
>
> I think that running (1) and (2) should be equivalent.  However,  
> when I do
> this, I do not get the same object files.  Namely, when I install  
> with (1),
> my GHC works (at least for trivial examples).  When I install with  
> (2), I
> get weird errors (that I can describe further if requested).  I  
> have built
> GHC about 25 times (at ~4 hours/build) to narrow it down to this.  Can
> someone shed some light on why there is any difference?  I think it  
> must be
> somewhere in my environment, but I can't figure out what - I have  
> at least
> set the PATHs to be the same.  I am new to Portfile development and  
> was
> interested in helping to get a good build for GHC 6.6.1 on Leopard.
>
> If any more information is needed, I will happily provide it.   
> Thanks in
> advance for any help at all.

I am not really familiar with ghc, but I can tell you that MacPorts  
builds in a modified environment. Any PATH you have set in your  
terminal, for example, is ignored, and MacPorts uses its own PATH. A  
slew of other environment variables are also set by MacPorts. I can't  
name them all off the top of my head but you can peek through the  
sources in src/port1.0 such as portconfigure.tcl and portbuild.tcl.



More information about the macports-dev mailing list