[R-pkg-devel] Compilation used the "non-portable flag"

Goldfeld, Keith Ke|th@Go|d|e|d @end|ng |rom nyu|@ngone@org
Fri May 10 22:32:35 CEST 2019

Good afternoon –

I am submitting an update to my package ‘simstudy’, and the ran the rhub checks. I received a note from one of the four platforms (the other three passed). The Ubuntu Linux 16.04 objected to the compilation flags:

* checking compilation flags used ... NOTE
Compilation used the following non-portable flag(s):
  ‘-Wdate-time’ ‘-Werror=format-security’ ‘-Wformat’

I did some searching and someone suggested I create a ‘Makevars’ in the ~/.R directory (which is different from my package directory). This is what I included in the Makevars file:

# Settings from /etc/R/Makeconf with "non-portable flag(s):"
# ‘-Wdate-time’ ‘-Werror=format-security’ ‘-Wformat’ replaced by -Wall -pedantic
# and without -fdebug-prefix-map=...
CFLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(LTO)
CXXFLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(LTO)
CXX98FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2
CXX11FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2
CXX14FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2

I ran devtools::check(), and it seemed to find the Makevars file. However, when I reran devtools::check_rhub(), I still received a NOTE. Does anyone have any advice on what I might not be getting right?

- Keith

Keith S. Goldfeld, DrPH
Assistant Professor

NYU Langone Health
Division of Biostatistics
Department of Population Health
180 Madison Avenue, # 551
New York, NY 10016

T 646-501-3650
M 646-423-9005
keith.goldfeld using nyumc.org<mailto:keith.goldfeld using nyumc.org>

Blog: ouR data generation<http://www.rdatagen.net/>

This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.

	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list