[R-pkg-devel] r-package-devel-owner maybe from r-project.org
Zack McCaw
zrm@cc @end|ng |rom gm@||@com
Fri Mar 13 21:44:03 CET 2020
Thank you very much.
Sincerely,
Zack
On Fri, Mar 13, 2020 at 12:31 PM Dirk Eddelbuettel <edd using debian.org> wrote:
>
> On 13 March 2020 at 14:17, Dirk Eddelbuettel wrote:
> |
> | On 13 March 2020 at 11:53, Zack McCaw wrote:
> | | Hello all,
> | |
> | | I am attempting to submit a package (
> https://github.com/zrmacc/Temporal)
> | | that uses RcppArmadillo. The package builds successfully locally (on
> Mac)
> | | and on Windows. However, when submitting to CRAN, it fails to build on
> | | Debian with the following error:
> | |
> | | Error: package or namespace load failed for ‘Temporal’ in
> dyn.load(file,
> | | DLLpath = DLLpath, ...): unable to load shared object
> | |
> ‘/srv/hornik/tmp/CRAN/Temporal.Rcheck/00LOCK-Temporal/00new/Temporal/libs/Temporal.so’:/srv/hornik/tmp/CRAN/Temporal.Rcheck/00LOCK-Temporal/00new/Temporal/libs/Temporal.so:
> | | undefined symbol: dgesvd_
> | |
> | | I have ensured that the Makevars file is formatted as recommended by
> the
> | | RcppArmadillo.package.skeleton
> | | <
> https://cran.r-project.org/web/packages/RcppArmadillo/RcppArmadillo.pdf>()
> | | function. Specifically, it contains the following:
> | |
> | | CXX_STD = CXX11
> | | PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
> | | PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS)
> $(FLIBS)
> | |
> | | Any help with understanding how to resolve the error on Debian would
> | | be greatly appreciated.
> |
> | Sort of the wrong forum. Please consider subscribing to the rcpp-devel
> list
> | and posting there.
>
> But now that we are here I took a look, and you "almost" got it right. Your
> mistake was in using src/Makevars.in and not using a configure script to
> create src/Makevars. So it remained unused. You can tell: with your
> setting
> my box did
>
> g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions
> -Wl,-z,relro \
> -o Temporal.so MatrixOps.o RcppExports.o -L/usr/lib/R/lib -lR
>
> ie no linking the desired form! Where once fixed we see
>
> g++ -std=gnu++11 -Wl,-S -shared -L/usr/lib/R/lib
> -Wl,-Bsymbolic-functions \
> -Wl,-z,relro -o Temporal.so MatrixOps.o RcppExports.o \
> -fopenmp -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib
> -lR
>
> which has the link instruction.
>
> I send you a pull request with the simple fix. If you just the merge button
> you should be all set.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list