<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">George,<div class=""><br class=""></div><div class="">it’s been a while (before OS X.11) since I have used RQuantLib. I have tried a fresh build today following the guide at QuantLib (<a href="http://quantlib.org/install/macosx.shtml" class="">http://quantlib.org/install/macosx.shtml</a>). When trying an example of QuantLib I had to add the compiler flag "-stdlib=libstdc++” or else I would get an “architecture x86_64” error. When trying to install RQuantLib from source I noticed that this flag is missing. Perhaps that is something to try to see if you have the same issue.</div><div class=""><br class=""></div><div class="">If you know how to add "-stdlib=libstdc++” to the build compiler flags for RQuantLib I believe that should solve your issues, and mine for that matter :)</div><div class=""><br class=""></div><div class="">If I find some time tomorrow I will try to dig into that a little more…</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Ben </div><div class=""><br class="">
<br class=""><div><blockquote type="cite" class=""><div class="">On 06 Aug 2016, at 05:46, George <<a href="mailto:grandtiger@gmail.com" class="">grandtiger@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Following is the error, when I try to install RQuantLib using the command below. <div class=""><br class=""></div><div class="">install.packages("<a href="https://cran.r-project.org/src/contrib/RQuantLib_0.4.2.tar.gz" class="">https://cran.r-project.org/src/contrib/RQuantLib_0.4.2.tar.gz</a>", repo=NULL, type='source', configure.args="--with-boost-include=/opt/local/include/ --with-boost-lib=/opt/local/lib/")</div><div class=""><br class=""><div class="">I wonder anyone has experience with this, and whether there is a solution. </div><div class="">Thanks a lot and have a great weekend!</div><div class=""><br class=""><div class=""><div class="">############################################</div><div class=""><p class=""><span class="">66 warnings generated.</span></p><p class=""><span class="">clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o RQuantLib.so RcppExports.o asian.o barrier_binary.o bermudan.o bonds.o calendars.o curves.o dates.o daycounter.o discount.o hullwhite.o implieds.o modules.o schedule.o utils.o vanilla.o zero.o -L/opt/local/lib -L/opt/local/lib -lQuantLib -L/opt/local/lib/ -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation</span></p><p class=""><span class="">installing to /Library/Frameworks/R.framework/Versions/3.3/Resources/library/RQuantLib/libs</span></p><p class=""><span class="">** R</span></p><p class=""><span class="">** demo</span></p><p class=""><span class="">** inst</span></p><p class=""><span class="">** preparing package for lazy loading</span></p><p class=""><span class="">** help</span></p><p class=""><span class="">*** installing help indices</span></p><p class=""><span class="">** building package indices</span></p><p class=""><span class="">** testing if installed package can be loaded</span></p><p class=""><span class="">Error in dyn.load(file, DLLpath = DLLpath, ...) : </span></p><p class=""><span class=""> unable to load shared object '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RQuantLib/libs/RQuantLib.so':</span></p><p class=""><span class=""> dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RQuantLib/libs/RQuantLib.so, 6): Symbol not found: __ZN8QuantLib13FixedRateBondC1EjdRKNS_8ScheduleERKNSt3__16vectorIdNS4_9allocatorIdEEEERKNS_10DayCounterENS_21BusinessDayConventionEdRKNS_4DateERKNS_8CalendarERKNS_6PeriodESK_SE_b</span></p><p class=""><span class=""> Referenced from: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/RQuantLib/libs/RQuantLib.so</span></p><p class=""><span class=""> Expected in: flat namespace</span></p><p class=""><span class=""> in /Library/Frameworks/R.framework/Versions/3.3/Resources/library/RQuantLib/libs/RQuantLib.so</span></p><p class=""><span class="">Error: loading failed</span></p><p class=""><span class="">Execution halted</span></p><p class=""><span class="">ERROR: loading failed</span></p><p class=""><span class="">* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RQuantLib’</span></p><p class=""><span class=""><b class="">Warning message:</b></span></p><p class=""><span class=""><b class="">In install.packages("<a href="https://cran.r-project.org/src/contrib/RQuantLib_0.4.2.tar.gz" class="">https://cran.r-project.org/src/contrib/RQuantLib_0.4.2.tar.gz</a>", :</b></span></p><p class=""><span class=""><b class=""> installation of package ‘/tmp/RtmpNWaFiC/downloaded_packages/RQuantLib_0.4.2.tar.gz’ had non-zero exit status</b></span></p><p class=""><span class="">> clang: error: invalid library name in argument '-stdlib=libstdc'clang: error: invalid library name in argument '-stdlib=libstdc'clang: error: invalid library name in argument '-stdlib=libstdc'clang: error: invalid library name in argument '-stdlib=libstdc'if installed package can be loadedclang: error: invalid library name in argument '-stdlib=libstdc'clang: error: invalid library name in argument '-stdlib=libstdc'clang: error: invalid library name in argument '-stdlib=libstdc'clang: error: invalid library name in argument '-stdlib=libstdc'clang: error: invalid library name in argument '-stdlib=libstdc'clan</span></p><p class=""><span class=""><b class="">Error: unexpected symbol in "clang: error: invalid library"</b></span></p><p class=""><span class="">> if installed package can be loaded</span></p><p class=""><span class=""><b class="">Error: unexpected symbol in "if installed"</b></span></p><p class=""><span class="">> if installed package can be loaded</span></p><p class=""><span class=""><b class="">Error: unexpected symbol in "if installed"</b></span></p><p class=""><span class="">> if installed package can be loaded</span></p><p class=""><span class=""><b class="">Error: unexpected symbol in "if installed"</b></span></p><p class=""><span class="">> if installed package can be loaded</span></p><p class=""><span class=""><b class="">Error: unexpected symbol in "if installed"</b></span></p><p class=""><span class="">> if installed package can be loaded</span></p><p class=""><span class=""><b class="">Error: unexpected symbol in "if installed"</b></span></p></div></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Aug 5, 2016 at 7:17 AM, George Wang <span dir="ltr" class=""><<a href="mailto:grandtiger@gmail.com" target="_blank" class="">grandtiger@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class=""><div class="">Hi Ben,</div><div class=""><br class=""></div><div class="">Do you have any quick guide for building and installing RQuantLib on Mac OSX? I was able to use macport to install boost and build QuantLib, but when I try to install RQuantLib from source, I always got errors (can provide more details when I get home tonight). I am wondering how you get it to work. Thanks a lot and have a great weekend!</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">George<br class=""><br class="">Sent from my iPhone</div><div class=""><div class="h5"><div class=""><br class="">On Oct 28, 2014, at 5:01 PM, Benjamin J. J. Voigt <<a href="mailto:bvoigt@gmail.com" target="_blank" class="">bvoigt@gmail.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">first post, bear with me. </div><div class=""><br class=""></div><div class="">On this matter, it works fine on 10.9.x. RStudio seems to have fixed on their end. Since I have recently rebuilt both QuantLib and RQuantLib several times on stable and development sources on my 10.9.x environment just running RQuantLib has never been an issue.</div><div class=""><br class=""></div><div class="">As a workaround, perhaps you could try to create a script to launch through the terminal so that the environment variables are loaded properly?</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Ben<br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Oct 28, 2014 at 6:41 PM, Dirk Eddelbuettel <span dir="ltr" class=""><<a href="mailto:edd@debian.org" target="_blank" class="">edd@debian.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
On 28 October 2014 at 11:35, Jack Drew wrote:<br class="">
| Recently, I am trying to create a new RQuantLib setup. I am on mac os x 10.10 and R 3.0.2. I have installed QuantLib 1.4, and RQuantLib. From my terminal, within R, I can require RQuantLib and use it with no problems. However, if I try to require RQuantLib within the R GUI or within my StatET Eclipse, I get:<br class="">
|<br class="">
| Loading required package: RQuantLib<br class="">
| Error : .onLoad failed in loadNamespace() for 'RQuantLib', details:<br class="">
| call: if (is.character(qc) && nchar(qc) > 1) {<br class="">
| error: missing value where TRUE/FALSE needed<br class="">
| In addition: Warning message:<br class="">
| running command 'bash -c 'type -p quantlib-config' 2>/dev/null' had status 1<br class="">
|<br class="">
| I am not sure what I am missing, since the package works fine from the terminal. Please help, if you are able to.<br class="">
<br class="">
So quantlib-config is not found.<br class="">
<br class="">
I don't own (or access) an OS X machine but even I noticed all these hoopla<br class="">
over 10.10 not setting PATH -- that could be the culprit. Google for<br class="">
something like<br class="">
<br class="">
RStudio "OS X" 10.10 PATH<br class="">
<br class="">
and you just get pointers. One trick appears to be to launch RStudio from<br class="">
the term.app.<br class="">
<span class=""><font color="#888888" class=""><br class="">
Dirk<br class="">
<br class="">
--<br class="">
<a href="http://dirk.eddelbuettel.com/" target="_blank" class="">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" target="_blank" class="">edd@debian.org</a><br class="">
______________________________<wbr class="">_________________<br class="">
Rquantlib-devel mailing list<br class="">
<a href="mailto:Rquantlib-devel@lists.r-forge.r-project.org" target="_blank" class="">Rquantlib-devel@lists.r-forge.<wbr class="">r-project.org</a><br class="">
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rquantlib-devel" target="_blank" class="">https://lists.r-forge.r-<wbr class="">project.org/cgi-bin/mailman/<wbr class="">listinfo/rquantlib-devel</a><br class="">
</font></span></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- </div><div class="gmail_extra">Ben<br class=""><div dir="ltr" class=""><br class="">“<span style="font-size:13px;line-height:19px;font-family:sans-serif" class="">In God we trust, all others bring data</span>.” W. Edwards Deming</div>
</div></div></div>
</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">______________________________<wbr class="">_________________</span><br class=""><span class="">Rquantlib-devel mailing list</span><br class=""><span class=""><a href="mailto:Rquantlib-devel@lists.r-forge.r-project.org" target="_blank" class="">Rquantlib-devel@lists.r-forge.<wbr class="">r-project.org</a></span><br class=""><span class=""><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rquantlib-devel" target="_blank" class="">https://lists.r-forge.r-<wbr class="">project.org/cgi-bin/mailman/<wbr class="">listinfo/rquantlib-devel</a></span></div></blockquote></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>