<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Urania &#187; MacPorts</title>
	<atom:link href="http://iparrizar.mnstate.edu/~juan/urania/category/macos/macports/feed/" rel="self" type="application/rss+xml" />
	<link>http://iparrizar.mnstate.edu/~juan/urania</link>
	<description>A blog named for the muse of Astronomy containing musings by an astronomer</description>
	<lastBuildDate>Fri, 06 Nov 2009 01:44:27 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SSH2 extension activation in PHP 5.3.0</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2009/10/13/ssh2-extension-activation-in-php-530/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2009/10/13/ssh2-extension-activation-in-php-530/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 01:39:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2009/10/13/getting-ssh2-support-in-php-5-3-0-under-snow-leopard/</guid>
		<description><![CDATA[This is an upgraded tutorial to getting SSH2 support under PHP 5.3.0 that I wrote a while back. Getting SSH2 support in PHP is useful for maintaining WordPress blogs. It would be nice if such an extension were not necessary, but this is the only way WordPress supports SSH administration through their web interface.
The big [...]]]></description>
			<content:encoded><![CDATA[<p>This is an upgraded tutorial to getting SSH2 support under <a href="http://www.php.net/">PHP</a> 5.3.0 that <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/12/11/activating-ssh-support-in-macports-php/">I wrote a while back</a>. Getting SSH2 support in PHP is useful for maintaining <a href="http://www.wordpress.com/">WordPress</a> blogs. It would be nice if such an extension were not necessary, but this is the only way WordPress supports SSH administration through their web interface.</p>
<p>The big difference is that I will now be using the built-in Apache2 and PHP 5.3.0 under <a href="http://www.apple.com/macosx/">MacOS 10.6.1</a>. I have gotten tired of the fact that everytime <a href="http://www.macports.org/">MacPorts</a> updates it PHP installation, it tends to clobber the <code>php.ini</code> file for the site, requiring me to re-setup everything. Furthermore, I am also a bit tired of having MacPorts install its own version of everything I already have under MacOS X (such as Apache2, PHP, and MySQL). I understand their philosophy (and the practicality of it), but I am trying to keep my computer as clean as possible. As such, I am only using MacPorts to provide libssh2 to the SSH2 extension for PHP.</p>
<p>I noticed that the WordPress code had ssh2 support built-in, so all I need to is activate SSH2 support in the MacPorts installed PHP and I should be able to use SFTP in WordPress to handle the upgrades. I poked around and found <a href="http://kevin.vanzonneveld.net/techblog/article/make_ssh_conanections_with_php/">this posting</a> outlining the process for adding ssh2 support to Ubuntu. It guided me in developing this list of hints:</p>
<ol>
<li>If you haven&#8217;t already, start by installing libssh2 via MacPorts using the command:<br />
<pre>sudo port install libssh2</pre></li>
<li>Download the necessary SSH2 PHP extension using the build in PECL command<br />
<pre>sudo pecl download channel://pecl.php.net/ssh2-0.11.0</pre>The <code>sudo</code> is necessary because a lock file needs to be created during the download in <code>/usr/lib/php</code>, which is a protected directory. However, the file is downloaded to the current directory. Once the download is complete, we will need to unpack the SSH2 extension and go into its directory:<br />
<pre><pre>tar xzvf ssh2-0.11.0.tgz
cd ssh2-0.11.0</pre></pre>If you try to do the normal <code>phpize/configure/make</code> sequence for compiling PHP extensions at this point, you will get a string of error messages ending with something like<br />
<pre>/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/download/ssh2-0.11.0/ssh2.c:1105: warning: passing argument 4 of &#039;add_assoc_stringl_ex&#039; discards qualifiers from pointer target type</pre><br />
This is occuring because there is <a href="http://pecl.php.net/bugs/bug.php?id=16727">an incompatibility between this ssh2 extension code and PHP 5.3.0</a>. It can be patched by downloading the ssh2-php53.patch file from <a href="http://remi.fedorapeople.org/ssh2-php53.patch">http://remi.fedorapeople.org/ssh2-php53.patch</a> and applying the patch from the command line in the ssh2-0.11.0 directory<br />
<pre><pre>curl -o ssh2-php53.patch http://remi.fedorapeople.org/ssh2-php53.patch
patch &lt; ssh2-patch53.patch</pre></pre>Once you have done that, you can finish the SSH2 PHP extension compilation using<br />
<pre><pre>phpize
./configure --with-ssh2=/opt/local
make
sudo make install</pre></pre>The final command informed me the ssh2.so library was placed in <code>/usr/lib/php/extensions/no-debug-non-zts-20090626/</code></p>
</li>
<li>Now you need to make sure PHP loads the new module, so we open the PHP configuration file <code>/etc/php.ini</code> and edit the extension_dir line to point the extension directory above:<br />
<pre>extension_dir = &quot;/usr/lib/php/extensions/no-debug-non-zts-20090626/&quot;</pre><br />
and then add the following line to the end of the section on &#8220;Dynamic Extensions&#8221;:<br />
<pre>extension=ssh2.so</pre>If you edited everything properly, a simple <code>php -v</code> from the command line should NOT trigger any errors.</p>
</li>
<li>Finally, I restart the apache2 server so that the reconfigured PHP is loaded using<br />
<pre>sudo apachectl restart</pre>At this point, I checked (via the <code>phpinfo();</code> command to see if the web server was supporting SSH. Near the bottom of the <code>phpinfo();</code> listing is a listed of &#8220;Registered PHP Streams&#8221;. As <a href="http://bugssite.org/blog/2008/09/07/does-your-wordpress-server-support-ssh2/">noted here</a>, it should incude &#8220;ssh2.shell&#8221;, &#8220;ssh2.exec&#8221;, &#8220;ssh2.tunnel&#8221;, &#8220;ssh2.scp&#8221;, and &#8220;ssh2.sftp&#8221;. If it does, you have enabled SSH support for Apache2 driven PHP pages under MacPorts.</p>
</li>
<li>If you are doing this to get WordPress 2.7 automatic installation working, you will notice now when the automatic installation dialog box pops up, in addition to ftp and ftps, you now have an ssh option.<img src="http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/wordpresssnap3.png" alt="" width="380" height="77" /></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2009/10/13/ssh2-extension-activation-in-php-530/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activating SSH support in MacPorts PHP</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/12/11/activating-ssh-support-in-macports-php/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/12/11/activating-ssh-support-in-macports-php/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 18:35:18 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Command Line Tricks]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/12/11/activating-ssh-support-in-macports-php/</guid>
		<description><![CDATA[[I have made an updated version of these instructions for adding the SSH2 PHP extension to the pre-installed PHP 5.3.0 installation on MacOS 10.6 available here.]
I just upgraded the software on this blog to WordPress 2.7. The major new feature I am interested in is automatic upgrading, which could prove quite a time saver. Unfortunately, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>[I have made an updated version of these instructions for adding the SSH2 PHP extension to the pre-installed PHP 5.3.0 installation on MacOS 10.6 <a href="http://iparrizar.mnstate.edu/~juan/urania/2009/10/13/ssh2-extension-activation-in-php-530/">available here</a>.]</strong></p>
<p>I just upgraded the software on this blog to <a href="http://wordpress.org/development/2008/12/coltrane/">WordPress 2.7</a>. The major new feature I am interested in is automatic upgrading, which could prove quite a time saver. Unfortunately, this automatic upgrading uses only FTP (which is totally insecure) or FTPS (which requires me to set up an SSL certificate).</p>
<p>I noticed that the WordPress code had ssh2 support built-in, so all I need to is activate SSH2 support in the MacPorts installed PHP and I should be able to use SFTP in WordPress to handle the upgrades. I poked around and found <a href="http://kevin.vanzonneveld.net/techblog/article/make_ssh_conanections_with_php/">this posting</a> outlining the process for adding ssh2 support to Ubuntu. It guided me in developing this list of hints:</p>
<ol>
<li>Start by installing libssh2 via MacPorts using the command:<br />
      <pre><pre>
sudo port install libssh2
</pre></pre>
    </li>
<li>Once it is activated, link the libssh and PHP together using the <a href="http://kevin.vanzonneveld.net/techblog/tag/pecl/">PECL</a> module SSH2. Unfortunately, <a href="http://www.mail-archive.com/macports-users%40lists.macosforge.org/msg06734.html">directly installing the module with PECL under MacPorts is troublesome</a>, so I just used PECL to download the module.<br />
      <pre><pre>
pecl download ssh2
</pre></pre>triggered the following error (since ssh2 is apparently beta),<br />
      <pre><pre>
Failed to download pecl/ssh2 within preferred state &quot;stable&quot;, latest release is version 0.11.0, stability &quot;beta&quot;, use &quot;channel://pecl.php.net/ssh2-0.11.0&quot; to install
Cannot initialize &#039;ssh2&#039;, invalid or missing package file
Package &quot;ssh2&quot; is not valid
download failed
</pre></pre>so I used<br />
      <pre><pre>
pecl download channel://pecl.php.net/ssh2-0.11.0
</pre></pre>as suggested and was able to download the PHP library for SSH2. Once the download was complete, I started on the standard compilation sequence for a PHP library<br />
      <pre><pre>
tar xzvf ssh2-0.11.0.tgz
cd ssh2-0.11.0
phpize
./configure --with-ssh2=/opt/local
make
sudo make install
</pre></pre>The final command informed me the ssh2.so library was placed in <code>/opt/local/lib/php/extensions/no-debug-non-zts-20060613/</code>
    </li>
<li>Now you need to make sure PHP loads the new module, so we open the PHP configuration file <code>/opt/local/etc/php.ini</code> and edit the extension_dir line to point the extension directory above:<br />
      <pre><pre>
extension_dir = &quot;/opt/local/lib/php/extensions/no-debug-non-zts-20060613/&quot;
</pre></pre>and then add the following line to the end of the section on &#8220;Dynamic Extensions&#8221;:<br />
      <pre><pre>
extension=ssh2.so
</pre></pre>If you edited everything properly, a simple <code>php -v</code> from the command line should NOT trigger any errors.
    </li>
<li>Finally, I restart the apache2 server so that the reconfigured PHP is loaded using<br />
      <pre><pre>
sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart
</pre></pre>At this point, I checked (via the <code>phpinfo();</code> command to see if the web server was supporting SSH. Near the bottom of the <code>phpinfo();</code> listing is a listed of &#8220;Registered PHP Streams&#8221;. As <a href="http://bugssite.org/blog/2008/09/07/does-your-wordpress-server-support-ssh2/">noted here</a>, it should incude &#8220;ssh2.shell&#8221;, &#8220;ssh2.exec&#8221;, &#8220;ssh2.tunnel&#8221;, &#8220;ssh2.scp&#8221;, and &#8220;ssh2.sftp&#8221;. If it does, you have enabled SSH support for Apache2 driven PHP pages under MacPorts.
    </li>
<li>If you are doing this to get WordPress 2.7 automatic installation working, you will notice now when the automatic installation dialog box pops up, in addition to ftp and ftps, you now have an ssh option.<br />
    <img src="http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/wordpresssnap3.png" height="77" width="380"/></li>
<li>
<p>Now that I got this working, I&#8217;ll just have to keep an eye out for any future MacPort updates to PHP and make sure they don&#8217;t overwrite the</p>
<p><code>/opt/local/etc/php.ini</code></p>
<p>file or the extensions directory where I installed ssh2.</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/12/11/activating-ssh-support-in-macports-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Installing old libxml2 ports with MacPorts</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/fixing-libxml2-problems-with-macports/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/fixing-libxml2-problems-with-macports/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 18:37:57 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/fixing-libxml2-problems-with-macports/</guid>
		<description><![CDATA[There is a problem with libxml2 from version 2.7.1 onward where it completely deletes any greater than (&#38;gt;) and less than symbols (&#38;lt;) sent to it. This is messing up my blog posting unless I do it within the WordPress interface since attempts to use xmlrpc.php use PHP, which is compiled against libxml2, and thus [...]]]></description>
			<content:encoded><![CDATA[<p>There is a problem with <code>libxml2</code> from version 2.7.1 onward where it completely deletes any greater than (<code>&amp;gt;</code>) and less than symbols (<code>&amp;lt;</code>) sent to it. This is messing up my blog posting unless I do it within the WordPress interface since attempts to use <code>xmlrpc.php</code> use PHP, which is compiled against <code>libxml2</code>, and thus the posting gets mangled.</p>
<p>The solution suggested on the <a href="http://bugs.php.net/bug.php?id=45996">PHP boards</a> is to compile PHP against <code>expat</code>. This would be kind of a pain for me since I am using the <a href="http://www.macports.org/" title="MacPorts homepage">MacPorts</a> install of PHP. So I looked into rolling back to an earlier version of libxml2 using MacPorts. The solution was originally outlined in t<a href="http://www.stephenchu.com/2006/12/specifying-ruby-184-to-install-using.html">his blog post by Stephen Chu on how to install earlier versions of ruby under DarwinPorts</a>, I have updated it for MacPorts. The key is to create a local MacPorts repository with the version of the port you want copied over to it.</p>
<ol>
<li>First I identified the version of the libxml2 portfile I wanted by going to <a href="http://trac.macports.org/browser/trunk/dports/textproc/libxml2/Portfile">http://trac.macports.org/browser/trunk/dports/textproc/libxml2/Portfile</a> and entering revisions into the &#8220;View revision&#8221; box until I found the appropriate version of the Portfile linking to libxml2 2.6.32 instead of 2.7.1. This turned out to be revision 40211 (actually 39551).
</li>
<li>I created a directory to contain my MacPorts repository at <code>/Users/Shared/dports/</code> and after creating that directory, I edited the MacPorts configuration file <code>/opt/local/etc/macports/sources.conf</code> to include the line:
<p>  <code>file:///Users/Shared/dports</code></p>
<p>  and you should make this line appear before the &#8220;rsync&#8221; or svn&#8221; port listing in the config file, otherwise it defaults to using that version of the port during the install.</p>
</li>
<li>I then installed the old libxml2 port into my local MacPorts respository using subversion:
<p>    <pre><pre>
svn co --revision 40211 http://trac.macports.org/browser/trunk/dports/textproc/libxml2/ textproc/libxml2/
</pre></pre>and then I updated the MacPorts index:</p>
<p>    <code>portindex /Users/Shared/dports</code></p>
<p>    With this done, I can see the two versions of <code>libxml2</code> in my ports list, when I issue a</p>
<p>    <code>port list libxml2</code></p>
<p>    the result is:</p>
<p>    <code>libxml2 @2.7.2 textproc/libxml2 libxml2 @2.6.32 textproc/libxml2</code></p>
<p>    showing the current <code>libxml2</code> version in MacPorts and the older one in my repository.</p>
</li>
<li>Now I can install the older version of libxml2 by first forcing removal of the current version and then installing the old version:
<p>  <code>sudo port -f uninstall libxml2 @2.7.2_1+darwin_9 sudo port install libxml2 @2.6.32</code></p>
<p>  [<strong>Warning:</strong> Unless you place the <code>file:///Users/Shared/dports</code> line before any rsync/svn lines of the config file noted in step 2, this port install command installs the current version instead of the old version]</p>
</li>
<li>I had to forcible uninstall and then reinstall libxslt but then my reinstall of php within MacPorts went fine. And I can now use WordPress again without any issues when using a remote blog editor.</li>
</ol>
<p>I just figured in case anyone else wanted to use an older MacPort port they could use this to figure out how.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/fixing-libxml2-problems-with-macports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacPorts Misbehavior Update</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/macports-misbehavior-update/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/macports-misbehavior-update/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 17:14:28 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/macports-misbehavior-update/</guid>
		<description><![CDATA[FreeType issues under Leopard Resolved: The MacPorts installation of FreeType will now compile a version under Leopard that does NOT throw a

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

error when fonts are used in PHP routines (fuller notes on this problem here although with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>FreeType issues under Leopard Resolved:</strong> The <a href="http://www.macports.org/">MacPorts</a> installation of FreeType will now compile a version under Leopard that does NOT throw a</p>
<p><pre><pre>
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
</pre></pre></p>
<p>error when fonts are used in PHP routines (<a href="http://iparrizar.mnstate.edu/~juan/urania/2008/09/05/forking-problems-with-freetype-solved/">fuller notes on this problem here</a> although with my &#8220;hacked&#8221; fix, which is no longer needed). This problem as originally reported under <a href="https://trac.macports.org/ticket/15909">Trouble Ticket #15909 on MacPorts</a>.</p>
<p><strong>Careful with that Apache2 upgrade, Eugene:</strong> I also discovered I have to be careful when updating <code>apache2</code> under MacPorts in that it actually wiped out some of the configuration files stored in <code>/opt/local/apache2/conf/</code>, specifically it overwrote my modified versions of the <code>/opt/local/apache2/conf/extra/httpd-dav.conf</code> file and <code>/opt/local/apache2/conf/extra/http-userdir.conf</code> files. So now I am keeping copies of everything in <code>/opt/local/apache2/conf</code> backed up so I can roll back my changes after an upgrade of <code>apache2</code> in MacPorts.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/12/05/macports-misbehavior-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fork()ing Problems with FreeType solved</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/09/05/forking-problems-with-freetype-solved/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/09/05/forking-problems-with-freetype-solved/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 17:32:28 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/09/05/forking-problems-with-freetype-solved/</guid>
		<description><![CDATA[[The hack reported here for getting FreeType compiled under MacPorts in a fully Leopard-compatible way is no longer necessary as current versions of MacPorts properly handle this now.]
As I reported on my blog here, here, and here, I have been having problems with my PHP programs on my web server that use fonts crashing with [...]]]></description>
			<content:encoded><![CDATA[<p><b>[The hack reported here for getting FreeType compiled under MacPorts in a fully Leopard-compatible way is no longer necessary as current versions of MacPorts properly handle this now.]</b></p>
<p>As I reported on my blog <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/08/14/php-on-leopard-damn-irritating-sometimes/">here</a>, <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/08/14/fixing-my-php-woes-with-macports/">here,</a> and <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/08/18/php-woes-only-fixed-briefly/">here</a>, I have been having problems with my PHP programs on my web server that use fonts crashing with errors of the form:</p>
<p><pre><pre>
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
</pre></pre></p>
<p>The problem turns out to not lie in PHP, but in Apple&#8217;s pre-installed <a href="http://www.freetype.org/">FreeType</a> which is compiled with &#8220;old font&#8221; support. This old font support is apparently old Carbon code instead of Cocoa (if I understand correctly, which I may not) and thus requires a forking of the process&#8230; which triggers this fault.</p>
<p>If you use <a href="http://www.macports.org/" title="MacPorts homepage">MacPorts</a> version of Apache and PHP (as I am now doing), you can fix this problem by editing the Portfile for freetype to disable old font support, recompiling it, and restarting your apache server. So following the hints in the <a href="https://trac.macports.org/ticket/15909">MacPorts Bug Report #15909</a> I did the following:</p>
<p>Edit the Portfile located at <code>/opt/local/var/macports/sources/rsync.macports.org/release/ports/print/freetype/Portfile</code> changing line 50 to</p>
<p><pre><pre>
#&nbsp;&nbsp;&nbsp;&nbsp;--with-old-mac-fonts 
--with-fsspec=no --with-fsref=no --with-quickdraw-toolbox=no --with-quickdraw-carbon=no 
</pre></pre></p>
<p>Now recompile freetype in MacPorts. To do this you have to force the uninstallation of freetype (which will cause much gnashing of teeth by MacPorts since freetype is required for several other ports.</p>
<p><pre><pre>
sudo port -f uninstall freetype
</pre></pre></p>
<p>Then recompile and reinstall freetype:</p>
<p><pre><pre>
sudo port install freetype
</pre></pre></p>
<p>And finally, give the apache server used by MacPorts a fresh restart to get it going with the new freetype libraries loaded.</p>
<p><pre>sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart</pre></p>
<p>Doing this fixed all my freetype issues and I was able to use <a href="http://iparrizar.mnstate.edu/~juan/MAPS_Database/catalog/finder_chart/">my FinderChart program</a> again. The only disadvantage is that if freetype is updated from version 2.3.7 in MacPorts (and no no-old-font variant appears), I will have to re-apply this hack.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/09/05/forking-problems-with-freetype-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>These Fork()ing PHP Woes continue</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/08/18/php-woes-only-fixed-briefly/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/08/18/php-woes-only-fixed-briefly/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 15:57:16 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/08/18/php-woes-only-fixed-briefly/</guid>
		<description><![CDATA[What do you know, one reboot later and MacPorts Apache2 server with MacPorts PHP is throwing the same errors as the built-in PHP server. When I try to create a graphic using typography, I get
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
It wasn&#8217;t complaining [...]]]></description>
			<content:encoded><![CDATA[What do you know, one reboot later and MacPorts Apache2 server with MacPorts PHP is throwing <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/08/14/php-on-leopard-damn-irritating-sometimes/">the same errors</a> as the built-in PHP server. When I try to create a graphic using typography, I get
<pre><pre>The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.</pre></pre>
It wasn&#8217;t complaining before the reboot. Maybe Apple&#8217;s security kicked in after the reboot although for the life of me I can&#8217;t understand why.

I&#8217;ve continued investigating and in Apple&#8217;s Discussion boards <a href="http://discussions.apple.com/thread.jspa?messageID=5693097#5961098">I found there was a string of comments about this problem</a>.  One user, Bill Eccles, seemed to isolate the problem and his description matches the symptoms I am seeing:
<blockquote>Finally, there&#8217;s a big problem with FreeType. As I discovered, anytime FreeType fonts are used by GD, they apparently make a Carbon API call of some sort. Problem is, Apache2 uses fork() without a corresponding exec() and, upon calling PHP/GD/FreeType, the Carbon call in FreeType causes Apache2 to crash. It shows up in the error_log as
<pre><pre>The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
Mon Nov 26 12:38:11 2007 notice child pid 304 exit signal Trace/BPT trap (5)</pre></pre>
and in the system.log as
<pre><pre>Nov 26 13:12:00 shr-g5 ReportCrash664: Formulating crash report for process httpd659
Nov 26 13:12:02 shr-g5 ReportCrash664: Saved crashreport to /Library/Logs/CrashReporter/httpd_2007-11-26-131145_shr-g5.crash using uid: 0 gid: 0, euid: 0 egid: 0</pre></pre>
I didn&#8217;t discover the cause&#8211;I can&#8217;t take credit for this one.</blockquote>
At this point he provides a link to a blog that was just reposting mailing list digests and as such got pulled down.  I think I have found <a href="http://lists.gnu.org/archive/html/freetype/2007-11/msg00000.html">the original thread about the problem on the FreeType mailing lists here</a>.  Bill then suggests the following solution (this is not complete):
<blockquote>[I]nstall FreeType 2 without the Mac-specific extensions. These extensions make it possible for FT2 to access fonts stored in a font suitcase, something which is unnecessary if you use plain &#8220;.ttf&#8221; fonts from other sources. Here&#8217;s how I did that:

Get FT2 and expand the tarball:
(in Sources&#8211;my version of /SourceCache):
<pre><pre>curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
cd ..
tar xvfp Sources/freetype-2.3.5.tar.gz</pre></pre>
Configure FT2 and make it:
<pre><pre>MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=&quot;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp&quot; CCFLAGS=&quot;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe&quot; CXXFLAGS=&quot;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe&quot; LDFLAGS=&quot;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load&quot; ./configure --with-fsspec=no --with-fsref=no --with-quickdraw-toolbox=no --with-quickdraw-carbon=no
make
sudo make install</pre></pre>
Libraries end up in /usr/local/lib.</blockquote>
The funny thing is I have FreeType 2.3.7 courtesy of MacPorts, <del datetime="2008-09-05T17:14:19+00:00">so I don&#8217;t know why the MacPorts installation of PHP is throwing the error unless it is not accessing the MacPorts version of GD.</del>  Actually, it makes complete sense.  FreeType 2.3.7 in MacPorts is compiled with old font support (which is what triggers the problem).  I submitted a <a href="https://trac.macports.org/ticket/15909">trouble ticket</a> requesting a variant of freetype be made available to disable old font support (which won&#8217;t work in Leopard anyway).]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/08/18/php-woes-only-fixed-briefly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing my PHP woes with MacPorts</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/08/14/fixing-my-php-woes-with-macports/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/08/14/fixing-my-php-woes-with-macports/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 03:15:31 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Command Line Tricks]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/08/14/fixing-my-php-woes-with-macports/</guid>
		<description><![CDATA[As I mentioned in my blog post earlier today, I have been having issues using the JpGraph graphing package for PHP with Apple&#8217;s built-in PHP under MacOS 10.5. It appears Apple&#8217;s security efforts have &#8220;secured&#8221; PHP to the point where JpGraph (and PDFLib) will not function properly under the built-in PHP. [Note added after initial [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in my blog post earlier today, I have been having issues using the JpGraph graphing package for PHP with Apple&#8217;s built-in <a href="http://www.php.net/">PHP</a> under <a href="http://www.apple.com/macosx/">MacOS 10.5</a>. It appears Apple&#8217;s security efforts have &#8220;secured&#8221; PHP to the point where <a href="http://www.aditus.nu/jpgraph/">JpGraph</a> (and <a href="http://www.pdflib.com/">PDFLib</a>) will not function properly under the built-in PHP. <strong>[Note added after initial post: The rest of this post describes installing Apache 2 and PHP under MacPorts and configuring it to be similar to Apple's built-in servers.  This appeared to solve my problems, but then my Mac locked-up [possibly related] and on reboot, the new MacPorts-based PHP installation started throwing the same errors as Apple&#8217;s built-in PHP.  More information on this problem is located in <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/08/18/php-woes-only-fixed-briefly/">my newer post on the issue</a>.]</strong></p>

<p>I had tried to alleviate the solution previously by compiling a version of PHP myself that would be compatible with Apple&#8217;s built-in Apache 2 web server. This turned out to be difficult because Apple&#8217;s Apache 2 web server is a &#8220;universal&#8221; binary, meaning it contains four seperate binaries (for 32-bit PowerPC, 64-bit PowerPC, 32-bit Intel, and 64-bit Intel processors). As such I needed to compile a &#8220;universal&#8221; PHP binary and since I wanted MySQL support, I needed a &#8220;universal&#8221; MySQL binary. This turned out to be too much for this astronomer, so I gave up on making a new PHP that was compatible with Apple&#8217;s built-in web server.</p>

<p>So I bit the bullet and after reviewing the options, I decided to install Apache 2 and PHP under <a href="http://www.macports.org/">MacPorts</a>. If you have read the other posts on this site, you know I really like MacPorts as the quick and dirty way to get many things running on the Mac. However, despite this, I don&#8217;t like installing MacPorts for items Apple provides, instead generally preferring to use Apple&#8217;s &#8220;pre-installed&#8221; versions. Furthermore, there have been a lot of complaints on the MacPorts mailing lists about various issues compiling PHP5. So I wasn&#8217;t as quick to jump onto the MacPorts bandwagon for PHP as I am for other problems. However, since I am familiar with MacPorts, I decided this was the best approach for getting my online <a href="http://iparrizar.mnstate.edu/~juan/MAPS_Database/catalog/finder_chart/">Finder Charts</a> to work again.</p>

<p>The process proved reasonably painless, especially since I was able to review this blog post, where he lays out pretty much what to do. However, since I wanted to achieve maximum compatibility with Apple&#8217;s built-in web server and PHP setup, in case I wanted to switch back, I ended up doing things a little bit differently, so I am outlining my steps here.
<ol>
	<li>I started by <strong>installing the MacPorts version of Apache 2</strong> using the command <code>sudo port install apache2</code></li>
	<li>Next, I had to <strong>create the Apache 2 configuration files and edit them</strong>. I started by copying the sample configuration file
<pre>sudo cp /opt/local/apache2/conf/httpd.conf.sample /opt/local/apache2/conf/httpd.conf</pre>
and then editing <code>/opt/local/apache2/conf/httpd.conf</code> with my favorite text editor to change the configuration to match the that of the built-in Apache 2 server a closely as possible. My matching the configuration of Apple&#8217;s built-in server, I can switch back to it with relative ease if I choose to do so later. So I made the following changes to <code>/opt/local/apache2/conf/httpd.conf</code>:</li>
	<li style="list-style: none">
<ol type="i">
	<li>I changed <code>DocumentRoot</code> to <code>&quot;/Library/WebServer/Documents&quot;</code> as is the case with Apple&#8217;s built-in server.</li>
	<li>To allow <code>index.php</code> files to be used as directory indexes, I changed
<pre>DirectoryIndex index.html</pre>
to
<pre>DirectoryIndex index.html index.php</pre>
(I don&#8217;t know why this isn&#8217;t necessary with Apple&#8217;s built-in server, but it was necessary here).</li>
	<li>I changed  to
and in that directory block of code, I added &#8220;<code>MultiViews</code>&#8221; to the <code>Options</code> line.</li>
	<li>I changed  to  in order to prevent the listing of <code>.DS_Store</code> files in directory listings by the web server.</li>
	<li>Before the <code>ErrorLog</code> block of code in this file, I added the following lines copied from Apple&#8217;s default Apache 2 configuration:
<pre><pre>#
# Apple specific filesystem protection.
#

Order allow,deny
Deny from all
Satisfy All

Order allow,deny
Deny from all
Satisfy All</pre></pre>
</li>
	<li>I changed <code>ErrorLog</code> to <code>&quot;/private/var/log/apache2/error_log&quot;</code></li>
	<li>I changed <code>CustomLog</code> to <code>&quot;/private/var/log/apache2/access_log common&quot;</code></li>
	<li>To match Apple&#8217;s Apache 2 server configuration, I changed <code>ScriptAliasMatch</code> to
<pre>^/cgi-bin/((?!(?i:webobjects)).*$) &quot;/Library/WebServer/CGI-Executables/$1&quot;</pre>
</li>
	<li>I changed  back to</li>
	<li>I added the following Handles to the &#8220;To use CGI Scripts&#8221; block of code:
<pre><code>AddHandler imap-file .map
AddHandler cgi-script .cgi
AddHandler cgi-script .pl</code></pre></li>
	<li>I uncommended the following lines near the end of the file:
<pre></pre>
</li>
	<li><strong>[OPTIONAL]</strong> Because I use the WebDAV server on my server, I also uncommented
<code></code></li>
	<li>Finally, I added the following lines to the end of the file in order to allow loading of the PHP5 configuration
<pre></pre>
</li>
</ol>
</li>
	<li>Next, I editted <code>/opt/local/apache2/conf/extra/httpd-userdir.conf</code> and added the following to the end of the file
<pre><pre>
#
# Users might not be in /Users/*/Sites, so use user-specific config files.
#
Include /private/etc/apache2/users/*.conf</pre></pre>
</li>
	<li> <strong>[OPTIONAL]</strong> Since I use the built-in WebDAV server, I made a backup of the WebDAV configuration, then copied the
Default MacOS X one, because I have spent a lot of time tweaking it previously and I didn&#8217;t want to have to reinvent the wheel. 
<pre><pre>sudo cp /opt/local/apache2/conf/extra/httpd-dav.conf /opt/local/apache2/conf/extra/httpd-dav.conf.orig
sudo cp /etc/apache2/extra/httpd-dav.conf /opt/local/apache2/conf/extra/httpd-dav.conf</pre></pre>
</li>
	<li>I had to <strong>install PHP5 with MacPorts</strong>. Since I wanted to add support for Apache 2 and MySQL, I entered the command:
<code>sudo port install php5 +apache2 +mysql5 +pear</code>
which has the side effect of installing MacPorts version of MySQL as well. Assuming everything goes well, after a few minutes (this takes longer than the apache2 install earlier), the installation will end. At this point we can configure the Apache 2 mod_php module by typing: 
<pre>cd /opt/local/apache2/modules/opt/local/apache2/bin/apxs -a -e -n &quot;php5&quot; libphp5.so</pre>
</li>
	<li> <strong>[OPTIONAL]</strong> Next, I had to <strong>create the PHP5 configuration file and edit it</strong>. I started by copying the sample configuration file
<code>sudo cp /opt/local/etc/php.ini-dist /opt/local/etc/php.ini</code>
and then editing <code>/opt/local/etc/php.ini</code> to make it match <code>/etc/php.ini</code> (which Apple&#8217;s built-in PHP uses). All the changes I made were optional and related to the specifics of my setup. The only interesting one was that I wanted to continue to use the MySQL.com binary distribution of MySQL server, so I set the following variables in <code>/opt/local/etc/php.ini</code>: 
<ol type="i">
	<li><code>mysql.default_port</code> from &#8220;&#8221; to <code>3306</code></li>
	<li><code>mysql.default_socket</code> from &#8220;&#8221; to <code>/private/tmp/mysql.sock</code></li>
	<li><code>mysqli.default_socket</code> from &#8220;&#8221; to <code>/private/tmp/mysql.sock</code></li>
</ol>
</li>
	<li><strong>I deactivated Apple&#8217;s built-in web server</strong> by turning off Web Sharing in the Sharing.prefPane.</li>
	<li> <strong>Finally, I launched the new webserver</strong> (and set it up for launching on boot-up in the future) by typing
<pre>sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist</pre>
If this breaks anything, I can reverse the process by typing
<pre>sudo launchctl unload -w /Library/LaunchDaemons/org.macports.apache2.plist</pre>
</li>
	<li> <strong>[OPTIONAL]</strong> I like the ability to turn on and off the Apache webserver from the command line using apachectl. I can &#8220;emulate&#8221; this in /bin/tcsh (my prefered shell) by adding the following command to the ~/.tcshrc file:
<pre>alias apache2ctl &#039;sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper&#039;</pre>
After which I can bring down the server by typing <code>apache2ctl stop</code> and restart it by typing <code>apache2ctl start</code>.</li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/08/14/fixing-my-php-woes-with-macports/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Xquartz 2.2.3 released</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/06/26/xquartz-223-released/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/06/26/xquartz-223-released/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 21:30:18 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/06/26/xquartz-223-released/</guid>
		<description><![CDATA[I was trying to upgrade wine within MacPorts when I realized I had forgotten to upgrade Xquartz after my upgrade to MacOS 10.5.3 on my Mac Pro. So I checked, Xquartz has been upgraded to version 2.2.3. Since version 2.2.1 (which I talked about in my blog here).

Upgraded the freetype library to version 2.3.6, which [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to upgrade <a href="http://www.winehq.org/">wine</a> within <a href="http://www.macports.org/" title="MacPorts homepage">MacPorts</a> when I realized I had forgotten to upgrade Xquartz after my upgrade to <a href="http://www.apple.com/macosx/">MacOS</a> 10.5.3 on my Mac Pro. So I checked, <a href="http://xquartz.macosforge.org/trac/wiki">Xquartz</a> has been upgraded to <a href="http://xquartz.macosforge.org/trac/wiki/X112.2.3">version 2.2.3</a>. Since version 2.2.1 (<a href="http://iparrizar.mnstate.edu/~juan/urania/2008/05/06/xquarz-goes-to-version-221/">which I talked about in my blog here</a>).</p>
<ul>
<li>Upgraded the freetype library to version 2.3.6, which fixes &#8220;A bunch of potential security problems have been found [and fixed in this release&#8221;</li>
<li>Upgraded to pixman library to version 0.11.4.</li>
<li>Xquartz fixes from xorg-server-1.3.0-apple21, the key fix being support for monitor hotplugging, although several security fixes also occurred.</li>
</ul>
<p>Again, if you upgrade <a href="http://www.apple.com/macosx/">MacOS</a> (say to version 10.5.4, which is supposed to be released soon in order to support <a href="http://www.apple.com/iphone/">iPhone G3</a> and <a href="http://www.apple.com/mobileme/">MobileMe</a>), you will likely need to reinstall Xquartz (unless Apple has upgraded their X11 installation to match Xquartz).</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/06/26/xquartz-223-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>osxutils now fixed on MacPorts under Leopard</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/04/10/osxutils-now-fixed-on-macports-under-leopard/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/04/10/osxutils-now-fixed-on-macports-under-leopard/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 21:27:37 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/?p=102</guid>
		<description><![CDATA[I got an email today noting that osxutils now installs correctly in MacPorts under MacOS 10.5 Leopard.  I have tested it and this appears to be correct, the commands:
sudo port -d selfupdate
sudo port -d sync
sudo port install osxutils 
did indeed install osxutils as promised.   I also noticed they upgraded from version 1.6 to 1.7, maybe that [...]]]></description>
			<content:encoded><![CDATA[<p>I got an email today noting that <strong><a title="osxutils" href="http://osxutils.sourceforge.net/osxutils_docs.html">osxutils</a></strong> now installs correctly in <a href="http://www.macports.org/">MacPorts</a> under<a href="http://www.apple.com/macosx/"> MacOS 10.5 Leopard</a>.  I have tested it and this appears to be correct, the commands:<br />
<pre><pre>sudo port -d selfupdate
sudo port -d sync
sudo port install osxutils </pre></pre><br />
did indeed install osxutils as promised.   I also noticed they upgraded from version 1.6 to 1.7, maybe that was all that was necessary.  All the MacPorts packages I used in Tiger now work in Leopard. Now <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/03/04/making-leopard-php-a-better-php-by-adding-gd-support/">if I could only get a proper recompile of PHP working under Leopard</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/04/10/osxutils-now-fixed-on-macports-under-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Site upgrade to Leopard</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/03/04/site-upgrade-to-leopard/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/03/04/site-upgrade-to-leopard/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 16:07:39 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/03/04/site-upgrade-to-leopard/</guid>
		<description><![CDATA[I have taken part of my day to get my main web server upgraded to MacOS X 10.5 (aka Leopard). I spent quite a bit of time waiting, removing programs I knew were incompatible, and so on. Still, this upgrade was not without a few bumps:

Check Hardware Compatibility: My Sonnet Tempo SATA X4P card (which [...]]]></description>
			<content:encoded><![CDATA[<p>I have taken part of my day to get my main web server upgraded to MacOS X 10.5 (aka Leopard). I spent quite a bit of time waiting, removing programs I knew were incompatible, and so on. Still, this upgrade was not without a few bumps:</p>
<ul>
<li><strong>Check Hardware Compatibility:</strong> My <a href="http://www.sonnettech.com/">Sonnet</a> <a href="http://www.sonnettech.com/product/tempo_sata_x4p.html">Tempo SATA X4P</a> card (which I use to provide an external SATA [eSATA] interface for my RAID of data drives) was incompatible with Leopard and would cause the installer to hang. I finally discovered a <a href="http://www.sonnettech.com/support/downloads/computercards.html#temposatafamilymac">firmware upgrade</a> was available that fixed this. This was a stupid rookie mistake. <strong>Rule of Thumb:</strong> Always check the non-Apple hardware for updates before making a major OS X upgrade.</li>
<li><strong>Watch out for /home:</strong> I had been using a symbolic link from <code>/home</code> to <code>/Users</code> because in my old Unix days, I hardcoded a lot of my software to look for my home directory in <code>/home</code>. Leopard expects <code>/home</code> to be available as mount point for the automount service, so getting with the modern era and not relying on <code>/home</code> to point to <code>/User</code> is required if you adopt Leopard.</li>
<li><strong>Rebuild Web Server Configuration:</strong> One problem I was prepared for is that the web server was updated to <a href="http://www.apache.org/">Apache2</a>. This in itself was not bad, but the configuration files for Apache (version 1) were stored in <span style="font-style: italic;">/etc/httpd</span> and the new configuration files for Apache2 are in <span style="font-style: italic;">/etc/apache2</span> and they were NOT migrated. I don&#8217;t fault Apple for not migrating the files, but I kicked this around on my laptop quite a bit in order to tweak the configuration files back to something I liked. One thing I immediately did was that this MacOS comes with <a href="http://www.php.net/.net/">PHP</a> 5.2.4 preinstalled, but not enabled in Apache2. I enabled it by editting the <code>/etc/apache2/httpd.conf</code> file (which you might have to create) and uncommenting the line with <code># LoadModule php5_module</code> (by removing the &#8216;#&#8217; symbol from the beginning of the line). Once that was done, I restarted the Apache2 server and all my PHP code (including this blog) was running again.</li>
<li>
    <strong>Tweak MySQL for Leopard:</strong> The <a href="http://www.php.net/">PHP</a> 5.2.4 included with MacOS X is compiled with support for <a href="http://www.mysql.com.com/">MySQL</a>. This is nice in that you can just download the MySQL package installer and quickly get a <a href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)">LAMP</a> server running. However, it was set up with the MacOS X Server version of MySQL in mind, which means it expects the socket to be in a different location than the vanilla MySQL. This can be solved by either tweaking the MySQL configuration (as outlined in the MySQL section of the blog post at <a href="http://remysharp.com/2007/10/27/lamp-in-leopard-osx-105-php5-and-apache-22/">http://remysharp.com/2007/10/27/lamp-in-leopard-osx-105-php5-and-apache-22/</a> ) or by tweaking the PHP configuration by editing the <code>/etc/php.ini</code> file (if it doesn&#8217;t exist, first copy <code>/etc/php.ini.default</code> to <code>/etc/php.ini</code>) and search for the line containing <code>mysqli.default_socket =</code> to read<br />
    <pre><pre>
mysqli.default_socket = /private/tmp/mysql.sock
</pre></pre>This solution seemed more straight forward, so I did this.
  </li>
<li><strong>Reinstall MacPorts:</strong> Since I am aficionado of <a href="http://www.macports.org/" title="MacPorts homepage">MacPorts</a>, I reinstalled it and rebuilt all the ports. Some of the issues <a href="http://iparrizar.mnstate.edu/~juan/urania/2007/12/05/macports-failures-under-leopard/">I had before with MacPorts on Leopard</a> on my MacBook Pro cropped up again on my PowerMac G5, notably</li>
<li style="list-style: none">
<ul>
<li><strong>gv</strong> still needs to be patched as I noted <a href="http://iparrizar.mnstate.edu/~juan/urania/page/3/">here</a>.</li>
<li><strong>sqlite3</strong> still does know about its dependence on <strong>nawk</strong>.</li>
<li><strong>xterm</strong> doesn&#8217;t install unless you update your X11 installation using the latest version of Xquartz (currently at version 2.1.4).</li>
</ul>
</li>
<li><strong>Update to latest version of Xquartz:</strong> Since I don&#8217;t like X11 headaches, I updated to the latest version of Xquartz (currently at version 2.1.4).</li>
</ul>
<p>So the adventure continues. Back to research, I have invested about 5 hours of my spring break into this upgrade, that is enough for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/03/04/site-upgrade-to-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xephem via MacPorts fixed</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/03/02/xephem-vis-macports-fixed/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/03/02/xephem-vis-macports-fixed/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 19:13:12 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/03/02/xephem-vis-macports-fixed/</guid>
		<description><![CDATA[Just a quick note that xephem now works when installed via MacPorts on Leopard (MacPorts Bug Report Ticket #13498). As noted by user &#8220;jmr&#8221; in that bug report, the error was apparently that

  The build.args need to be set as described in the INSTALL file.

So I updated the ports files via an

sudo port -d [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note that <a href="http://www.clearskyinstitute.com/xephem/">xephem</a> now works when installed via <a href="http://www.macports.org/">MacPorts</a> on Leopard (MacPorts Bug Report Ticket #13498). As noted by user &#8220;jmr&#8221; in that bug report, the error was apparently that</p>
<blockquote><p>
  The build.args need to be set as described in the INSTALL file.
</p></blockquote>
<p>So I updated the ports files via an</p>
<p><pre><pre>
sudo port -d sync
</pre></pre>Followed by<br />
<pre><pre>
sudo port install xephem
</pre></pre>and xephem was installed via MacPorts again. I then removed manual install I had performed earlier with<br />
<pre><pre>
sudo rm -rf /usr/local/bin/xephem /usr/local/xephem /usr/local/man/man1/xephem.1
</pre></pre>I also removed the <span style="font-style: italic;">~/.xephem</span> directory and let the preferences rebuild. Now I am running with the MacPorts version of xephem again.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/03/02/xephem-vis-macports-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MacPorts getting more functional for this Astronomer</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2008/01/24/macports-getting-more-functional-for-this-astronomer/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2008/01/24/macports-getting-more-functional-for-this-astronomer/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 23:36:34 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[Command Line Tricks]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2008/01/24/macports-getting-more-functional-for-this-astronomer/</guid>
		<description><![CDATA[About 6 weeks ago I posted about the various ports that failed to install in my first attempts at getting &#8220;my standard suite&#8221; of ports installed under MacPorts on Leopard. My standard suite until Tiger involved issuing the following command:
sudo port install aquaterm chmdump contacts coreutils curl file findutils g95 ghostscript gv ImageMagick ksh93 latex2rtf [...]]]></description>
			<content:encoded><![CDATA[<p>About 6 weeks ago I posted about <a href="http://iparrizar.mnstate.edu/~juan/urania/2007/12/05/macports-failures-under-leopard/">the various ports that failed to install in my first attempts at getting &#8220;my standard suite&#8221; of ports installed under MacPorts on Leopard</a>. My standard suite until Tiger involved issuing the following command:<br />
<pre>sudo port install aquaterm chmdump contacts coreutils curl file findutils g95 ghostscript gv ImageMagick ksh93 latex2rtf lynx macutil osxutils plotutils subversion teTeX tidy vim wget wine xterm xephem</pre><br />
Since then <a title="MacPorts homepage" href="http://www.macports.org/">MacPorts</a> has released version 1.6 and the various porters have been hacking at the various problems. I can now report that of the ports I reported failed to install:</p>
<ul>
<li><strong>xterm</strong>, <strong>wine</strong>, and <strong>g95</strong> all now install without any issues.</li>
<li><strong>teTeX</strong> can be installed, there was a bad dependency in the portfile. You just needed to install <strong>openmotif</strong> first manually. <strong>I don&#8217;t know if the bad dependency is still there, it may have been resolved.</strong></li>
<li><strong>subversion</strong> can be installed, it also had a bad dependency. You just needed to install <strong>nawk</strong> first. <strong>Again, I d</strong><strong>on&#8217;t know if the bad dependency is still there, it may have been resolved.</strong></li>
<li><strong>gv</strong> can be installed if you apply a patch. If you check that bug ticket on <strong>gv</strong> (you need to get a free <a href="https://www.macosforge.org/">MacOSForge</a> account), you will find a new <span style="font-style: italic">patch-setenv.c</span> file is available there. If you download that file and replace <em>/opt/local/var/macports/sources/rsync.macports.org/release/ports/print/gv/files/patch-setenv.c</em> with it, <strong>gv</strong> will compile and install just fine.</li>
</ul>
<p>This leaves just two of my standard suite of packages that don&#8217;t compile right in Leopard, <strong><span style="text-decoration: line-through;">osxutils</span></strong> (<a href="http://iparrizar.mnstate.edu/~juan/urania/2008/04/10/osxutils-now-fixed-on-macports-under-leopard/">See this post</a>) and <span style="text-decoration: line-through;"><strong>xephem</strong></span> (<a href="http://iparrizar.mnstate.edu/~juan/urania/2008/03/02/xephem-vis-macports-fixed/">See this post</a>). And xephem installs just fine manually if you <a href="http://www.clearskyinstitute.com/xephem/">download the source code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2008/01/24/macports-getting-more-functional-for-this-astronomer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacPorts failures under Leopard</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/12/05/macports-failures-under-leopard/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/12/05/macports-failures-under-leopard/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 23:05:15 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Command Line Tricks]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/12/07/macports-failures-under-leopard/</guid>
		<description><![CDATA[I decided I should clean up my laptop&#8217;s left over digital crap, so I went through my /usr/local directories cleaning out ancient libraries installed two OSes ago (after making a backup first). I decided I would try reinstalling MacPorts under Leopard, if only to build it clean and remove the old source code siting around [...]]]></description>
			<content:encoded><![CDATA[I decided I should clean up my laptop&#8217;s left over digital crap, so I went through my <span style="font-style: italic">/usr/local</span> directories cleaning out ancient libraries installed two OSes ago (after making a backup first). I decided I would try reinstalling <a title="MacPorts homepage" href="http://www.macports.org/">MacPorts</a> under Leopard, if only to build it clean and remove the old source code siting around from various revisions to the packages over time.First, I installed MacPorts from the disk image for Leopard. Then I attempted to install my usual suspects:

<code>sudo port install aquaterm chmdump contacts coreutils curl file findutils g95 ghostscript gv ImageMagick ksh93 latex2rtf lynx macutil osxutils plotutils subversion teTeX tidy vim wget wine xterm xephem</code>

Long story short, almost everything works but there were a few key packages that failed to build under MacOS X 10.5.1. This also reminded me that when a package fails to build, you should &#8220;port clean&#8221; the package (see examples below) before attempting to rebuild it:
<ul>
	<li>I discovered that <strong>teTeX</strong> failed to build. This appears to be due to an undeclared dependancy on <strong>openmotif</strong>. So after the failed install, I just did an<code>sudo port clean --work teTeX; sudo port install openmotif teTeX</code>and teTeX installed just fine.</li>
	<li>In attempting to build <strong>subversion</strong> I discovered that one of the packages subversion needs, sqlite3, fails to install on Leopard. This appears to be due to an undeclared dependancy on <strong>nawk</strong> (MacPorts Report Ticket #13500). So again, all I had to do was:<code>sudo port clean --work sqlite3; sudo port install nawk subversion</code>and it worked. I should note that a fairly recent version of subversion now comes with Leopard, version 1.4.4 (as opposed to 1.4.5 with MacPorts).</li>
	<li><strong>gv</strong> fails to install unless you patch it. This was reported to MacPorts (Bug Report Ticket #13095). <strong>[If</strong> <strong>you check that bug ticket, you will find a new <em>patch-setenv.c</em> file is available there. If you download that file and replace <em>/opt/local/var/macports/sources/rsync.macports.org/release/ports/print/gv/files/patch-setenv.c</em> with it, gv will compile and install just fine.]</strong></li>
	<li><strong>osxutils</strong> fails almost immediately with a series of errors about conflicting types. Since <strong>osxutils</strong> did a lot of meta-data manipulation, I am not completely surprised it is broken under Leopard. I have submitted a bug report to MacPorts.</li>
	<li><strong><span style="text-decoration: line-through;">xterm</span></strong> <span style="text-decoration: line-through;">fails to build</span>. This is irritating because I haven&#8217;t had time to confirm is the old <a href="http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/xterm-tektronix-emulation-broken-on-macos/">xterm Tektronix emulation bug present in the Tiger version of xterm</a> is still present. <strong>[This appears to have been cleared up with MacPorts 1.6 if you install Xquartz over the Apple installed X11 server. Doing this is a good idea anyway.]</strong></li>
	<li><strong><span style="text-decoration: line-through;">wine</span></strong> <span style="text-decoration: line-through;">fails to build</span> (<a href="http://www.nabble.com/build-of-wine-0.9.50-failed-t4938590.html">already reported elsewhere</a>). This has already been reported in <a href="http://trac.macosforge.org/projects/macports/ticket/13488">MacPorts Bug Report Ticket #13488</a>. I wonder if this is related to the possibility being mentioned of <a href="http://www.winehq.org/pipermail/wine-devel/2007-November/060846.html">Leopard having unreported support for Windows binary execution.</a> <strong>[Wine version 0.9.51 DOES compile under Leopard just fine.]</strong></li>
	<li><span style="text-decoration: line-through;">I can&#8217;t build <strong>g95</strong> because <strong>odcctools</strong> fails to compile.</span> This has been reported in <a href="http://trac.macosforge.org/projects/macports/ticket/13148">MacPorts Bug Report Ticket #13148</a>. <strong>[This appears to have been fixed as of January 24, 2008.]</strong></li>
	<li><span style="text-decoration: line-through;"><strong>xephem</strong> fails to build because <strong>lesstif</strong> builds but fails to install. Actually <strong>lesstif</strong> installed fine once I moved <em>/usr/share/aclocal/ac_find_motif.m4</em> out of the way. I don&#8217;t know if that file was there from my previous install of <strong>lesstif</strong>. Once <strong>lesstif</strong> was out of the way, <strong>xephem</strong> failed to build.</span> Interestingly, MacPorts has version 3.7, I downloaded the source for xephem 3.7.2 from the <a href="http://www.clearskyinstitute.com/xephem/">Clear Sky Institute website</a>, compiled it following the installation instructions without a hitch. I submitted a bug report as MacPorts Bug Report Ticket #13524 (turned out my bug report was a duplicate of MacPorts Bug Report Ticket #13498). This has been fixed, <a href="http://iparrizar.mnstate.edu/~juan/urania/2008/03/02/xephem-vis-macports-fixed/">see this post.</a> <strong>[<a href="http://iparrizar.mnstate.edu/~juan/urania/2008/03/02/xephem-vis-macports-fixed/">This appears to have been fixed</a> as of March 3, 2008.]</strong></li>
</ul>
I&#8217;m actually surprised the number of packages that failed to compile seems pretty small.]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/12/05/macports-failures-under-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Leopard Issues for the Astronomer (a.k.a. I&#8217;m not sure X11 is better)</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/11/25/leopard-issues-for-the-astronomer-aka-im-not-sure-x11-is-better/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/11/25/leopard-issues-for-the-astronomer-aka-im-not-sure-x11-is-better/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 23:19:08 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/11/26/leopard-issues-for-the-astronomer-aka-im-not-sure-x11-is-better/</guid>
		<description><![CDATA[So this weekend I decided to take advantage of the long weekend and between bites of turkey with the family, I decided to upgrade my laptop to Leopard (MacOS 10.5). I had been reading about the various issues with Leopard before the upgrade, so among the things I did in anticipation of Leopard was

I uninstalled [...]]]></description>
			<content:encoded><![CDATA[<p>So this weekend I decided to take advantage of the long weekend and between bites of turkey with the family, I decided to upgrade my laptop to Leopard (MacOS 10.5). I had been reading about the various issues with Leopard before the upgrade, so among the things I did in anticipation of Leopard was
<ul>
<li>I <a href="http://arstechnica.com/journals/apple.ars/2007/10/29/unsanity-warns-customers-to-update-ape-before-upgrading-to-leopard">uninstalled</a> Unsanity&#8217;s Application Enhancer.</li>
<li>I removed X11.app from my automatic launch items in the Accounts Preferences Pane Login Items. X11 is extensively refreshed under MacOS 10.5, <a href="http://lists.apple.com/archives/x11-users/2007/Oct/msg00065.html">so you don&#8217;t want to autolaunch X11.app any more.</a></li>
<li>I upgraded Cisco&#8217;s VPN software to the latest version distributed by my campus (you want Cisco VPN Client 4.9.01 (0090)).</li>
<li>I did a quick search of the various applications I run and looked for &#8220;Leopard&#8221; upgrades via <a href="http://www.macupdate.com/">MacUpdate</a>.</li>
<li>Finally, I researched the incompatibility of <a href="http://www.macworld.com/news/2007/10/26/adobelopard/index.php">Adobe Acrobat with MacOS X 10.5</a>. I discovered that while the AdobePDF printer driver broken under the new OS, you can use Apple&#8217;s built in PDF capability (specifically &#8220;Save as PDF-X&#8221;) capability to create the PDF, which can then import and edit just fine in Acrobat.</li>
</ul>
<p>Having done all that, I decided to bite the bullet and install the upgrade. First thing I did was back up the entire internal drive to an external drive (which I had formatted with Disk Utility to make sure it was capable of booting an Intel Mac) using <a href="http://www.bombich.com/software/ccc.html">Carbon Copy Cloner</a>. Once the drive was cloned, I ignored the overhyped warnings from MacFixIt.com (who I won&#8217;t link to, because they were bought out, they definitely sold out as a source of accurate help) and instead followed the Apple recommended procedure of just doing an upgrade to my previous Tiger installation. I figured if worst came to worse, I would recover from the backup drive (in my mind, the backup is the critical step, not how you choose to upgrade). So approximately 80 minutes later my laptop finished its upgrade and rebooted. Some notes on my initial issues with the new OS.
<ul>
<li>The new dock doesn&#8217;t bug me as much as some (John Siracusa does the best analysis of the <a href="http://arstechnica.com/reviews/os/mac-os-x-10-5.ars/4">problems with the new Dock</a> in his extensive <a href="http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.ars">ArsTechnica review of Leopard</a>), but maybe its because I thought the old dock was broken enough as a launcher that I use <a href="http://blacktree.com/?quicksilver">QuickSilver</a> instead (which works fine under Leopard).</li>
<li>Leopard finally handles virtual memory use nicely, removing old files in the <strong><span style="font-style: italic">/var/vm</span></strong> directory once the memory has been released.</li>
<li>I don&#8217;t like the translucent menubar, but <a href="http://www.macupdate.com/search.php?arch=all&amp;keywords=Leopard+Menubar&amp;os=macosx">there exist various free applications</a> to get rid of those and the changed dock.</li>
<li>The new OS nuked all my installed printers. Not a huge deal, but I have to re-install all my printers again. I kind of understand why this might of happened, but it was a pain.</li>
<li>I had to use Disk Utility to Repair Permissions before my Widgets behaved properly, but now, they actually seem to run better than before (less delay in accessing them).</li>
<li><a href="http://macsingularity.org/2007/11/09/idl-641-patch-for-leopard-compatibility/">I patched IDL to version 6.4.1, seems to work now.</a></li>
<li>I knew from Ben Bayer&#8217;s (Apple&#8217;s X11 guy) <a href="http://lists.apple.com/archives/x11-users/2007/Oct/msg00065.html">postings</a> on the matter that<br />
<blockquote>       Biggest architectural change in Leopard for X11: Switched from XFree86 codebase (based on, IIRC, X11R6.8) to X.org codebase (X11R7.2)</p></blockquote>
<blockquote><p>       Biggest user-visible change: launchd support for X11. The only situation where you should need to manually start X11.app is if you are only running remote X11 applications.</p></blockquote>
<blockquote><p>       The way that this is accomplished is by some slight-of-hand with the $DISPLAY variable — if you look, it should be something like “/tmp/ launch-vbXRyu/:0″. If an X client connects to this, it will actually connect to launchd, which will start Xquartz if needed and pass the client’s socket to the server.</p></blockquote>
<blockquote><p>       All of that should be invisible to you; the X client library (libX11.dylib) was modified to support this, and all X11 applications link against this library. “DISPLAY=:0″ would still work if X11.app is already running, but it will not trigger X11 to launch.</p></blockquote>
<p>So in other words, we are not supposed to set the shell environmental variable <strong>DISPLAY</strong> to &#8220;:0&#8243;. Well, I removed all the times I set it from .tcshrc, .bashrc, .login, etc and it still remained stubbornly set until I remembered trying to get Carbon Emacs working a few months back required my setting environmental variables to my entire session using the <span style="font-style: italic"><strong>~/.MacOSX/environment.plist</strong></span> file. I opened it, removed the <strong>DISPLAY</strong> variable from the list of those set for the entire session, and viola. Almost everything worked as advertised except:</li>
<li>     <a href="http://hea-www.harvard.edu/RD/ds9/beta.html">SAOImage DS9</a> refused to launch because of the non-standard DISPLAY variable. I initially hacked around this by launching an xgterm (from IRAF) and setting the DISPLAY variable in it to &#8220;:0&#8243; then launching ds9 within that xgterm session. I did this all in one line via: <pre>xgterm -geometry 80x45+40+30 -sb -e &#039;setenv DISPLAY :0; ds9 -fifo ~/iraf/dev/imt1 -geometry 800x800+600+30 &amp;amp;&#039;</pre>where I was connecting to my IRAF pipes (thus the &#8216;fifo&#8217; command line entry). However, I emailed the SAOImage DS9 folks on Thanksgiving and they replied same day to tell me about the new <a href="http://hea-www.harvard.edu/RD/ds9/beta.html">ds9 darwin 5.1beta</a>. That fixed the launch issues with ds9. Apparently getting the Aqua version updated is a bit trickier, so its not done yet.</li>
<li>I had to uninstall the MacPorts version of <a href="http://www.clearskyinstitute.com/xephem/">xephem</a>, but installing it manually from the source worked just fine.</li>
<li>I installed the unofficial updates to X11 from Xdarwin (see <a href="http://macsingularity.org/2007/11/07/some-unofficial-improvements-to-x11-on-leopard/">MacSingularity for some notes</a>). The biggest issues this fixes are (1) the focusing problem of X11 windows behind Aqua windows not always being &#8220;focusable&#8221; and a (b) bug in X11 that caused several programs using the Gimp Toolkit (aka gtk) to crash. <span style="font-weight: bold">NOTE: These updates have been superceeded by those on the <a href="http://trac.macosforge.org/projects/xquartz/wiki/Releases">MacForce XQuartz updates site</a>.</span></li>
</ul>
<p>All in all, I like the new upgrade, the most useful feature for me being the <a href="http://www.apple.com/macosx/features/quicklook.html">QuickLook</a> interface and the just generally better networking behavior. I also think there has been a lot of thought put into nips and tucks (such as where the Firewall controls are now, in the &#8220;security&#8221; prefpane instead of &#8220;sharing&#8221;). More reports from the field as my usage of <a href="http://www.iraf.net/">IRAF</a> and ds9 under Leopard continues.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/11/25/leopard-issues-for-the-astronomer-aka-im-not-sure-x11-is-better/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Texmaker is my latest LaTeX power tool</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/10/10/texmaker/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/10/10/texmaker/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 07:48:06 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/10/10/texmaker/</guid>
		<description><![CDATA[<div class="posttagsblock"><a href="http://technorati.com/tag/LaTeX" rel="tag">LaTeX</a></div>]]></description>
			<content:encoded><![CDATA[<p>There are a wide variety of <a href="http://www.latex-project.org/">LaTeX</a> front-ends out there. I recently discovered <a href="http://www.xm1math.net/texmaker/">Texmaker</a> and I like it a lot. It&#8217;s not quite Mac native, so the interface takes a little getting used to, but has a nice syntax-coloring editor, some latex-specific menu items for inserting symbols and math, and it is free. You can <a href="http://www.xm1math.net/texmaker/download.html">download it here</a>, but I would recommend installing <a href="http://aspell.net/">aspell</a> (for spell checking) via <a href="http://www.macports.org/">macports</a> instead of using <a href="http://fink.sf.net/">fink</a>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/10/10/texmaker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ChkTeX on Mac OS X</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/10/09/chktex-on-mac-os-x/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/10/09/chktex-on-mac-os-x/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 11:27:01 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/10/09/chktex-on-mac-os-x/</guid>
		<description><![CDATA[<div class="posttagsblock"><a href="http://technorati.com/tag/LaTeX" rel="tag">LaTeX</a></div>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t played with this personally yet, but since I will be working on a paper for publication shortly, it looks like this might come in very handy. A Dr. Figueroa-Centeno in the Department of Mathematics in Hawai`i has <a href="http://www2.hawaii.edu/%7Eramonf/ChkTeXonMacOSX/index.html">posted instructions</a> for getting the LaTeX syntax checker, <a href="http://baruch.ev-en.org/proj/chktex/">ChkTeX</a>, running under MacOS X. It doesn&#8217;t look terribly difficult. He includes instructions and a script for <a href="http://www.barebones.com/">BBEdit</a> integration, which makes me a happier BBEdit user. To quote from the <a href="http://baruch.ev-en.org/proj/chktex/">ChkTeX</a> website:<br />
<blockquote cite="http://baruch.ev-en.org/proj/chktex/">   [ChkTeX] has been written in frustration because some constructs in LaTeX are sometimes non-intuitive, and easy to forget. It is <u>not</u> a replacement for the built-in checker in LaTeX; however it catches some typographic errors LaTeX oversees. In other words, it is Lint for LaTeX.</p></blockquote>
<p>Looks promising for me. I use <a href="http://splint.org/">Splint</a> when C programming (I installed <span style="font-style: italic">splint</span> via <a href="http://www.macports.org/">MacPorts</a> using the command line <span style="font-style: italic">sudo port install splint</span>), so the idea of a Lint for LaTeX is appealing. I&#8217;ll be visiting Dr. Figueroa-Centeno&#8217;s website on <a href="http://www2.hawaii.edu/%7Eramonf/ChkTeXonMacOSX/index.html"><cite>ChkTeX on Mac OS X</cite></a> for full details on installing it, once I get a break from teaching.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/10/09/chktex-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems switching to MacPorts version of xephem</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/08/16/geting-macports-xephem-working-right/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/08/16/geting-macports-xephem-working-right/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 23:02:40 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/08/16/geting-macports-xephem-working-right/</guid>
		<description><![CDATA[MacPorts is an easy way to install a lot of programs. However, it does occasionally have glitches. I installed xephem, a very powerful astronomical ephemeris package, today using

sudo port install xephem
Everything worked fine except when I launched xephem, it couldn&#8217;t seem to find any of its ancillary data files. A quick search revealed that they [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.macports.org/">MacPorts</a> is an easy way to install a lot of programs. However, it does occasionally have glitches. I installed <em>xephem</em>, a very powerful astronomical ephemeris package, today using<br />
<pre><pre>
sudo port install xephem</pre></pre><br />
Everything worked fine except when I launched <em>xephem</em>, it couldn&#8217;t seem to find any of its ancillary data files. A quick search revealed that they were located in <em>/opt/local/share/xephem/</em>. I suspect because I previously used a manually installed version of <em>xephem</em>, it was searching for the ancillary files in <em>/usr/local/xephem</em> and not finding the data there. After reviewing the documentation for <em>xephem</em> the solution turned out to be simple. I was storing my private settings in the directory <em>~/.xephem</em> and telling <em>xephem</em> to look in that directory using the following line in my <em>~/.xephemrc</em> file<br />
<pre><pre>
XEphem.PrivateDir: ~/.xephem</pre></pre><br />
So all I did was open the file <em>~/.xephem/XEphem</em> (capitalization important) and edit the line pointing to the shared directory to read:<br />
<pre><pre>
XEphem.ShareDir: /opt/local/share/xephem/</pre></pre><br />
That told <span style="font-style: italic">xephem</span> to look in the new location in the MacPorts directories and not the default one in <em>/usr/local/xephem</em>.</p>
<p>I guess RTFM can actually be important!</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/08/16/geting-macports-xephem-working-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annoyance: Xterm Tektronix emulation broken on MacOS</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/xterm-tektronix-emulation-broken-on-macos/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/xterm-tektronix-emulation-broken-on-macos/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 17:55:22 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/xterm-tektronix-emulation-broken-on-macos/</guid>
		<description><![CDATA[Another piece of a fundamental unix installation that is broken in MacOS X Tiger is xterm.  Specifically, the Tektronix 4014 emulation in xterm on the macintosh generations 'empty boxes' instead of actual characters for text.
]]></description>
			<content:encoded><![CDATA[<p>Another piece of a fundamental *nix installation that is broken in MacOS X Tiger is <span style="font-family: monospace; font-size: 9pt">xterm</span>.  Specifically, the Tektronix 4014 emulation in <span style="font-family: monospace; font-size: 9pt">xterm</span> on the Mac generates &#8216;empty boxes&#8217; instead of actual characters for text as shown below:</p>
<p><a href="http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/2007/07/xterm-badfont.jpg" onclick="window.open('http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/2007/07/xterm-badfont.jpg','popup','width=754,height=591,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false"><img src="http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/2007/07/xterm-badfont-tm.jpg" alt="Xterm Broken Display" title="Xterm Broken Display" longdesc="Tektronix emulation is broken on default xterm on MacOS X Tiger" border="1" height="313" hspace="4" vspace="4" width="400" /></a></p>
<p>I found that this problem had been reported on Apple&#8217;s X11-users mailing list <a href="http://lists.apple.com/archives/x11-users/2005/Aug/msg00063.html">here</a>, but no solution had been determined.  I spent a bit of time looking for &#8220;missing&#8221; fonts as suggested in the posting, then decided this had to be a problem with the <span style="font-family: monospace; font-size: 9pt">xterm</span> executable and tried my previous solution of installing the program from MacPorts via<br />
<pre>sudo port install xterm</pre><br />
Since that doesn&#8217;t over-ride the default xterm, I then over-rode the default installed <span style="font-family: monospace; font-size: 9pt">xterm</span> using<br />
<pre><pre>sudo mv /usr/X11R6/bin/xterm /usr/X11R6/bin/xterm.disabled
sudo ln -s /opt/local/bin/xterm /usr/X11R6/bin/xterm</pre></pre><br />
Now Tektronix emulation works and I get a screen like the one below:</p>
<p><a href="http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/2007/07/xterm-fixed.jpg" onclick="window.open('http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/2007/07/xterm-fixed.jpg','popup','width=754,height=591,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false"><img src="http://iparrizar.mnstate.edu/~juan/urania/wp-content/media/2007/07/xterm-fixed-tm.jpg" alt="Fixed Tektronix display on xterm" title="Fixed Tektronix display on xterm" border="1" height="313" hspace="4" vspace="4" width="400" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/xterm-tektronix-emulation-broken-on-macos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annoyance: ksh doesn&#8217;t work on MacOS X Tiger</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/ksh-doesnt-work-on-macos-x-tiger/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/ksh-doesnt-work-on-macos-x-tiger/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 16:38:23 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Command Line Tricks]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacOS X Annoyances]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/ksh-doesnt-work-on-macos-x-tiger/</guid>
		<description><![CDATA[After several days of trying to get the Hectospec folk's specroad package working on my Mac, I realized one of the major problems was that ksh on the Macintosh had a major problem.]]></description>
			<content:encoded><![CDATA[<p>After several days of trying to get the <a href="http://www.cfa.harvard.edu/mmti/hectospec.html">Hectospec</a> folk&#8217;s <a href="http://tdc-www.harvard.edu/instruments/hectospec/software.html">data reduction packages </a>working on my Mac, I realized one of the major problems was that ksh on the Macintosh had a major problem.  Normally, in ksh (korn shell), you can set up a loop to read through a list of objects via a read command within a <span style="font-family: monospace; font-size: 9pt">while..do</span> loop.  For example, to echo a list of files your ksh script could contain<br />
<pre><pre>#!/bin/ksh
ls -1 . | while read fname; do
&nbsp;&nbsp;echo $fname
done</pre></pre><br />
where the <span style="font-family: monospace; font-size: 9pt">read filename</span> bit reads a line from the piped input and assigns the first block of text (before a space) to the variable <span style="font-family: monospace; font-size: 9pt">fname</span>.  Try this script on MacOS X and it produces no output.  &#8220;read&#8221; fails.  This has been documented elsewhere at least twice that I have been able to find with Google, <a href="https://mailman.research.att.com/pipermail/ast-users/2005q4/000730.html">here</a> and <a href="http://gcc.gnu.org/ml/java-prs/2006-q2/msg00355.html">here</a>.  So clearly, there is a serious bug in the installed version of ksh on MacOS X.  I fixed it by updating my ksh using MacPorts, a simple<br />
<pre>sudo port install ksh93</pre><br />
followed by changes in the Hectospec scripts to point to<span style="font-family: monospace; font-size: 9pt">/opt/local/bin/ksh</span> instead of <span style="font-family: monospace; font-size: 9pt">/bin/ksh</span> and I was done.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/07/19/ksh-doesnt-work-on-macos-x-tiger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HINT: Getting AASTeX Installed on a Mac for all users.</title>
		<link>http://iparrizar.mnstate.edu/~juan/urania/2007/07/13/getting-aastex-installed-on-a-mac-for-all-users/</link>
		<comments>http://iparrizar.mnstate.edu/~juan/urania/2007/07/13/getting-aastex-installed-on-a-mac-for-all-users/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 18:20:02 +0000</pubDate>
		<dc:creator>Juan</dc:creator>
				<category><![CDATA[Astronomical Software]]></category>
		<category><![CDATA[Command Line Tricks]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://iparrizar.mnstate.edu/~juan/urania/2007/01/05/getting-aastex-installed-on-a-mac-for-all-users/</guid>
		<description><![CDATA[NOTE: I will assume you have installed teTeX (a modern LaTeX package) in one of a variety of ways.  Personally I recommend either Fink or MacPorts.  However you can get a lot more information about this by visiting the &#8220;Getting Started&#8221; page at the Mac TeX website.
AASTeX is used to help typeset publications [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>NOTE: </strong>I will assume you have installed teTeX (a modern LaTeX package) in one of a variety of ways.  Personally I recommend either <a href="http://fink.sf.net/">Fink</a> or <a href="http://www.macports.org/">MacPorts</a>.  However you can get a lot more information about this by visiting the &#8220;Getting Started&#8221; page at the <a href="http://www.esm.psu.edu/mac-tex/" title="Mac TeX">Mac TeX</a> website.</p></blockquote>
<p><a href="http://www.journals.uchicago.edu/AAS/AASTeX/" title="AASTeX homepage">AASTeX</a> is used to help typeset publications for all the major astronomical journals (at least in the US).  You have two fundamental options for installing AASTeX on the Mac:</p>
<ol>
<li><strong>Single User Install:</strong> The easiest way is to download AASTeX (the version for LaTeX 2e) from <a href="http://www.journals.uchicago.edu/AAS/AASTeX/" title="AASTeX homepage">http://www.journals.uchicago.edu/AAS/AASTeX/</a> and then just copy the <span style="font-family: monospace; font-size: 9pt">aastex.cls</span> file to whatever directory contains your latex source code for your paper.  It should work just fine if you do that.</li>
<li><strong>Global Install: </strong>If you want to make the AASTeX class file available to all your Mac users, you need to install it globally where the laTeX installation keeps its latex libraries.  The easiest way to do this is to first determine where teTeX keeps its laTeX libraries (referred to as TEXMFMAIN).  One simple way to do this is to type the following from the command line<br />
<pre>texconfig conf | grep TEXMFMAIN</pre><br />
Once you have found that directory, edit the Makefile that comes with AASTeX so that INSTALLDIR equals that directory and fire off a<br />
<pre>sudo make install</pre><br />
Once you have installed AASTeX, run<br />
<pre>sudo texconfig rehash</pre><br />
And you should be set.</li>
</ol>
<p>P.S. &#8211; Most teTeX installs come set to European paper sizes.  If you want US Letter size, just run the configuration program and set US Letter size pages as the default using:<br />
<pre>sudo texconfig</pre><br />
Its text menu driven and pretty straight forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://iparrizar.mnstate.edu/~juan/urania/2007/07/13/getting-aastex-installed-on-a-mac-for-all-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
