[R-pkg-devel] SHLIB_OPENMP_*FLAGS in Makefiles

2019-04-15 Thread Jarrett Phillips
In checking my R package via devtools::check and devtools::check_built, I
received the following NOTE which I am unsure how to fix. My package
contains compiled code (via Rcpp). Within my .cpp file I have the following
line:

#define ARMA_DONT_PRINT_OPENMP_WARNING

Is this the issue?

checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... NOTE
  src/Makevars: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS but
not in PKG_LIBS
  src/Makevars: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but
linking is by C++
  src/Makevars.win: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS
but not in PKG_LIBS
  src/Makevars.win: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but
linking is by C++


Thanks.

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] SHLIB_OPENMP_*FLAGS in Makefiles

2019-04-15 Thread Maxime Turgeon
The NOTE refers to Makevars and Makevars.win. The most logical place to start 
your investigation would be those two files. Do you have any reason to believe 
that they are *not* the culprits?

Max

From: R-package-devel  on behalf of 
Jarrett Phillips 
Sent: April 15, 2019 11:21 AM
To: r-package-devel@r-project.org
Subject: [R-pkg-devel] SHLIB_OPENMP_*FLAGS in Makefiles

In checking my R package via devtools::check and devtools::check_built, I
received the following NOTE which I am unsure how to fix. My package
contains compiled code (via Rcpp). Within my .cpp file I have the following
line:

#define ARMA_DONT_PRINT_OPENMP_WARNING

Is this the issue?

checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... NOTE
  src/Makevars: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS but
not in PKG_LIBS
  src/Makevars: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but
linking is by C++
  src/Makevars.win: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS
but not in PKG_LIBS
  src/Makevars.win: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but
linking is by C++


Thanks.

[[alternative HTML version deleted]]

__
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


Re: [R-pkg-devel] SHLIB_OPENMP_*FLAGS in Makefiles

2019-04-15 Thread Dirk Eddelbuettel


On 15 April 2019 at 11:21, Jarrett Phillips wrote:
| In checking my R package via devtools::check and devtools::check_built, I
| received the following NOTE which I am unsure how to fix. My package
| contains compiled code (via Rcpp). Within my .cpp file I have the following
| line:
| 
| #define ARMA_DONT_PRINT_OPENMP_WARNING
| 
| Is this the issue?

No.
 
| checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... NOTE
|   src/Makevars: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS but
| not in PKG_LIBS
|   src/Makevars: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but
| linking is by C++
|   src/Makevars.win: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS
| but not in PKG_LIBS
|   src/Makevars.win: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but
| linking is by C++

R is now quite explicit about something is used to not complain about: a mix
of C and CXX flags used in the two listed files (as Maxime pointed out).

This is quite possibly due to the skeleton version of these files included in
older versions of RcppArmadillo.  We of course switched to a corrected one
once these warnings appeared, but we cannot fix the packages already out there.
"Better" versions are at

https://github.com/RcppCore/RcppArmadillo/blob/master/inst/skeleton/Makevars
https://github.com/RcppCore/RcppArmadillo/blob/master/inst/skeleton/Makevars.win

and in essence you just need these two updated lines:

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) 
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

and we also recommend including

CXX_STD = CXX11

as the files do.

Hope this helps, 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] Package suggested but not available for checking: 'rPeaks'; Additional_repositories

2019-04-15 Thread Tan Zhou
Hi,
I am trying to put the r package on the CRAN. But one of the package
dependencies is not from CRAN. I can use the following can install in local.

if (!require("rPeaks")) {
devtools::install_github("jrminter/rPeaks")
  }

I followed the suggestions based on
https://stackoverflow.com/questions/29419776/r-package-dependencies-not-installed-from-additional-repositories
.
But it didn't work out for me. OR maybe I didn't set up it right.

My GitHub repository is https://github.com/tankwin08/waveformlidar.

My DESCRIPTION:
Suggests:
knitr,
rPeaks
Additional_repositories: https://github.com/jrminter/rPeaks/

I am not sure I need to add an additional step to change anything. The R
function needs to use the rPeaks is waveformlidar
/R
/deconvolution.R

Any suggestion of how to set up the additional_repositories are appreciated.

-- 

Best regards

Tan Zhou

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Package suggested but not available for checking: 'rPeaks'; Additional_repositories

2019-04-15 Thread Ralf Stubner
On 15.04.19 18:50, Tan Zhou wrote:
> I followed the suggestions based on
> https://stackoverflow.com/questions/29419776/r-package-dependencies-not-installed-from-additional-repositories
> .
> But it didn't work out for me. OR maybe I didn't set up it right.
> 
> My GitHub repository is https://github.com/tankwin08/waveformlidar.
> 
> My DESCRIPTION:
> Suggests:
> knitr,
> rPeaks
> Additional_repositories: https://github.com/jrminter/rPeaks/

The 'Additional_repositories' field is meant for additional CRAN-like
repositories, not for a git(hub) repository. A simple way to create such
a CRAN-like repository is given by the drat package, as mentioned in the
referenced SO answer. I am using that for the swephR package:

...
Suggests:
testthat,
swephRdata,
knitr,
rmarkdown
Encoding: UTF-8
URL: https://github.com/rstub/swephR/, http://www.astro.com/swisseph/
BugReports: https://github.com/rstub/swephR/issues/
Additional_repositories: https://rstub.github.io/drat
...


So while the 'swephRdata' can be found at
https://github.com/rstub/swephRdata/, the 'Additional_repositories'
field points to my drat repository.

In your case, you could either ask the rPeaks author to create a drat
repo or do that yourself (possibly with the author's consent).

Greetings
Ralf

-- 
Ralf Stubner
Senior Software Engineer / Trainer

daqana GmbH
Dortustraße 48
14467 Potsdam

T: +49 331 23 61 93 11
F: +49 331 23 61 93 90
M: +49 162 20 91 196
Mail: ralf.stub...@daqana.com

Sitz: Potsdam
Register: AG Potsdam HRB 27966
Ust.-IdNr.: DE300072622
Geschäftsführer: Dr.-Ing. Stefan Knirsch, Prof. Dr. Dr. Karl-Kuno Kunze



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


Re: [R-pkg-devel] Package suggested but not available for checking: 'rPeaks'; Additional_repositories

2019-04-15 Thread Uwe Ligges




On 15.04.2019 18:50, Tan Zhou wrote:

Hi,
I am trying to put the r package on the CRAN. But one of the package
dependencies is not from CRAN. I can use the following can install in local.

if (!require("rPeaks")) {
 devtools::install_github("jrminter/rPeaks")
   }



You must not do that as it would install without explicit user permission.


Best,
Uwe Ligges



I followed the suggestions based on
https://stackoverflow.com/questions/29419776/r-package-dependencies-not-installed-from-additional-repositories
.
But it didn't work out for me. OR maybe I didn't set up it right.

My GitHub repository is https://github.com/tankwin08/waveformlidar.

My DESCRIPTION:
Suggests:
 knitr,
rPeaks
Additional_repositories: https://github.com/jrminter/rPeaks/

I am not sure I need to add an additional step to change anything. The R
function needs to use the rPeaks is waveformlidar
/R
/deconvolution.R

Any suggestion of how to set up the additional_repositories are appreciated.



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


Re: [R-pkg-devel] Package suggested but not available for checking: 'rPeaks'; Additional_repositories

2019-04-15 Thread Tan Zhou
Thank you very much for your suggestions and explanation, Ralf. They are
very helpful.
I got permission from the author and use *drat::addRepo("jrminter").*

*When I try to test if this package can be installed with install.package*

*install.packages("rPeaks", repos = "https://jrminter.github.io/drat/
", type = "source")Warning in
install.packages :  unable to access index for repository
https://tankwin08.github.io/drat/src/contrib
:  cannot open URL
'https://tankwin08.github.io/drat/src/contrib/PACKAGES
'Warning in
install.packages :  unable to access index for repository
https://jrminter.github.io/drat/src/contrib
:  cannot open URL
'https://jrminter.github.io/drat/src/contrib/PACKAGES
'Installing package
into ‘C:/Users/tank/Documents/R/win-library/3.4’(as ‘lib’ is
unspecified)Warning in install.packages :  unable to access index for
repository https://jrminter.github.io/drat/src/contrib
:  cannot open URL
'https://jrminter.github.io/drat/src/contrib/PACKAGES
'Warning in
install.packages :  package ‘rPeaks’ is not available (for R version 3.4.3)*

*Do you have any suggestion? *


Best
Tan

On Mon, Apr 15, 2019 at 12:16 PM Ralf Stubner 
wrote:

> On 15.04.19 18:50, Tan Zhou wrote:
> > I followed the suggestions based on
> >
> https://stackoverflow.com/questions/29419776/r-package-dependencies-not-installed-from-additional-repositories
> > .
> > But it didn't work out for me. OR maybe I didn't set up it right.
> >
> > My GitHub repository is https://github.com/tankwin08/waveformlidar.
> >
> > My DESCRIPTION:
> > Suggests:
> > knitr,
> > rPeaks
> > Additional_repositories: https://github.com/jrminter/rPeaks/
>
> The 'Additional_repositories' field is meant for additional CRAN-like
> repositories, not for a git(hub) repository. A simple way to create such
> a CRAN-like repository is given by the drat package, as mentioned in the
> referenced SO answer. I am using that for the swephR package:
>
> ...
> Suggests:
> testthat,
> swephRdata,
> knitr,
> rmarkdown
> Encoding: UTF-8
> URL: https://github.com/rstub/swephR/, http://www.astro.com/swisseph/
> BugReports: https://github.com/rstub/swephR/issues/
> Additional_repositories: https://rstub.github.io/drat
> ...
>
>
> So while the 'swephRdata' can be found at
> https://github.com/rstub/swephRdata/, the 'Additional_repositories'
> field points to my drat repository.
>
> In your case, you could either ask the rPeaks author to create a drat
> repo or do that yourself (possibly with the author's consent).
>
> Greetings
> Ralf
>
> --
> Ralf Stubner
> Senior Software Engineer / Trainer
>
> daqana GmbH
> Dortustraße 48
> 14467 Potsdam
>
> T: +49 331 23 61 93 11
> F: +49 331 23 61 93 90
> M: +49 162 20 91 196
> Mail: ralf.stub...@daqana.com
>
> Sitz: Potsdam
> Register: AG Potsdam HRB 27966
> Ust.-IdNr.: DE300072622
> Geschäftsführer: Dr.-Ing. Stefan Knirsch, Prof. Dr. Dr. Karl-Kuno Kunze
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>


-- 

Best regards

Tan Zhou

[[alternative HTML version deleted]]

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