Hi all,<br><br>I'm a student at the University of Washington and my course project this spring involves rewriting the 'svmpath' R package into C++ using Rcpp and RccpArmadillo. Everything runs beautifully until I try to include the function below:<br>
<br><div style="margin-left:40px"><span style="font-family:tahoma,sans-serif">vec solveKstar(mat Kstar){</span><br style="font-family:tahoma,sans-serif"><span style="font-family:tahoma,sans-serif"> vec onestar = ones<vec>(Kstar.n_cols);</span><br style="font-family:tahoma,sans-serif">
<span style="font-family:tahoma,sans-serif"> onestar[0]=0; </span><br style="font-family:tahoma,sans-serif">
<span style="font-family:tahoma,sans-serif"> vec solution; </span><br style="font-family:tahoma,sans-serif">
<span style="font-family:tahoma,sans-serif"> solution=solve(trimatu(Kstar),onestar);</span><br style="font-family:tahoma,sans-serif"><span style="font-family:tahoma,sans-serif"> return solution;</span><br style="font-family:tahoma,sans-serif">
<span style="font-family:tahoma,sans-serif">}</span><br></div><br>If I run R CMD INSTALL on my package removing the call to 'solve' everything runs fine, but if I included the call to 'solve' then the R CMD INSTALL input is<br>
<br><br><div style="margin-left:40px">// all the typical output<br><br>* installing to library ‘/net/home/aynlc3/Rlib’<br>* installing *source* package ‘aynSVMpath’ ...<br>** libs<br>g++ -I/usr/share/R/include -DNDEBUG -I"/net/home/aynlc3/Rlib/Rcpp/include" -I"/net/home/aynlc3/Rlib/RcppArmadillo/include" -fpic -O3 -pipe -g -c aynSVMpath.cpp -o aynSVMpath.o<br>
g++ -I/usr/share/R/include -DNDEBUG -I"/net/home/aynlc3/Rlib/Rcpp/include" -I"/net/home/aynlc3/Rlib/RcppArmadillo/include" -fpic -O3 -pipe -g -c svmHelpers.cpp -o svmHelpers.o<br>g++ -shared -o aynSVMpath.so aynSVMpath.o initializations.o svmHelpers.o usetFunctions.o -L/net/home/aynlc3/Rlib/Rcpp/lib -lRcpp -Wl,-rpath,/net/home/aynlc3/Rlib/Rcpp/lib -L/usr/lib/R/lib -lR<br>
installing to /net/home/aynlc3/Rlib/aynSVMpath/libs<br>** R<br>** preparing package for lazy loading<br>** help<br>*** installing help indices<br>** building package indices<br>** testing if installed package can be loaded<br>
</div><br> // then<br><br><div style="margin-left:40px">Error in dyn.load(file, DLLpath = DLLpath, ...) : <br> unable to load shared object '/net/home/aynlc3/Rlib/aynSVMpath/libs/aynSVMpath.so':<br> /net/home/aynlc3/Rlib/aynSVMpath/libs/aynSVMpath.so: undefined symbol: dtrtrs_<br>
</div><br><br>If I change 3rd and 4th lines of the 'solveKstar' function to:<br><br><div style="margin-left:40px"> <span style="font-family:tahoma,sans-serif">vec
solution;
</span><br style="font-family:tahoma,sans-serif"><span style="font-family:tahoma,sans-serif">
solution=solve(Kstar,onestar);</span> // removing the call to 'trimatu'<br></div><br>the R CMD INSTALL output has the same typical output above, but with the following change to the error<br><br><div style="margin-left:40px">
Error in dyn.load(file, DLLpath = DLLpath, ...) : <br> unable to load shared object '/net/home/aynlc3/Rlib/aynSVMpath/libs/aynSVMpath.so':<br> /net/home/aynlc3/Rlib/aynSVMpath/libs/aynSVMpath.so: undefined symbol: dgels_<br>
</div><br><br>The symbols 'dtrtrs_' and 'dgels_' are not part of my code; from digging online, I believe these are coming from the lapack library, but I'm not sure how to proceed with that knowledge. Does anyone have any advice?<br>
<br> Also, if relevant, I'm running R 2.15.0, Rcpp_0.9.10 and RcppArmadillo_0.3.0.2 on mosix. <br><br>Many thanks,<br><br>Ayn <br><br><br>