Re: [R-pkg-devel] Errors in the pre-test after submitting the R package

2017-11-28 Thread Ege Rubak
The obvious place to look for pointers of how to detect and link 
correctly to fftw would be in the current CRAN package `fftwtools` that 
does it without any Rcpp:

https://github.com/krahim/fftwtools

Cheers,
Ege


On 11/28/2017 02:47 AM, Dirk Eddelbuettel wrote:


On 27 November 2017 at 21:24, Tan, Senren wrote:
| I have been developing an R package using Rcpp to call C++ functions that use 
the C subroutine library 'fftw3' that implements fast Fourier transform 
algorithm. Since I have the C library 'fftw3' installed on my laptop (running 
MacOS), when I checked my developed package using R CMD CHECK --as-cran, I 
could pass all the checks with no errors or warnings.
|
| However, when I submitted the package to CRAN, during the pre-test, I 
encountered an error. I was wondering whether this error came from the absence 
of the 'fftw3' C library on the checking machine? Or maybe I have made some 
mistakes in the Makevars.win file?
|
| I have done some search on how to use the external C library in R packages 
with Rcpp.
|
| Here is what I have provided in the Makevars.win file:
|
| PKG_CPPFLAGS = -I$(LIB_FFTW)/include
| CXX = g++
| PKG_CXXFLAGS = -std=c++11
| PKG_LIBS = -L$(LIB_FFTW)/lib -lfftw3
|
| Could you please advise me on what to do?

Look at what other packages do. _Many_ packages deploy Rcpp to connect to
other external packages. That is how Rcpp started: to connect to QuantLib. I
also have packages connecting to the GSL, helped with one connecting to
nlopt, was involved with one connecting to PostgreSQL and probably several
more I now forget.  Jeroen has probably a dozen more too (xml2, curl,
poppler, v8, rmariadb, ... come to mind).  Look around some more. I also
think CRAN already _has_ packages interfacing the FFTW.  Plus, you can of
course connec to external libraries without using Rcpp. Lots of other
packages do that too.

Also read Writing R Extensions more carefully as the case is covered.  The
"bad" news is that you may need to learn to work with autoconf to create
configure, or re-invent it in shell how Jeroen does it, or rely on pkg-config
as I often, or ... do whatever it takes to _detect_ when fttw3 is not present.

Dirk



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Errors in the pre-test after submitting the R package

2017-11-28 Thread Dirk Eddelbuettel

On 28 November 2017 at 11:01, Ege Rubak wrote:
| The obvious place to look for pointers of how to detect and link 
| correctly to fftw would be in the current CRAN package `fftwtools` that 
| does it without any Rcpp:
| https://github.com/krahim/fftwtools

And there is also fftw by Olaf and Uwe (!!) which has a spurious fourth line
in its src/Makevars

  PKG_CPPFLAGS=@CPPFLAGS@ @FFTW_CFLAGS@
  PKG_LIBS=@LIBS@ @FFTW_LIBS@

  all: $(SHLIB)

The CRAN mirror repo does not have configure.ac, but the upstream repo does
  https://github.com/olafmersmann/fftw/blob/master/configure.ac

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Exited with status -1073741819.

2017-11-28 Thread Rampal Etienne

Dear all,

I updated RStudio, Rtools and R-devel, and then I tried to build a 
package in RStudio that I had been able to build before without any 
problems. But now I got the following error:


Updating SADISA documentatiob
Loading SADISA
Exited with status -1073741819.

That's all. What is this exit status? I can still build other packages, 
so it does not happen all the time. I can use "Load all" and all 
functions sseem to work fine.


Any suggestions?

Kind regards, Rampal Etienne

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Exited with status -1073741819.

2017-11-28 Thread Dason Kurkiewicz
Do you get the same error if you try to build on the command line outside
of RStudio?

On Nov 28, 2017 3:51 PM, "Rampal Etienne"  wrote:

> Dear all,
>
> I updated RStudio, Rtools and R-devel, and then I tried to build a package
> in RStudio that I had been able to build before without any problems. But
> now I got the following error:
>
> Updating SADISA documentatiob
> Loading SADISA
> Exited with status -1073741819.
>
> That's all. What is this exit status? I can still build other packages, so
> it does not happen all the time. I can use "Load all" and all functions
> sseem to work fine.
>
> Any suggestions?
>
> Kind regards, Rampal Etienne
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel