Dear all, I recently uploaded a new package Rlibeemd to CRAN (http://cran.r-project.org/web/packages/Rlibeemd/index.html, and in github: https://github.com/helske/Rlibeemd), and simple example in help files seems to throw an error on Solaris:
Version: 1.3.1 Check: examples Result: ERROR Running examples in �Rlibeemd-Ex.R� failed The error most likely occurred in: > ### Name: ceemdan > ### Title: CEEMDAN decomposition > ### Aliases: ceemdan > > ### ** Examples > > imfs <- ceemdan(UKgas, threads = 1) gsl: tridiag.c:191: ERROR: matrix must be positive definite Default GSL error handler invoked. The package is structured in such way that the underlying C library uses GSL for performing complete ensemble empirical mode decomposition, and I have written Rcpp/R wrappers around those functions. In eemd.c there are lines const int status = gsl_linalg_solve_tridiag(&diag_vec.vector, &supdiag_vec.vector, &subdiag_vec.vector, &g_vec.vector, &solution_vec.vector); if (status) { // we never get to this point if above function fails! REprintf("Error reported by gsl_linalg_solve_tridiag: %s\n", gsl_strerror(status)); return EMD_GSL_ERROR; } So first I need to add gsl_set_error_handler_off() to some point of the code so the GSL does not abort R. But what I wonder is why does the error happen at all. The same example works fine wih Windows, Linux and OSX. After googling a bit I saw that there are other packages with problems related to Solaris and GSL (such as http://cran.r-project.org/web/checks/check_results_RcppGSL.html), so I wonder if the issue is related to incorrect Makevars and/or configure or something like that? This is the first project where I needed configure script. This is my configure.ac which I copied from RcppGSL packages example: AC_INIT([Rlibeemd], 1.3.0) ## Use gsl-config to find arguments for compiler and linker flags ## ## Check for non-standard programs: gsl-config(1) AC_PATH_PROG([GSL_CONFIG], [gsl-config]) ## If gsl-config was found, let's use it if test "${GSL_CONFIG}" != ""; then # Use gsl-config for header and linker arguments (without BLAS which we get from R) GSL_CFLAGS=`${GSL_CONFIG} --cflags` GSL_LIBS=`${GSL_CONFIG} --libs` else AC_MSG_ERROR([gsl-config not found, is GSL installed?]) fi # Now substitute these variables in src/Makevars.in to create src/Makevars AC_SUBST(GSL_CFLAGS) AC_SUBST(GSL_LIBS) AC_OUTPUT(src/Makevars) And here is Makevars.in: GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ PKG_LIBS=$(GSL_LIBS) $(SHLIB_OPENMP_CFLAGS) $(SHLIB_OPENMP_CXXFLAGS) PKG_CFLAGS=$(GSL_CFLAGS) $(SHLIB_OPENMP_CFLAGS) PKG_CXXFLAGS=$(SHLIB_OPENMP_CXXFLAGS) Any help would be greatly appreciated. I don't have access to Solaris which makes the debugging rather hard. Best regards, Jouni Helske [[alternative HTML version deleted]]
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel