Discussion:
[Rcpp-devel] Package Submission Barred by Pedantic
Nicholas Rittler
2018-10-31 04:52:28 UTC
Permalink
In attempting to submit a package to CRAN, I'm receiving the following
warning:


d:/RCompile/CRANpkg/lib/3.6/BH/include/boost/interprocess/detail/win32_api.hpp:145:9:
warning: ISO C++ prohibits anonymous structs [-Wpedantic]

I obviously would like to get rid of this warning and get the package on
CRAN. I now know that CRAN doesn't set pendantic, however, the following is
the makevars.win the package is currently using, in it's entirety:

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
PKG_CPPFLAGS = -I.

I don't see where this is setting pendantic either. Is it possible it's a
default local setting on my end? If so, is there some flag that can be
passed in the makevars file that will not generate warnings about
non-portable code and will make sure pedantic is not set?

Thanks all for the time of day.
Dirk Eddelbuettel
2018-10-31 10:10:54 UTC
Permalink
On 30 October 2018 at 23:52, Nicholas Rittler wrote:
| In attempting to submit a package to CRAN, I'm receiving the following
| warning:

"I'm receiving" as in "I see this when I compile at home" or as in "I see
this in win-builder" ?

| d:/RCompile/CRANpkg/lib/3.6/BH/include/boost/interprocess/detail/win32_api.hpp:145:9:
| warning: ISO C++ prohibits anonymous structs [-Wpedantic]
|
| I obviously would like to get rid of this warning and get the package on
| CRAN. I now know that CRAN doesn't set pendantic, however, the following is
| the makevars.win the package is currently using, in it's entirety:
|
| PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
| PKG_CPPFLAGS = -I.
|
| I don't see where this is setting pendantic either. Is it possible it's a
| default local setting on my end? If so, is there some flag that can be

Yes, likely.

| passed in the makevars file that will not generate warnings about
| non-portable code and will make sure pedantic is not set?

It might be how R was built, ie the flag got "baked in" when R configured and
compiled. These flags then sit in ${R_HOME}/etc/Makeconf. If so you'd have
to edit the file -- we can't alter these options on the fly.

Or it could be in a file of yours, for me it is ~/.R/Makevars where I in fact
often set -pedantic (and alsod unset it).

The bigger news is that you should not have to worry about it. It is just a
warning, and it comes from code you did not write but just use -- Boost
headers via the BH package.

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Nicholas Rittler
2018-11-06 05:15:35 UTC
Permalink
When you say "unset it", do you mean physically delete the flag from the
file?

I don't see the pedantic flag set in my {R_HOME}/etc/Makeconf or any
Makevars file locally, so I tried passing "-Wno-pedantic", but this renders
warnings later on about non-portable code.
Post by Dirk Eddelbuettel
| In attempting to submit a package to CRAN, I'm receiving the following
"I'm receiving" as in "I see this when I compile at home" or as in "I see
this in win-builder" ?
|
| warning: ISO C++ prohibits anonymous structs [-Wpedantic]
|
| I obviously would like to get rid of this warning and get the package on
| CRAN. I now know that CRAN doesn't set pendantic, however, the following is
|
| PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
| PKG_CPPFLAGS = -I.
|
| I don't see where this is setting pendantic either. Is it possible it's a
| default local setting on my end? If so, is there some flag that can be
Yes, likely.
| passed in the makevars file that will not generate warnings about
| non-portable code and will make sure pedantic is not set?
It might be how R was built, ie the flag got "baked in" when R configured and
compiled. These flags then sit in ${R_HOME}/etc/Makeconf. If so you'd have
to edit the file -- we can't alter these options on the fly.
Or it could be in a file of yours, for me it is ~/.R/Makevars where I in fact
often set -pedantic (and alsod unset it).
The bigger news is that you should not have to worry about it. It is just a
warning, and it comes from code you did not write but just use -- Boost
headers via the BH package.
Dirk
--
Qiang Kou
2018-11-06 05:34:44 UTC
Permalink
Hi, Nicholas,

First, what you reported is a known issue from boost [1], not Rcpp.

Second, this issue has been fixed in boost 1.69 [2] and the bh package
still uses 1.66.

Third, this warning won't block your submission to CRAN [3] [4].

I hope I answered your question.

Best wishes,

KK

[1] https://github.com/boostorg/interprocess/issues/59

[2]
https://github.com/boostorg/interprocess/blob/develop/doc/interprocess.qbk#L6767

[3]
https://github.com/boostorg/interprocess/issues/59#issuecomment-426156101

[4]
https://www.r-project.org/nosvn/R.check/r-devel-windows-ix86+x86_64/bigmemory-00check.html
Post by Nicholas Rittler
When you say "unset it", do you mean physically delete the flag from the
file?
I don't see the pedantic flag set in my {R_HOME}/etc/Makeconf or any
Makevars file locally, so I tried passing "-Wno-pedantic", but this renders
warnings later on about non-portable code.
Post by Dirk Eddelbuettel
| In attempting to submit a package to CRAN, I'm receiving the following
"I'm receiving" as in "I see this when I compile at home" or as in "I see
this in win-builder" ?
|
| warning: ISO C++ prohibits anonymous structs [-Wpedantic]
|
| I obviously would like to get rid of this warning and get the package on
| CRAN. I now know that CRAN doesn't set pendantic, however, the following is
|
| PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
| PKG_CPPFLAGS = -I.
|
| I don't see where this is setting pendantic either. Is it possible it's a
| default local setting on my end? If so, is there some flag that can be
Yes, likely.
| passed in the makevars file that will not generate warnings about
| non-portable code and will make sure pedantic is not set?
It might be how R was built, ie the flag got "baked in" when R configured and
compiled. These flags then sit in ${R_HOME}/etc/Makeconf. If so you'd have
to edit the file -- we can't alter these options on the fly.
Or it could be in a file of yours, for me it is ~/.R/Makevars where I in fact
often set -pedantic (and alsod unset it).
The bigger news is that you should not have to worry about it. It is just a
warning, and it comes from code you did not write but just use -- Boost
headers via the BH package.
Dirk
--
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Loading...