Ian Wadham | 1 Jan 03:17 2012
Picon

System Tools and UNIX Development in Xcode 4.2

At http://www.macports.org/install.php, re Xcode,  it says:

"Ensure that the optional components for command line development are installed
("UNIX Development", plus "System Tools" in newer versions, or "Command Line
Support" in older ones)."

After upgrading to Lion 4.7.2 and downloading Xcode 4.2.1 from the App Store, I could
not find those components anywhere in Lion and Xcode, but my uninstall and rebuild
of all my ports went OK and so did the development work I do at the command line.

About 6 months ago I obtained Xcode 4.0.x from my Macbook's installation disks, and
got the UNIX components from there.  Would I be correct in assuming that Xcode 4.2.1
is now bundling in those components and that the above advice is not needed for 
Xcode 4.2.1?  Or are my System Tools, Command Line Support and X11 out of date?

Regards, Ian W.

Brandon Allbery | 1 Jan 03:48 2012
Picon

Re: System Tools and UNIX Development in Xcode 4.2

On Sat, Dec 31, 2011 at 21:17, Ian Wadham <iandw.au <at> gmail.com> wrote:
At http://www.macports.org/install.php, re Xcode,  it says:

"Ensure that the optional components for command line development are installed
("UNIX Development", plus "System Tools" in newer versions, or "Command Line
Support" in older ones)."

After upgrading to Lion 4.7.2 and downloading Xcode 4.2.1 from the App Store, I could
not find those components anywhere in Lion and Xcode, but my uninstall and rebuild
of all my ports went OK and so did the development work I do at the command line.

Lion and Xcode 4 both install their respective formerly-optional components by default now, and neither has any user-visible components; this is a consequence of their being packaged as online-only App Store-compatible "lumps".  MacPorts' documentation is lagging a bit behind changes to itself, OS X, and Xcode.  (Feel free to submit documentation patches; the lag is a consequence of being an as-time-allows community effort, and probably of dev types generally being not so good with documenting.)

--
brandon s allbery                                      allbery.b <at> gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms

<div><div dir="ltr">On Sat, Dec 31, 2011 at 21:17, Ian Wadham <span dir="ltr">&lt;<a href="mailto:iandw.au <at> gmail.com">iandw.au <at> gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote">
At <a href="http://www.macports.org/install.php" target="_blank">http://www.macports.org/install.php</a>, re Xcode, &nbsp;it says:<br><br>
"Ensure that the optional components for command line development are installed<br>
("UNIX Development", plus "System Tools" in newer versions, or "Command Line<br>
Support" in older ones)."<br><br>
After upgrading to Lion 4.7.2 and downloading Xcode 4.2.1 from the App Store, I could<br>
not find those components anywhere in Lion and Xcode, but my uninstall and rebuild<br>
of all my ports went OK and so did the development work I do at the command line.<br>
</blockquote>
<div><br></div>
<div>Lion and Xcode 4 both install their respective formerly-optional components by default now, and neither has any user-visible components; this is a consequence of their being packaged as online-only App Store-compatible "lumps". &nbsp;MacPorts' documentation is lagging a bit behind changes to itself, OS X, and Xcode. &nbsp;(Feel free to submit documentation patches; the lag is a consequence of being an as-time-allows community effort, and probably of dev types generally being not so good with documenting.)</div>
<div><br></div>
</div>-- <br>brandon s allbery &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:allbery.b <at> gmail.com" target="_blank">allbery.b <at> gmail.com</a><br>wandering unix systems administrator (available) &nbsp; &nbsp; (412) 475-9364 vm/sms<br><br>
</div></div>
Ian Wadham | 1 Jan 04:01 2012
Picon

Re: System Tools and UNIX Development in Xcode 4.2

On 01/01/2012, at 1:48 PM, Brandon Allbery wrote:
> On Sat, Dec 31, 2011 at 21:17, Ian Wadham <iandw.au <at> gmail.com> wrote:
> At http://www.macports.org/install.php, re Xcode,  it says:
> 
> "Ensure that the optional components for command line development are installed
> ("UNIX Development", plus "System Tools" in newer versions, or "Command Line
> Support" in older ones)."
> 
> After upgrading to Lion 4.7.2 and downloading Xcode 4.2.1 from the App Store, I could
> not find those components anywhere in Lion and Xcode, but my uninstall and rebuild
> of all my ports went OK and so did the development work I do at the command line.
> 
> Lion and Xcode 4 both install their respective formerly-optional components by default now, and neither
has any user-visible components; this is a consequence of their being packaged as online-only App
Store-compatible "lumps".  MacPorts' documentation is lagging a bit behind changes to itself, OS X, and Xcode.

Thanks very much, Brandon, that sets my mind at rest.  

> (Feel free to submit documentation patches; the lag is a consequence of being an as-time-allows
community effort, and probably of dev types generally being not so good with documenting.)

Fair enough re the first reason.  Re the second: it was ever thus … :-(

Cheers, Ian W.

Ian Wadham | 1 Jan 05:13 2012
Picon

Clang, GCC and the kdegames4 port

Using OS X Lion 10.7.2, Xcode 4.2.1 and Macports 2.0.3, I uninstalled
all my existing ports, following the Migration procedure, then I installed
the qt4-mac, kdelibs4 and kdegames4 ports (and dependencies).

kdegames4 failed to compile with Clang, which diagnosed source code
errors in two code files, quite correctly IMO.  I bludgeoned the build into
submission with repeated edits of Macports' transient copy of the source
code and eventually got a successful build with Clang (I am a KDE Games
developer and know that code base reasonably well).

The kdegames4 code compiles successfully, without alteration, if you use
configure.compiler=llvm-gcc-4.2, i.e. Clang found real coding errors which
GCC does not find and has not found over several years of KDE releases.
The errors have had no effect on code at run time.

I went back to the KDE Games list to get to the bottom of the problem and
the situation is this:

 - In both cases, the errors were to do with code that is declared and defined
   in full in a C++ class in a header file, so the code is not actually compiled
   until it is included in some *.cpp file.

 - It appears that Clang and GCC handle headers and includes differently
   and perhaps that Clang does more syntactic and semantic analysis of
   headers, whereas GCC scans the headers but only compiles the methods
   that are used in the *.cpp file and does not care if they are declared out
   of order.

 - In one case, in KDE Games, there is a method in a header that still
   contains legacy Qt 3 code, but no *.cpp files use that particular method
   and GCC lets it pass.  In the other, a header uses a stdlib function whose
   declaration has not yet been included in the *.cpp file.  It can be corrected
   by changing the order of the includes in the *.cpp file.

 - Both errors will get fixed, but not until KDE SC 4.8.1 at least.  The release
   of KDE SC 4.8.0 is in its last stages ATM.

 - There will be no further releases of KDE SC 4.7.  Release 4.7.4 is the last.
   The KDE release guys have decided that.

 - So, if the port of kdegames4  <at> 4.7.4 or  <at> 4.8.0 is to compile with Clang within
   the next six months or so, it will be necessary to patch it at the Macports end.
   I can provide the patch, if required.

I thought I should tell the list the above for general info re the transition from GCC
to Clang.  It looks as though Clang does a more thorough job in some ways.

Should I submit a ticket and include the patch?

Cheers, Ian W.

Brandon Allbery | 1 Jan 05:32 2012
Picon

Re: Clang, GCC and the kdegames4 port

On Sat, Dec 31, 2011 at 23:13, Ian Wadham <iandw.au <at> gmail.com> wrote:
 - Both errors will get fixed, but not until KDE SC 4.8.1 at least.  The release
  of KDE SC 4.8.0 is in its last stages ATM.

 - There will be no further releases of KDE SC 4.7.  Release 4.7.4 is the last.
  The KDE release guys have decided that.

 - So, if the port of kdegames4 <at> 4.7.4 or <at> 4.8.0 is to compile with Clang within
  the next six months or so, it will be necessary to patch it at the Macports end.
  I can provide the patch, if required.

I thought I should tell the list the above for general info re the transition from GCC
to Clang.  It looks as though Clang does a more thorough job in some ways.

Should I submit a ticket and include the patch?

I *think* the prevailing notion is that, if upstream plans to address it, we just switch to llvm-gcc-4.2 (that's how I've been making KDE stuff build in general here) in the Portfile and wait for upstream to catch up, rather than patch locally and have to remove the patches later (which is more intrusive and labor-intensive).

And yes, clang is much more strict about errors, and also has better error messages.  This is a good thing.  It's just that MacPorts is about making stuff work on OS X with the minimum reasonable effort, not so much about maintaining its own "forks" of stuff (regardless of how temporary).

--
brandon s allbery                                      allbery.b <at> gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms

<div><div dir="ltr">On Sat, Dec 31, 2011 at 23:13, Ian Wadham <span dir="ltr">&lt;<a href="mailto:iandw.au <at> gmail.com">iandw.au <at> gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote">
&nbsp;- Both errors will get fixed, but not until KDE SC 4.8.1 at least. &nbsp;The release<br>
 &nbsp; of KDE SC 4.8.0 is in its last stages ATM.<br><br>
&nbsp;- There will be no further releases of KDE SC 4.7. &nbsp;Release 4.7.4 is the last.<br>
 &nbsp; The KDE release guys have decided that.<br><br>
&nbsp;- So, if the port of kdegames4  <at> 4.7.4 or  <at> 4.8.0 is to compile with Clang within<br>
 &nbsp; the next six months or so, it will be necessary to patch it at the Macports end.<br>
 &nbsp; I can provide the patch, if required.<br><br>
I thought I should tell the list the above for general info re the transition from GCC<br>
to Clang. &nbsp;It looks as though Clang does a more thorough job in some ways.<br><br>
Should I submit a ticket and include the patch?<br>
</blockquote>
<div><br></div>
<div>I *think* the prevailing notion is that, if upstream plans to address it, we just switch to llvm-gcc-4.2 (that's how I've been making KDE stuff build in general here) in the Portfile and wait for upstream to catch up, rather than patch locally and have to remove the patches later (which is more intrusive and labor-intensive).</div>
<div><br></div>
<div>And yes, clang is much more strict about errors, and also has better error messages. &nbsp;This is a good thing. &nbsp;It's just that MacPorts is about making stuff work on OS X with the minimum reasonable effort, not so much about maintaining its own "forks" of stuff (regardless of how temporary).</div>
</div>
<div><br></div>-- <br>brandon s allbery &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:allbery.b <at> gmail.com" target="_blank">allbery.b <at> gmail.com</a><br>wandering unix systems administrator (available) &nbsp; &nbsp; (412) 475-9364 vm/sms<br><br>
</div></div>
Shiyuan | 2 Jan 00:17 2012
Picon

port install failed

Hello, 

     I get an error when I try to do 
     sudo port install emacs
 the error is :
Error: Unable to execute port: couldn't open "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/emacs/work/.macports.emacs.state": permission denied

I check the permission which is : -rw-r--r--  root. 
But I notice the file size is 0. 

What could go wrong? Thanks. 
 
<div>
<p>Hello,&nbsp;</p>
<div>&nbsp; &nbsp; &nbsp;I get an error when I try to do&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp;sudo port install emacs</div>
<div>&nbsp;the error is :</div>
<div>
<div>Error: Unable to execute port: couldn't open "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/emacs/work/.macports.emacs.state": permission denied</div>
</div>
<div><br></div>
<div>I check the permission which is :&nbsp;-rw-r--r-- &nbsp;root.&nbsp;</div>
<div>But I notice the file size is 0.&nbsp;</div>
<div><br></div>
<div>What could go wrong? Thanks.&nbsp;</div>
<div>&nbsp;</div>
</div>
Ryan Schmidt | 2 Jan 00:26 2012

Re: port install failed


On Jan 1, 2012, at 17:17, Shiyuan wrote:

>      I get an error when I try to do 
>      sudo port install emacs
>  the error is :
> Error: Unable to execute port: couldn't open
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/emacs/work/.macports.emacs.state":
permission denied
> 
> I check the permission which is : -rw-r--r--  root. 
> But I notice the file size is 0. 
> 
> What could go wrong? Thanks. 

It sounds like the ownership is wrong.

Did you perhaps initially "port install emacs" (without "sudo"), then try again with "sudo"? Remember to
always use "sudo" from the beginning.

Try cleaning both with and without "sudo" before trying again:

port clean emacs
sudo port clean emacs

Ryan Schmidt | 2 Jan 00:30 2012

Re: Clang, GCC and the kdegames4 port

You can go either way with it, really. If there is a patch available to make it compile with clang, and
upstream has accepted it for inclusion in future version X, then we could add it too, and remove it later
once we update to version X. Or we could tell the port to use llvm-gcc-4.2 instead of clang, and remove that
when we update to version X. We just have to remember to do either of those things when version X comes
around. By using a patch, especially one already incorporated upstream, it's impossible not to
remember, because the patch will fail and thus remind us. If we instead just set the port to use
llvm-gcc-4.2 instead of clang, we might forget to remove that later. In either case, it would be a good idea
to add a comment to the Portfile saying to remove the workaround when updati
 ng to version X.

Jeremy Lavergne | 2 Jan 00:41 2012

Re: port install failed

Likely you need to run `sudo port clean emacs` and then try again

Shiyuan <gshy2014 <at> gmail.com> wrote:

>Hello,
>     I get an error when I try to do
>     sudo port install emacs
> the error is :
>Error: Unable to execute port: couldn't open
>"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/emacs/work/.macports.emacs.state":
>permission denied
>
>I check the permission which is : -rw-r--r--  root.
>But I notice the file size is 0.
>
>What could go wrong? Thanks.
>_______________________________________________
>macports-users mailing list
>macports-users <at> lists.macosforge.org
>http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Shiyuan | 2 Jan 00:51 2012
Picon

Re: port install failed

It works. Thanks. 

On Sun, Jan 1, 2012 at 5:41 PM, Jeremy Lavergne <jeremy <at> lavergne.gotdns.org> wrote:
Likely you need to run `sudo port clean emacs` and then try again

Shiyuan <gshy2014 <at> gmail.com> wrote:

>Hello,
>     I get an error when I try to do
>     sudo port install emacs
> the error is :
>Error: Unable to execute port: couldn't open
>"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/emacs/work/.macports.emacs.state":
>permission denied
>
>I check the permission which is : -rw-r--r--  root.
>But I notice the file size is 0.
>
>What could go wrong? Thanks.
>_______________________________________________
>macports-users mailing list
>macports-users <at> lists.macosforge.org
>http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


<div>
<p>It works. Thanks.&nbsp;<br><br></p>
<div class="gmail_quote">On Sun, Jan 1, 2012 at 5:41 PM, Jeremy Lavergne <span dir="ltr">&lt;<a href="mailto:jeremy <at> lavergne.gotdns.org">jeremy <at> lavergne.gotdns.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Likely you need to run `sudo port clean emacs` and then try again<br><div><div class="h5">
<br>
Shiyuan &lt;<a href="mailto:gshy2014 <at> gmail.com">gshy2014 <at> gmail.com</a>&gt; wrote:<br><br>
&gt;Hello,<br>
&gt; &nbsp; &nbsp; I get an error when I try to do<br>
&gt; &nbsp; &nbsp; sudo port install emacs<br>
&gt; the error is :<br>
&gt;Error: Unable to execute port: couldn't open<br>
&gt;"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/emacs/work/.macports.emacs.state":<br>
&gt;permission denied<br>
&gt;<br>
&gt;I check the permission which is : -rw-r--r-- &nbsp;root.<br>
&gt;But I notice the file size is 0.<br>
&gt;<br>
&gt;What could go wrong? Thanks.<br>
</div></div>&gt;_______________________________________________<br>
&gt;macports-users mailing list<br>
&gt;<a href="mailto:macports-users <at> lists.macosforge.org">macports-users <at> lists.macosforge.org</a><br>
&gt;<a href="http://lists.macosforge.org/mailman/listinfo.cgi/macports-users" target="_blank">http://lists.macosforge.org/mailman/listinfo.cgi/macports-users</a><br><br>
</blockquote>
</div>
<br>
</div>

Gmane