<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thank you all for your work on this.<div><br></div><div>Brian</div><div><br><div><div>On Jan 19, 2010, at 4:57 PM, Mark Holder wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi folks,<div><span class="Apple-tab-span" style="white-space:pre">        </span>Dirk, Romain Francois, Simon Urbanek, and I have had some more off-thread email exchanges about this issue. &nbsp;I think that it is now resolved.</div><div><br></div><div><span class="Apple-style-span" style="white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Monaco">Speaking for the phylo-informatics community, I'd like to sincerely thank Dirk, Romain, and Simon for all of the help getting this sorted out.</font></span></span></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><br></div><div>The long term solution:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Dirk and Romain are going to release Rcpp&nbsp;<span class="Apple-style-span" style="font-family: monospace; ">0.7.3 soon. This version will cause phylobase to statically link to libRcpp. No changes to phylobase are required.</span></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">The short term solutions. Either:</font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>1. install Rcpp and phylobase from source, or</font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>2. augment your dynamic library loading path (for example add $HOME/Library/R/2.10/library/Rcpp/lib/i386 to the list of directories in the DYLD_LIBRARY_PATH environmental variable on Mac).</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">Below I summarize the issues for those who are curious.</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">all the best,</font></div><div><font class="Apple-style-span" face="monospace">Mark</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">The gory details (as I understand them):</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div>1. shared (or "dynamic") libraries contain a path to their location. &nbsp;I think that this field can also be just the name, but by default it is the full path. &nbsp;(On Mac, "otool -L libNAMEHERE.so" &nbsp;lists this location. install_name_tool can be used to update this info).</div><div><br></div><div>2. executables or other libraries that link to a dylib store the path that the library lists for itself. &nbsp;This info is used by the loader at runtime to find all of the object code that the calling code uses.</div><div><br></div><div>3. If the loader finds a library with the correct name in its search, then it will load the library (even if the calling library incorrectly lists its own location). &nbsp;So the loading is robust to moving the library, if you move it to a directory that is on the search path (it still not a great idea to move your dynamic libraries after linking to them).</div><div><br></div><div>So, if phylobase was linked against libRcpp that was at&nbsp;/x/lib/libRcpp.dylib (and&nbsp;libRcpp lists its own location as "/x/lib/libRcpp.dylib") then when phylobase loads, it will be able to load the functions supplied by libRcpp:<span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre"></span><span class="Apple-tab-span" style="white-space:pre">        </span>-&nbsp;if libRcpp is still at&nbsp;/x/lib/libRcpp.dylib, OR</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>-&nbsp;if there is a library called libRcpp.dylib in the directories that are always searched (eg. those libraries listed in&nbsp;<span class="Apple-style-span" style="font-family: monospace; ">DYLD_LIBRARY_PATH, or those directories that R specifies to the loader).</span></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">4. There is no binary package installation hook that would allow a dynamic library to be modified when it is installed via the install.packages mechanism. &nbsp; So calling something like install_name_tool as part of package installation so that each library lists the correct (installed) location for itself is not an option.</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">Thus, when a binary form of phylobase was installed, it would refer to a path to libRcpp.dylib that does not exist on the user's machine (it will be a &nbsp;a path on the build machine's filesystem). &nbsp;So binary installs of phylobase &nbsp;were brittle.</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">Furthermore, if one uses install.packages to install Rcpp, then the library that you download will have the wrong path listed for its own location. &nbsp;If you then build phylobase against this version of the library, the build and link will work but the loader will look in the wrong place for the library (and the library(phylobase) call will fail).</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">The most robust solution seems to be static linking of Rcpp into phylobase. &nbsp;After a statically-linked version of pyhlobase.so is created, then phylobase will no longer need to find libRcpp.*</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">Building from source also works because then all of the libraries list their own locations correctly.</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><br><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Courier; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Courier; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><div><span class="Apple-style-span" style="font-family: Arial; "><div class="AppleMailSignature" id="BD214290-7324-48EC-A16C-4BCD48002BDD"><span class="Apple-style-span" style="font-family: Courier; "><span class="Apple-style-span" style="font-family: 'Andale Mono'; "><div><div><span class="Apple-style-span" style="font-family: Courier; "><div class="AppleMailSignature" id="BD214290-7324-48EC-A16C-4BCD48002BDD"><span class="Apple-style-span" style="font-family: 'Andale Mono'; "><div><div><font class="Apple-style-span" face="Arial">Mark Holder</font></div><div><font class="Apple-style-span" face="Arial"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Arial"><a href="mailto:mtholder@ku.edu">mtholder@ku.edu</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Arial"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px; "><a href="http://www.people.ku.edu/~mtholder/">http://www.people.ku.edu/~mtholder/</a></span></font></font></div></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Arial"><br class="webkit-block-placeholder"></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Arial">==============================================</font></div><div><font class="Apple-style-span" face="Arial">Department of Ecology and Evolutionary Biology</font></div><div><font class="Apple-style-span" face="Arial">University of Kansas</font></div><div><font class="Apple-style-span" face="Arial">6031&nbsp;Haworth Hall</font></div><div><font class="Apple-style-span" face="Arial">1200 Sunnyside Avenue</font></div><div><font class="Apple-style-span" face="Arial">Lawrence, Kansas 66045</font></div><div><font class="Apple-style-span" face="Arial"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Arial">lab phone: &nbsp;785.864.5789</font></div><div><br></div><div><font class="Apple-style-span" face="Arial">fax (shared):&nbsp;785.864.5860</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Arial">==============================================</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Arial"><br></font></div><font class="Apple-style-span" face="Arial"><br></font></div></span></div></span><font class="Apple-style-span" face="Arial"><br></font></div></div></span></span></div><font class="Apple-style-span" face="Monaco"></font></span><br></div></div></span></span></span></span></span></span></span></span></span><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"> </div><br></div>_______________________________________________<br>Phylobase-devl mailing list<br><a href="mailto:Phylobase-devl@lists.r-forge.r-project.org">Phylobase-devl@lists.r-forge.r-project.org</a><br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>------------------------------------------------------</div><div>Brian O'Meara</div><div><a href="http://www.brianomeara.info">http://www.brianomeara.info</a></div><div>Assistant Prof.</div><div>Dept. Ecology &amp; Evolutionary Biology</div><div>U. of Tennessee, Knoxville</div></span></div></span> </div><br></div></body></html>