<div dir="ltr">You'll have to share your package if you want more complete help, but some of my responses are inline. My best guess is you have a funky configure script or something to that effect.<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 6, 2015 at 10:10 AM, Peng Yu <span dir="ltr"><<a href="mailto:pengyu.ut@gmail.com" target="_blank">pengyu.ut@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi, I made a package using Rcpp and FORTRAN. But I see the following<br>
error message on Ubuntu (it can be installed correctly on Mac OS X).<br>
<br>
I searched for the solution to it. But it not clear how I should fix<br>
the problem. Could anybody let me know how to solve this problem.<br>
<br>
Loading required package: Rcpp<br>
R CMD INSTALL --preclean --no-multiarch /mnt/nfs/py/projects/Rusrpkg/lbfgsbr<br>
> tools:::.install_packages()<br>
* installing to library ‘/home/py/R/x86_64-pc-linux-gnu-library/3.1.0’<br>
* installing *source* package ‘lbfgsbr’ ...<br>
** libs<br>
gfortran  -fpic -g -O2  -c  dcsrch.f90 -o dcsrch.o<br>
gfortran  -fpic -g -O2  -c  dcstep.f90 -o dcstep.o<br></blockquote><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
g++ -I/opt/packages/R/R-3.1.0/lib/R/include -DNDEBUG `echo<br>
"Rcpp:::CxxFlags()"|R --vanilla --slave` -I/usr/local/include    -fpic<br>
 -g -O2  -c mtlnsrch.cpp -o mtlnsrch.o<br></blockquote><div><br></div><div>Why isn't the statement `echo "Rcpp:::CxxFlags()"|R --vanilla --slave` being expanded?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
gfortran -shared -L/usr/local/lib -o lbfgsbr.so dcsrch.o dcstep.o<br>
mtlnsrch.o -lgfortran<br></blockquote><div><br></div><div>Why is the shared library being built with `gfortran`? I believe it should be constructed with `gcc`.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
installing to /home/py/R/x86_64-pc-linux-gnu-library/3.1.0/lbfgsbr/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>
> tools:::.test_load_package('lbfgsbr', '/home/py/R/x86_64-pc-linux-gnu-library/3.1.0')<br>
Error in dyn.load(file, DLLpath = DLLpath, ...) :<br>
  unable to load shared object<br>
'/home/py/R/x86_64-pc-linux-gnu-library/3.1.0/lbfgsbr/libs/lbfgsbr.so':<br>
  /home/py/R/x86_64-pc-linux-gnu-library/3.1.0/lbfgsbr/libs/lbfgsbr.so:<br>
undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE<br>
Error: loading failed<br>
Execution halted<br>
ERROR: loading failed<br>
* removing ‘/home/py/R/x86_64-pc-linux-gnu-library/3.1.0/lbfgsbr’<br>
* restoring previous ‘/home/py/R/x86_64-pc-linux-gnu-library/3.1.0/lbfgsbr’<br>
<span class=""><font color="#888888"><br>
--<br>
Regards,<br>
Peng<br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></font></span></blockquote></div><br></div></div>