tag:blogger.com,1999:blog-16903260350374617152023-11-16T07:12:52.267+01:00Handy snippets notebookMy notebook like collection of snippets coming handy when trying to cross compile apps on win and mac systems.Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-1690326035037461715.post-39039335271258948862015-02-13T10:46:00.001+01:002015-02-13T10:46:09.646+01:00Matlab installation on LinuxThe Matlab R2014 installer on Linux by default proposes to install in <span style="font-family: Courier New, Courier, monospace;">/usr/local/</span>.<br />
If you want to follow the default, you then have to run the installer as root.<br />
The problem is, that then your <span style="font-family: Courier New, Courier, monospace;">pathdef.m</span> file is also locked.<br />
The workaround I found is to change its permissions to <span style="font-family: Courier New, Courier, monospace;">666</span> (cf. screenshot below).<br />
If somebody knows a better solution, please let me know<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7NmzIoyjxlGzMRQPaexPUKwMOBXF1m1sfRcUczu9cs82rXYVY5TJa8-ZBwHholPnRma8Wgk6JpE4Z3CcgPlIJ8bCXhq0wo2CQ1ZqnjdlbnvGu8-gdu_MsANo2Dp67Dad7BHiqUK7B0jt/s1600/ML_pathdef_UNlocked.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7NmzIoyjxlGzMRQPaexPUKwMOBXF1m1sfRcUczu9cs82rXYVY5TJa8-ZBwHholPnRma8Wgk6JpE4Z3CcgPlIJ8bCXhq0wo2CQ1ZqnjdlbnvGu8-gdu_MsANo2Dp67Dad7BHiqUK7B0jt/s1600/ML_pathdef_UNlocked.png" height="640" width="601" /></a></div>
<br />Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com1tag:blogger.com,1999:blog-1690326035037461715.post-9773957281290098992009-10-23T15:43:00.001+02:002009-10-23T15:46:59.093+02:00Split my local SVN archiveAmong the years spent at IMT, my SVN repository has become bloated with many things, some of which are not directly related to the work done at Parlab. Before the group closes, I plan to release the software I wrote as open-source, and hopefully with the full SVN history of this software. This requires to split up my bloated repository into smaller units.<div><br /></div><div>I tried to go the 'svnadmin dump' 'svndumpfilter' way, but this did not work due to my abuse usage of cheap copies (thank to the TortoiseSVN copy option). The 'svndumpfilter2' and '<a href="http://furius.ca/pubcode/pub/conf/common/bin/svndumpfilter3.html">svndumpfilter3</a>' replacements did not work either.</div><div><br /></div><div>svndumpfilter failed on the first revision with a copy from a non-included path</div><div><br /></div><div>svndumpfilter2 produced a dumpfile, but displayed various errors from svnlook while running.</div><div>The dumpfile could not be exported to a repository.</div><div><br /></div><div>svndumpilter3 seemd to process everything, but produced many strange beeps during exectution, probably caused by invalid UTF-8 interpretations of binary data (png images and so on). And I failed to find the output dumpfile :-/ Maybe clearer usage explenations from the author would have helped.</div><div><br /></div><div><br /></div><div>Right now, I'm trying to follow the instructions by Cott Lang at Internet Stall, who seems to have encountered the same issues I had with 'svndumpfilter*'</div><div><a href="http://www.internetstaff.com/roller/blog/date/20090625">http://www.internetstaff.com/roller/blog/date/20090625</a></div><div><br /></div><div><br /></div><div><br /></div><div>The target repository for sync is created by :</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:tempSVN james$ svnadmin create --fs-type fsfs /tempSVN/FSFS/docREP/</span></span></div><div><br /></div><div>and now, the svnsync preparation, according to <a href="http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.replication">http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.replication</a></div><div>First, change the <span class="Apple-style-span" style="font-family:'courier new';">pre-revprop-change</span> script (done in step 3 in <a href="http://www.internetstaff.com/roller/blog/date/20090625">Cott Lang's howto</a>):</div><div><span class="Apple-style-span" style="color:#33FF33;"><span class="Apple-style-span" style="font-family:'courier new';">jamesMBpro:tempSVN james$ smultron ./FSFS/docREP/hooks/pre-revprop-change</span></span></div><div><br /></div><div><span class="Apple-style-span" style="font-family:serif;font-size:medium;"><pre class="programlisting" style="font-family: monospace; font-style: normal; font-weight: normal; font-size: 12px; color: black; margin-top: 1em; margin-right: 0.25in; margin-bottom: 1em; margin-left: 0.25in; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(240, 240, 240); border-top-color: black; border-top-style: dotted; border-top-width: 1px; border-left-color: black; border-left-style: dotted; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 2px; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 2px; ">#!/bin/sh USER="$3" if [ "$USER" = "syncuser" ]; then exit 0; fi echo "Only the syncuser user may change revision properties" >&2 exit 1</pre></span></div><div><br /></div><div><br /></div><div>and then, change the <span class="Apple-style-span" style="font-family:'courier new';">start-commit</span> script:</div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:tempSVN james$ smultron ./FSFS/docREP/hooks/start-commit</span></span></div><div><br /></div><div><span class="Apple-style-span" style="font-family:serif;font-size:medium;"><pre class="programlisting" style="font-family: monospace; font-style: normal; font-weight: normal; font-size: 12px; color: black; margin-top: 1em; margin-right: 0.25in; margin-bottom: 1em; margin-left: 0.25in; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(240, 240, 240); border-top-color: black; border-top-style: dotted; border-top-width: 1px; border-left-color: black; border-left-style: dotted; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 2px; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 2px; ">#!/bin/sh USER="$2" if [ "$USER" = "syncuser" ]; then exit 0; fi echo "Only the syncuser user may commit new revisions" >&2 exit 1</pre></span></div><div><br /></div><div>svnsync initialization:</div></div><div><br /></div><div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">jamesMBpro:tempSVN james$ svnsync initialize file:///tempSVN/FSFS/docREP file:///tempSVN/svnIMTtemp/trunk/doc --sync-username syncuser --sync-password syncpwd</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">Copied properties for revision 0.</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">jamesMBpro:tempSVN james$</span></span></div><div><br /></div><div>then, the copying in itself:</div></div><div><br /></div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:tempSVN james$ svnsync synchronize file:///tempSVN/FSFS/docREP --sync-username syncuser --sync-password syncpwd</span></span></div><div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Committed revision 1.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Copied properties for revision 1.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Committed revision 2.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Copied properties for revision 2.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Committed revision 3.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Copied properties for revision 3.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">.</span></span></div></div><div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Transmitting file data ...........</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Committed revision 2597.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Copied properties for revision 2597.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Transmitting file data .</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Committed revision 2598.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Copied properties for revision 2598.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Transmitting file data ...</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Committed revision 2599.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Copied properties for revision 2599.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:tempSVN james$</span></span></div><div><br /></div><div>Now, check the copied repository.</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:~ james$ cd /tempSVN/coTest/</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:coTest james$ mkdir docTest</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:coTest james$ cd docTest/</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:docTest james$ svn checkout file:///tempSVN/FSFS/docREP</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">A docREP/trunk</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">A docREP/trunk/doc</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">.</span></span></div><div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">A docREP/trunk/doc/JMuWebsite/WebContent/default.php</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">A docREP/trunk/doc/JMuWebsite/WebContent/video_occlusion.php</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">Checked out revision 2599.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#66FF99;">jamesMBpro:docREP james$</span></span></div><div><br /></div></div><div>One potential hickup here. The synced repository has the same directory structure as the original repository had (in this case, trailing /trunk/doc/). Nevertheless, the checkout seemed to work, let's see what the log has to say.</div></div></div><div><br /></div></div><div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">jamesMBpro:docTest james$ cd docREP/</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">jamesMBpro:docREP james$ svn log</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">r2599 | james | 2009-10-19 19:07:33 +0200 (Mon, 19 Oct 2009) | 2 lines</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">+ changed website links to include thesis draft, presentations</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">+ fixed some of www-imt dead links</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">r2598 | muredubo | 2009-10-16 16:00:25 +0200 (Fri, 16 Oct 2009) | 1 line</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">done ?</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">r2597 | muredubo | 2009-10-16 15:36:45 +0200 (Fri, 16 Oct 2009) | 1 line</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">almost done</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">.</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">.</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">.</span></span></div><div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">r4 | mtzamofing | 2004-11-26 08:39:13 +0100 (Fri, 26 Nov 2004) | 2 lines</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">*** empty log message ***</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">r3 | mtzamofing | 2004-11-25 14:59:38 +0100 (Thu, 25 Nov 2004) | 2 lines</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">*** empty log message ***</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">r2 | mtzamofing | 2004-11-25 14:38:34 +0100 (Thu, 25 Nov 2004) | 2 lines</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">*** empty log message ***</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">r1 | (no author) | 2004-11-25 14:38:34 +0100 (Thu, 25 Nov 2004) | 1 line</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">Standard project directories initialized by cvs2svn.</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">------------------------------------------------------------------------</span></span></div><div><span class="Apple-style-span" style="color:#66FF99;"><span class="Apple-style-span" style="font-family:'courier new';">jamesMBpro:docREP james$</span></span></div><div><br /></div></div></div><div>Building of one of the most important LaTeX document in this repository (my PhD thesis) worked flawlessly on the first try. Of course, more validation of the robustness of this copy is required, but this is encouraging.</div><div><br /></div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-32198632465541289142009-10-13T21:27:00.005+02:002009-10-14T09:56:07.188+02:00Updates, Quicktime, Nvidia Quadro and BSODsI regularly update the software on the Quad Core machine I use for development in our lab: a Dell Precision 390 with a Nvidia Quadro FX 3450 graphics card. Recently, I began experiencing problems which seemed related to the graphics card. The display would freeze indefinitely, or change to the infamous BSOD.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhokVgYEJSv_VWbTkCi44rzGtBWjnnmtOwtn26oO0f6TBOtaRcPim4of54idOYkCz8S7C61ZQcCJDzLRum_Kz22Da_HH2_NA5X3q5A634j1xa1WedktgPK65LvEXcEG3QLos48_CQOLrukD/s1600-h/precision390bsod.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhokVgYEJSv_VWbTkCi44rzGtBWjnnmtOwtn26oO0f6TBOtaRcPim4of54idOYkCz8S7C61ZQcCJDzLRum_Kz22Da_HH2_NA5X3q5A634j1xa1WedktgPK65LvEXcEG3QLos48_CQOLrukD/s320/precision390bsod.jpg" alt="" id="BLOGGER_PHOTO_ID_5392361015076402802" border="0" /></a><br /><br />Sometimes upon starting or restarting the machine, the display would be garbled, as if the VGA connector wasn't properly connected (it was). On various occasions, Windows detected a corrupt disk upon restart, but the automated chkdsk seemed to always be able to fix the problem (in 30 minutes).<div><br /><div>Remembering that the latest Windows update included an update to the Nvidia driver, I thought I had found the culprit. I foolishly tried to roll back to Dell's driver, from Dell's website.</div><div><a href="http://support.euro.dell.com/support/downloads/driverslist.aspx?c=ch&l=en&s=gen&ServiceTag=&SystemID=LATITUDE%20PRECISION%20%20390&os=WW1&osl=en&catid=&impid=">http://support.euro.dell.com/support/downloads/driverslist.aspx?c=ch&l=en&s=gen&ServiceTag=&SystemID=LATITUDE%20PRECISION</a></div><div><a href="http://support.euro.dell.com/support/downloads/driverslist.aspx?c=ch&l=en&s=gen&ServiceTag=&SystemID=LATITUDE%20PRECISION%20%20390&os=WW1&osl=en&catid=&impid=">%20390&os=WW1&osl=en&catid=&impid=</a></div><div>Note that apparently Dell also provides a vintage Quadro FX3450 BIOS (v5.41.02.51.01 from 01.12.2006) ! The old driver (v84.26 from 01.11.2007) seemed to install correctly, until it asked permission to restart the machine. Upon login after the restart, the driver installation program resumed, and managed to garble the display in ways that appear quite artistic in retrospective.</div><div><br /></div><div>One hard reboot later, I decided to let Dell's abandon-driver to rest, and proceeded to download and install NVidia newest driver.</div><div><a href="http://www.nvidia.com/object/Quadro_winxp_x32_191.00_whql.html">http://www.nvidia.com/object/Quadro_winxp_x32_191.00_whql.html</a></div><div>Alas, the bluescreen problem reappeared after only a few hours. Seriously bedazzled, I did waht I should have done first, I fired MS computer management utility, to look at error logs.</div><div>And there it was, numerous warnings about paging errors, followed by critical errors attributed either to my system drive, or to iaStor.sys This got me worried about a possible failure of the hard disk drive.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_lFWEFK2uQ-APUcMHpjK69te5cyUvGus1uyZygtsbl6nu3UPz170FSi7KL5v9sHihsPXwb7_mA9X7Qg-WnrCE-OUDmZLkh5G1zJUz1xc8g8J04qu3-A4BhgvIMADbOEGuErKdpIXpIXHo/s1600-h/iaStorErrors.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_lFWEFK2uQ-APUcMHpjK69te5cyUvGus1uyZygtsbl6nu3UPz170FSi7KL5v9sHihsPXwb7_mA9X7Qg-WnrCE-OUDmZLkh5G1zJUz1xc8g8J04qu3-A4BhgvIMADbOEGuErKdpIXpIXHo/s320/iaStorErrors.jpg" alt="" id="BLOGGER_PHOTO_ID_5392361264859937522" border="0" /></a><br /><br /></div><div>I remembered that while I was updating the system through Windows update, I had selected to install the optional Intel Matrix Storage software. But had finally not activated it since the system contains only 2 hard drives, on used for WinXP, and the other one for CentOS.</div><div><br /></div><div>To my relief, hardware failure became less likely after a quick google search turned out many disturbing links, suggesting that Dell and iaStor are a risky combination :</div><div><a href="http://www.google.com/search?rls=en&q=dell+precision+390+nvidia+iaStor&ie=UTF-8&oe=UTF-8">http://www.google.com/search?rls=en&q=dell+precision+390+nvidia+iaStor&ie=UTF-8&oe=UTF-8</a></div><div> see in particular:</div><div><a href="http://www.ydeologi.com/2006/04/26/dell-dimension-e510-iastorsys-windows-xp-blue-screen-error-stop-code-0x000000d1/">Things Worth Knowing » Blog Archive » Dell Dimension E510, iastor ...</a></div><div>Shortly after, I stumbled on the following link : </div><div><a href="http://www.istartedsomething.com/20070712/quicktime-bug-nvidia-sata-vista/">http://www.istartedsomething.com/20070712/quicktime-bug-nvidia-sata-vista/</a></div><div><br /></div><div>And then, bing (no pun intented), it hit me. I had also been asked by Apple update if I wanted a new version of iTunes and Quicktime. I decided to pass on iTunes, but said Ok to Quicktime.</div><div>Note that the post linked above concerns Vista, and I'm running XP. But the message I got is that Quicktime can induce trouble with iaStor on Dell Precision 390 systems.</div><div><br /></div><div>Since I did not need the RAID software, I first uninstalled Intel Matrix Storage. However, this did not prevent the BSODs from returning. Which suggests that this software is not responsible for the crashes I experienced.</div><div><br /></div><div>So, I uninstalled Quicktime, and tada, the crashes stopped. For now, I'm a happy camper (without Quicktime), and I can go back to my spherical Fourier transforms for DynamicVA. </div><div>But I really hope Apple fixes wahtever is wrong with QuickTime.</div><div><br /></div><div><br /></div></div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-74628182450164167962009-09-27T17:42:00.003+02:002009-09-27T18:05:33.221+02:00FFTW issues in Matlab on MacFor the project I'm currently working on (<a href="dynamic visual attention (VA) on the sphere">dVA on sphere</a>), I'm using the <a href="http://rhea.tele.ucl.ac.be/yawtb/">Yawtb</a> toolbox, with the <a href="http://www.cs.dartmouth.edu/~geelong/sphere/">S2Kit</a> interface (see previous post) . This interface is faster when it uses <a href="http://www.fftw.org/">FFTW3</a>. <div>I followed the build instructions for S2Kit, using <a href="http://www.macports.org/">Macports</a>'s FFTW. S2Kit built and tested ok from command line. Testing the integration in Yawtb, I encountered a linker error:</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';">>> yademo s2fst</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">% Sample(s) of code for S2FST</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">% </span></div><div><span class="Apple-style-span" style="font-family:'courier new';">% </span></div><div><span class="Apple-style-span" style="font-family:'courier new';">>> [phi,theta] = sphgrid(46,46); %% <press></span></div><div><span class="Apple-style-span" style="font-family:'courier new';">>> mat = exp(-tan(theta/2).^2) .* ( phi == phi(1,10)); %% <press></span></div><div><span class="Apple-style-span" style="font-family:'courier new';">>> fmat = s2fst(mat); %% <press></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family: Georgia, serif; "></span><span class="Apple-style-span" style="color:#FF0000;">??? Invalid MEX-file '/IM2sandbox/yawtb/interfaces/s2kit/s2fst.mexmaci':</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;">dlopen(/IM2sandbox/yawtb/interfaces/s2kit/s2fst.mexmaci, 1): Library not loaded: /opt/local/lib/libfftw3.3.dylib</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"> Referenced from: /IM2sandbox/yawtb/interfaces/s2kit/s2fst.mexmaci</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"> Reason: Incompatible library version: s2fst.mexmaci requires version 6.0.0 or later, but libfftw3.dylib provides version</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"> 5.0.0.</span></span></div><div><span class="Apple-style-span" style="color:#FF0000;"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new', serif;"><div><span class="Apple-style-span" style="color:#FF0000;">Error in ==> yademo at 77</span></div><div><span class="Apple-style-span" style="color:#FF0000;"> eval(subcode(3:end));</span></div></span></div></div><div><br /></div><div>Some googling after (see comments <a href="http://www.mathworks.com/matlabcentral/fileexchange/8427">here</a>), I learned that this comes from a version mismatch between Matlab's FFTW and the newer Macports version. </div><div><br /></div><div>Contrary to Geoffrey, I decided to update the lib in Matlab (quite similarly to the suggestion <a href="http://www.mathworks.com/support/solutions/en/data/1-2H64MF/index.html">here</a>). Note: a backup is recommended. In my case, the fix implied copying <span class="Apple-style-span" style="font-family:'courier new';">libfftw3.dylib</span> and <span class="Apple-style-span" style="font-family:'courier new';">libfftw3.dylib</span> from <span class="Apple-style-span" style="font-family:'courier new';">/opt/local/lib</span> to <span class="Apple-style-span" style="font-family:'courier new';">/Applications/MATLAB_R2008b.app/bin/maci/</span> .</div><div><br /></div><div>And now, the <span class="Apple-style-span" style="font-family:'courier new';">yademo s2fst</span> example works great :-)</div><div>Note that I did not check whether this fix breaks other FFTW related code. YMMV.</div><div><br /></div><div><br /></div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-56035937599277651152009-09-27T16:36:00.007+02:002009-09-29T17:02:32.146+02:00Spherical wavelets toolbox - run on windowsI recently began to work on a project concerning <a href="http://parlab.epfl.ch/page79370.html?matrix=1237804301483">dynamic visual attention (VA) on the sphere</a>, and the current code base uses <a href="http://rhea.tele.ucl.ac.be/yawtb/">Yawtb</a> and <a href="http://www.cs.dartmouth.edu/~geelong/sphere/">SpharmonicKit</a>.<div>Since the camera used in the project has only MS Windows drivers, I wanted to run the algorithms in the same OS. A quick google search turned only to posts with similar questions (see questions on <a href="http://rodgers.org.uk/software">Chris Rodgers software blog</a>).</div><div>So, I took the plunge and tried to compile on my WinXP SP3 box, with MS Visual Studio 2005. I used <a href="http://industriousone.com/premake">premake</a> to create the target projects, based on a quick look at the Makefiles. Note that I replaced the SpharmonicKit27 interface with the more recent <a href="http://www.cs.dartmouth.edu/~geelong/sphere/">S2Kit</a>, which uses fftw for faster Fourier transforms.</div><div>Apparently, MS compilers have gained in compliance to ANSI standards over the years. The only issues I had were:</div><div><ul><li><b>undefined M_PI </b><span class="Apple-style-span" style="font-family:georgia;">for both Yawtb and S2Kit</span></li></ul><div>fixed with <span class="Apple-style-span" style="font-family:'courier new';">'#define _USE_MATH_DEFINES'</span> in files including math.h</div><ul><li><span class="Apple-style-span" style="font-family:'courier new';">srand48()</span> and <span class="Apple-style-span" style="font-family:'courier new';">drand48()</span> could not be found (for S2Kit test files)</li></ul><div>here, the fix is less obvious. For now I just used <span class="Apple-style-span" style="font-family:'courier new';">rand()</span> and <span class="Apple-style-span" style="font-family:'courier new';">(double) rand() / (double) RAND_MAX</span> , but this is probably far from optimal (please don't flame for not using your favorite RNG ;-).</div><div><br /></div><div>A copy of the modified S2Kit is available at</div><div><span class="Apple-style-span" style=" color: rgb(51, 51, 51); line-height: 19px; font-family:verdana, tahoma, arial, sans-serif;font-size:12px;"><a href="https://documents.epfl.ch/users/m/mu/muredubo/www/s2kit10.zip">https://documents.epfl.ch/users/m/mu/muredubo/www/s2kit10.zip</a></span></div><div>while the modified Yawtb is at:</div><div><span class="Apple-style-span" style=" color: rgb(51, 51, 51); line-height: 19px; font-family:verdana, tahoma, arial, sans-serif;font-size:12px;"><a href="https://documents.epfl.ch/users/m/mu/muredubo/www/yawtb.zip">https://documents.epfl.ch/users/m/mu/muredubo/www/yawtb.zip</a></span></div><div><br /></div><div>Beware, those quick patches run on my XP machine, but have not been thoroughly tested. Your mileage may vary.</div></div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-7001330817761835232009-08-20T17:54:00.003+02:002009-09-29T17:04:09.382+02:00Windows explorer crashes when external HDD is connectedI'm running XP SP3, and trying to finish my PhD thesis defense presentation. I had to connect my USB external HDD to find some videos I had archived, because I wanted to include them in the presentation.<br />As I took a break , the screensaver kicked in. When I came back, Windows Explorer had crashed. My machine is currently almost unresponsive.<br />I googled my problem, and quickly found links suggesting that this crash could be related to windows creating thumbs for the videos on the external drive.<br />A fix is proposed by Wile E at<br /><a href="http://forums.techpowerup.com/showthread.php?t=54365">http://forums.techpowerup.com/showthread.php?t=54365</a>:<br /><br /><span style="font-family:courier new;">regsvr32 /u shmedia.dll</span><br /><br />The indexing service popped a mesage box to indicate it stopped, but I'm still unable to restart explorer. So, my next step will be to pull the plug on my external HDD, and reboot. Right now, I cross my fingers hoping that the partitions will still be readable when I plug teh disk back in.Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-54376254789824695582009-08-19T16:43:00.003+02:002009-10-23T15:42:42.636+02:00Latex - Beamer warnings after updateWhile preparing my PhD defense presentation, in ran into the warning:<br /><br /><span style="font-family:courier new;">Package hyperref Warning: Option `pdfpagelabels' is turned off</span><br /><span style="font-family:courier new;">(hyperref) because \thepage is undefined.</span><br /><span style="font-family:courier new;">Hyperref stopped early</span><br /><br />Google was my friensd this day since the first search result provided the appropriate workaround:<br /><a href="http://www.latex-community.org/forum/viewtopic.php?f=5&t=162">http://www.latex-community.org/forum/viewtopic.php?f=5&t=162</a><br /><code style="font-family: courier new;">\documentclass[hyperref={pdfpagelabels=false}]{beamer}</code><br /><br />Cheers to localghost, whose answer allowed me to skip reading the change logs of the hyperref package at such a stressful time.<br /><br /><span style="font-weight: bold;">Edit:</span><br />In fact, all the new warnings I got were related to the update of beamer and hyperref.<br />This blog entry : <a href="http://texblog.net/latex-archive/presentations/beamer-warnings/">http://texblog.net/latex-archive/presentations/beamer-warnings/</a> presents a step by step workaround. Thanks Stefan.Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-45604149964129024432009-06-13T11:31:00.006+02:002009-06-13T11:53:24.496+02:00Cross compilation and string issuesTrying to keep the program I am currently working on up-to-date both on my WinXP box and on a Mac, I run into some cross-compilation pitfalls. While the project builds without warnings in vs2005, it seems that gcc on Mac has a lot to complain about.<br /><br />First of all some deprecated headers apparently used by the macports VTK I'm using:<br /><pre wrap=""><span style="font-size:85%;">In file included from /usr/include/c++/4.0.0/backward/strstream:51,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkIOStream.h:112,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkSystemIncludes.h:40,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkIndent.h:24,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkObjectBase.h:43,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkObject.h:41,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkAlgorithm.h:32,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkPolyDataAlgorithm.h:37,<br /> from<br />../../../../opt/local/var/macports/software/vtk-devel/5.4.0_3+boost+cocoa+darwin_9+data+doc+examples+java+py26+shared+tcl+testing+wrap/opt/local/include/vtk-5.4/vtkCubeSource.h:24,<br /> from CamVtkView.h:14,<br />/usr/include/c++/4.0.0/backward/backward_warning.h:32:2: warning:<br />#warning This file includes at least one deprecated or antiquated<br />header. Please consider using one of the 32 headers found in section<br />17.4.1.2 of the C++ standard. Examples include substituting the <x><br />header for the <x.h> header for C++ includes, or <iostream> instead of<br />the deprecated header <iostream.h>. To disable this warning use<br />-Wno-deprecated.</iostream.h></iostream></x.h></x></span></pre><br />But other warnings allowed me to spot some bug of my own producing:<br /><pre wrap="">CamFrame.cpp:927: warning: cannot pass objects of non-POD type 'class<br />wxString' through '...'; call will abort at runtime</pre>the line was :<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">curImg.sprintf("%s%04u.vtk", _vtkRecPrefix, m_nFrmRead);</span></span><br /><br />while what I intended to do was:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">curImg.Printf(wxT("%s%04u.vtk"), _vtkRecPrefix, m_nFrmRead);</span></span><br /><br />And I found a link which summarizes well wxString usage:<br /><a href="http://wiki.wxwidgets.org/Converting_everything_to_and_from_wxString">http://wiki.wxwidgets.org/Converting_everything_to_and_from_wxString</a>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-67049515133155636452009-06-12T10:15:00.012+02:002009-06-12T12:39:16.238+02:00Easy rotation with Eigen quaternionsCurrently working on improving an alignment software for time-of-flight depth maps, I have to say I find the functions offered by <a href="http://eigen.tuxfamily.org/">Eigen</a> quite useful.<br />Considering the two points clouds below (rendered with VTK), the first step to align them is to rotate them correctly.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBwR-_Y6nnpdpFQVREN7sLCFwATzPYxGvv-9gRhr4Pc5LkVNPlj17R0Qlam38TDrXM2LkHTiyLK2_ZAeHhS3JYhQveC0vUG9RSkN9rpHmDY51NuEGulpdIUWC6t2GyWJ3GKZH2zHnG4pGq/s1600-h/capture_12062009_101408.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBwR-_Y6nnpdpFQVREN7sLCFwATzPYxGvv-9gRhr4Pc5LkVNPlj17R0Qlam38TDrXM2LkHTiyLK2_ZAeHhS3JYhQveC0vUG9RSkN9rpHmDY51NuEGulpdIUWC6t2GyWJ3GKZH2zHnG4pGq/s320/capture_12062009_101408.png" alt="" id="BLOGGER_PHOTO_ID_5346358079254225778" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Z1Jz7O1EqAdGKjfdcrrBnre6uxqWovtYPPeB7GAcQMxX7jSNeHXGqE33Gfh9bQA3wdTz1p87AOIGmdg_q2wS4mZBV5HLcYVqvLB9C57cZXoe6sMK-xfbap4KefZ_Ey0Iw72mmEIW3dfu/s1600-h/capture_12062009_101356.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Z1Jz7O1EqAdGKjfdcrrBnre6uxqWovtYPPeB7GAcQMxX7jSNeHXGqE33Gfh9bQA3wdTz1p87AOIGmdg_q2wS4mZBV5HLcYVqvLB9C57cZXoe6sMK-xfbap4KefZ_Ey0Iw72mmEIW3dfu/s320/capture_12062009_101356.png" alt="" id="BLOGGER_PHOTO_ID_5346358369404102674" border="0" /></a><span style="text-decoration: underline;"><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></span><br /><br /><br /><br />For this task, I use a simple RANSAC to find the largest plane in the point cloud. Then, having the plane normal vector <span style="font-family:courier new;">nVec3</span>, finding the rotation matrix <span style="font-family:courier new;">mat </span>that will align this plane with the Z-axis is 2 Eigen calls away :<br /><br /><span style=";font-family:courier new;font-size:85%;" >Eigen::Vector3d nVecZ; nVecZ.UnitZ();</span><span style="font-size:85%;"><br /></span><span style=";font-family:courier new;font-size:85%;" >Eigen::Quaterniond qz;</span><span style="font-size:85%;"> </span><span style=";font-family:courier new;font-size:85%;" >qz.setFromTwoVectors(nVec3, nVecZ);<br /></span><span style=";font-family:courier new;font-size:85%;" >Eigen::Matrix3d mat = qz.toRotationMatrix();</span><br /><br />And here is the result for the dataset above:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Vm4Gi48wm1uL6RdUeiPwvXdELSsIkXgLy1lIVab4V-_w5WB_q8fK4DBv-begpeRwLRQEVnKkEO4pLx1Sb_Q6pHeLLOpixuh5NKYFsUvcND4cYbhx6aCIQ-01AfkggKCxyuA1IMfrSi5y/s1600-h/capture_12062009_101328.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Vm4Gi48wm1uL6RdUeiPwvXdELSsIkXgLy1lIVab4V-_w5WB_q8fK4DBv-begpeRwLRQEVnKkEO4pLx1Sb_Q6pHeLLOpixuh5NKYFsUvcND4cYbhx6aCIQ-01AfkggKCxyuA1IMfrSi5y/s320/capture_12062009_101328.png" alt="" id="BLOGGER_PHOTO_ID_5346355890100314626" border="0" /></a><br /><br />That's 2 rotation DoF taken care of. Imposing the matched planes to have the same distance to origin takes care of one translation DoF. One rotation and 2 translations to go ;-)Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com1tag:blogger.com,1999:blog-1690326035037461715.post-44661797512985210072009-06-08T21:24:00.007+02:002009-06-08T22:24:31.278+02:00wxEventHandler function do not support overloadingAfter some refactoring of some code I wrote to set the visibility and color of VTK objects with GUI controls from wxWidgets, I had two overloaded functions :<br /><br /><blockquote><br /><span style="font-family:courier new;font-size:85%;">/* acting on visVTK checkbox*/</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">void MainWnd::SetVisVtk(wxCommandEvent& event)</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">{</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtk(_visVtk, m_camFrm,0);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtk(_visBGVtk, m_camFrm,1);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtk(_visFGVtk, m_camFrm,2);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtk(_visSegmVtk, m_camFrm,3);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> _vtkWin->Render();</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">/* acting on visVTK checkbox*/</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">void MainWnd::SetVisVtk(std::vector<wxcheckbox*> visChkBox, std::vector<camframe*> camFrm, int idx)</camframe*></wxcheckbox*></span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">{</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> int i = 0;</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> std::vector<wxcheckbox*>::iterator itCtrl;</wxcheckbox*></span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> std::vector<camframe*>::iterator itCam;</camframe*></span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> for ( itCtrl = visChkBox.begin(), itCam = camFrm.begin();</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> itCtrl != visChkBox.end() , itCam != camFrm.end(); </span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> itCtrl++, itCam++, i++ )</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> {</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> if(!_vtkWin){return;};</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> (*itCam)->hideDataActVtk( !((*itCtrl)->IsChecked()) , idx);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> }</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">}</span><br /></blockquote><br /><br />The code compiled and ran fine on my windows box, but trying to compile on Mac revealed the error. Renaming the worker function to avoid overloading allowed a succesful compilation.<br /><br /><blockquote><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">/* acting on visVTK checkbox*/</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">void MainWnd::SetVisVtk(wxCommandEvent& event)</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">{</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtkIdx(_visVtk, m_camFrm,0);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtkIdx(_visBGVtk, m_camFrm,1);<br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtkIdx(_visFGVtk, m_camFrm,2);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> SetVisVtkIdx(_visSegmVtk, m_camFrm,3);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> _vtkWin->Render();</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">/* acting on visVTK checkbox*/</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">void MainWnd::SetVisVtkIdx(std::vector<wxcheckbox*> visChkBox, std::vector<camframe*> camFrm, int idx)</camframe*></wxcheckbox*></span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">{</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> int i = 0;</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> std::vector<wxcheckbox*>::iterator itCtrl;</wxcheckbox*></span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> std::vector<camframe*>::iterator itCam;</camframe*></span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> for ( itCtrl = visChkBox.begin(), itCam = camFrm.begin();</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> itCtrl != visChkBox.end() , itCam != camFrm.end(); </span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> itCtrl++, itCam++, i++ )</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> {</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> if(!_vtkWin){return;};</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> (*itCam)->hideDataActVtk( !((*itCtrl)->IsChecked()) , idx);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> }</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">}</span><br /></blockquote><br /><br />Of course this should have been obvious from the start, but this is why testing on multiple platform is such a pain. The faulty code compiled flawlessly in vs2005.Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-25290924755843555942009-06-04T08:47:00.006+02:002009-06-04T08:58:10.808+02:00Mercurial on Mac - UTF-8 locale problemsThe <a href="http://eigen.tuxfamily.org/">Eigen</a> project recently switched to <a href="http://www.selenic.com/mercurial/wiki/">Mercuria</a>l. After installing the Macports version of mercurial, it wouldn't work apparently due to locale problems. The solution from this <a href="http://const-cast.blogspot.com/2009/04/mercurial-on-mac-os-x-valueerror.html">blog post</a> worked for me :<div><br /></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); line-height: 17px; font-family:Verdana;font-size:11px;">export LC_ALL=en_US.UTF-8<br />export LANG=en_US.UTF-8</span><br /></div><div><br /></div><div>Thanks Lothar. It's really good when the first hit from a google search is spot on. Now I should get back to my own code and build problems.</div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-63320830031825780632009-06-03T14:49:00.003+02:002009-06-03T20:19:31.013+02:00SVN checkout from local repositorySince my personal repository is hosted on a win server at my university, I use rsync to copy the repository locally on macs. This avoids the hassle of trying to figure out how to use a smb URL with svn.<div>During the process of moving to a new machine, I copied the repository on this machine, and tried to checkout :</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"><div>muredubo$ svn co /Users/muredubo/rsynRep/ /Users/muredubo/svnSandBox/</div><div>svn: '/Users/muredubo/rsynRep' does not appear to be a URL</div><div><br /></div><div><span class="Apple-style-span" style="font-family:georgia;">What I had just forgotten is that even a local repository must be accessed as a URL. This means using </span>file:///<span class="Apple-style-span" style="font-family:georgia;"> with the critical triple slash (I had searched for it long ago, and can't remenber now who I am to thank for this trick). The command:</span></div><div><br /></div><div>muredubo$ svn co file:///Users/muredubo/rsynRep/ /Users/muredubo/svnSandBox/</div><div><br /></div></span></div><div><div>created my sandbox without a glitch.</div></div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-88795445240801608812009-06-03T08:49:00.008+02:002009-06-09T22:15:28.342+02:00New install on MBPSince I inherited an orphan MacBookPro in our lab, I decided to use it to test my cross platform builds. But this is not so straightforward. Prior to testing, I need to put some software / libraries on it.<div>So far :</div><div><br /></div><div><ul><li>apple system updates</li><li>xmarks for safari</li><li>firefox 3.0.10</li><li><span class="Apple-tab-span" style="white-space:pre"> </span>quick locale switcher<br /></li><li><span class="Apple-tab-span" style="white-space:pre"> </span>dowload statusbar<br /></li><li><span class="Apple-tab-span" style="white-space:pre"> </span>flagfox<br /></li><li>xcode 3.1</li><li><a href="http://www.macports.org/">macports 1.7.1</a></li><li><a href="http://trac.macports.org/browser/trunk/dports/aqua/qt4-mac-devel/Portfile">qt4-mac-devel from macports</a> (took 4 hours to build (counting dependencies ^^))</li><li>cisco AnyConnect ( EPFL VPN )</li><li><a href="http://www.tug.org/mactex/">mactex 2008</a></li><li><a href="http://tuppis.com/smultron/">smultron</a></li><li><a href="http://trac.macports.org/browser/trunk/dports/graphics/wxWidgets/Portfile">wxWidgets 2.8.10</a> from macports</li><li>macports python25</li><li>macports python26</li><li><a href="http://trac.macports.org/browser/trunk/dports/graphics/vtk-devel/Portfile">VTK</a> from macports with boost and wrap variants (shared, examples and data variants are default)</li><li><a href="http://industriousone.com/premake">premake</a></li></ul><div>Todo:</div><div><ul><li>Enthought Python </li><li>code-blocks</li><li>many more that I forget</li></ul><div>Edit:</div><div>found a similar blog posting with nice list of apps: <a href="http://blog.hyperjeff.net/?p=148">http://blog.hyperjeff.net/?p=148</a>. I'll have to take a look at the python distros used here.</div></div></div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-79547869614398559502009-06-02T07:28:00.005+02:002009-06-03T15:25:20.946+02:00Opening multiple TexnicCenter instancesOn windows, I like the <a href="http://www.texniccenter.org/">Texniccenter</a> LaTeX frontend. In my opinion, it is a very good tool for handling large Latex projects. One feature I really appreciate is the document structure tree which makes navigation in the LaTeX source much easier. One issue I had is that if you open a new project, it replaces the project in the open instance (at least in the version I use: 1.0 RC1).<br />Fortunately, there is a trick : if you open the main tex file, with same name as the project, Texniccenter loads a new instance, and then asks if it should load the project. This allows to have multiple instances of Texniccenter. I use this a lot when writing my thesis, to copy/paste the code for figures / tables that were published in articles I wrote.Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0tag:blogger.com,1999:blog-1690326035037461715.post-85086436045771457332009-05-28T20:55:00.008+02:002009-05-28T23:25:41.869+02:00First experiments with premake4 on macAfter having delayed my transition to the new version 4 of <a href="http://industriousone.com/premake">premake</a> for quite a long time, I'm trying to switch over without breaking too many things. I did try to switch to premake4 when it was released a few months ago, but was not able to correctly set it to build the Mac dylibs I needed. Therefore I stuck with premake3.<div>Now, I'm trying again. First, with the XML helper library TICPP <a href="http://code.google.com/p/ticpp/">ticpp - Google Code</a></div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">premake4 --ticpp-shared gmake</span></div><div><br /></div><div>which seems to work well</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';">ticpp</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">TiCPP</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">Building configurations...</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">Running action 'gmake'...</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">Generating Makefile...</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">Generating TiCPP.make...</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">Done.</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">jamesMBpro:ticpp james$ make</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">==== Building TiCPP ====</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">tinyxml.cpp</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">tinyxmlparser.cpp</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">Linking TiCPP</span></div><div><br /></div></div><div><br /></div><div>Let's see if the dylibs were produced. And ... nope, only .so :-/</div><div><br /></div><div>And apparently the dylib flag from premake3 was not conserved in premake4.</div><div>Next stop : try the premake4.1 beta. Unfortunately, this did not behave differently.</div><div>After some googling which returned nothing, I followed the premake forums down to the buglist. It seems this is a bug which has (recently) been submitted :</div><div><a href="http://sourceforge.net/tracker/?func=detail&aid=2790865&group_id=71616&atid=531878">http://sourceforge.net/tracker/?func=detail&aid=2790865&group_id=71616&atid=531878</a></div><div>And, hurray, there is a patch ! Thank you ashberlin.</div><div><br /></div><div>So, I downloaded the svn source for premake4:</div><div><br /></div><div><span class="Apple-style-span" style=" color: rgb(73, 73, 73); line-height: 20px; font-family:Verdana;font-size:12px;"><pre style="display: block; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; margin-top: 1em; margin-right: 0em; margin-bottom: 1em; margin-left: 0em; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(223, 235, 245); border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(223, 235, 245); background-color: rgb(237, 245, 250); line-height: 1.3; overflow-x: auto; overflow-y: auto; ">svn co <a href="https://premake.svn.sourceforge.net/svnroot/premake/trunk" title="https://premake.svn.sourceforge.net/svnroot/premake/trunk" style="color: rgb(2, 122, 198); text-decoration: none; ">https://premake.svn.sourceforge.net/svnroot/premake/trunk</a> premake4</pre></span></div><div><br /></div><div><br /></div><div>And then applied ashberlin's patch</div><div><br /></div><div><span class="Apple-style-span" style=" ;font-family:'courier new';">patch -p 1 < 0001-SharedLibs-on-macosx-should-be-called-.dylib.patch</span></div><div><br /></div><div>And finally the dylib built. I'll check them tomorrow.</div><div><br /></div><div><br /></div><div><br /></div>Jameshttp://www.blogger.com/profile/12518058290230549627noreply@blogger.com0