[R-pkg-devel] Need help building packages to track down ASAN error

2020-03-23 Thread Steven Scott
One of my packages (bsts) appears to have a memory error identified by ASAN.
I'm trying to build an ASAN-enabled R+bsts so that I can debug the error.

I'm using the rocker image rocker/r-devel-ubsan-clang, loaded and run as
follows:

docker run --cap-add SYS_PTRACE -e PASSWORD= --rm -p 8787:8787 -v
/home/steve/code/BOOM:/home/steve/code/BOOM -it rocker/r-devel-ubsan-clang
/bin/bash

This launches me into a bash shell.  At this point I think I need to build
and
install my package.  On this image the home directory is /root, and under
/root
I have installed /root/.R/Makevars with the following content (per section
4.3
of WRE).

CC = clang -std=c99 -fsanitize=address -fno-omit-frame-pointer
CXX = clang++ -std=c++11 -fsanitize=address -fno-omit-frame-pointer
FC = gfortran -fsanitize=address

When I run the scripts to build and install my packages (bsts + 2
dependencies,
named Boom and BoomSpikeSlab), I get output that looks like

g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG
-I`/usr/lib/R/bin/Rscript -e "cat(system.file(package='Boom'))"`/include
-DADD_ -DR_NO_REMAP -DRLANGUAGE
-I"/usr/local/lib/R/site-library/Boom/include"   -fpic  -g -O2
-fdebug-prefix-map=/build/r-base-MP6Q4u/r-base-3.6.2=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g  -c boom_spike_slab_init.cc -o boom_spike_slab_init.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG
-I`/usr/lib/R/bin/Rscript -e "cat(system.file(package='Boom'))"`/include
-DADD_ -DR_NO_REMAP -DRLANGUAGE
-I"/usr/local/lib/R/site-library/Boom/include"   -fpic  -g -O2
-fdebug-prefix-map=/build/r-base-MP6Q4u/r-base-3.6.2=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g  -c logit_spike_slab_wrapper.cc -o
logit_spike_slab_wrapper.o


Here g++ is being used instad of the requested clang++ (I'm assuming R on
this
image was built with clang), and the important -fsanitize=address flag is
not
present.  So it seems that ~/.R/Makevars is being ignored.

The goal is to produce an ASAN-enabled package so that I can test for the
error.
Am I on the correct path to producing such a package, and if so what else
do I
need to do to get there?

Thank you.

[[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] OpenMP variable not specified in enclosing 'parallel'

2020-03-23 Thread Ivan Krylov
On Mon, 23 Mar 2020 15:29:20 +0100
Emil Sjørup  wrote:

> const int iMaxLag = 20;

> error: ‘iMaxLag’ not specified in enclosing ‘parallel’

> error: ‘iMaxLag’ is predetermined ‘shared’ for ‘shared’

This looks like a compiler bug to me. g++ seems to forget the rule that
"const" variables are supposed to be shared despite the default(none)
clause.

In a similar situation (g++ being confused about the sharing
status of a hidden temporary variable it had internally created) I had
to remove default(none) and leave a comment explaining that the code
would not compile otherwise.

-- 
Best regards,
Ivan

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


Re: [R-pkg-devel] Problem with Check --as-cran

2020-03-23 Thread Tomas Kalibera

The problem is with

if (class(data) != "matrix") stop("The data field should be an array or 
a data frame")


Please use inherits() instead of checking class(), see this for more details
https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again

Best
Tomas



On 3/23/20 3:30 PM, LUIS ALFONSO PEREZ MARTOS wrote:



El 23 mar 2020, a las 15:05, LUIS ALFONSO PEREZ MARTOS  
escribió:

Good morning, everyone,

I am developing an R-package and when I check package I get this right. 
Attached image.



But when I upload the package to cran they tell me the next error and I don't 
know how to fix it.

https://win-builder.r-project.org/incoming_pretest/Clustering_1.0.0_20200322_181919/Windows/00check.log
 


Best regards

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


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


Re: [R-pkg-devel] Problem with Check --as-cran

2020-03-23 Thread LUIS ALFONSO PEREZ MARTOS



> El 23 mar 2020, a las 15:05, LUIS ALFONSO PEREZ MARTOS  
> escribió:
> 
> Good morning, everyone,
> 
> I am developing an R-package and when I check package I get this right. 
> Attached image.
> 
> 
> 
> But when I upload the package to cran they tell me the next error and I don't 
> know how to fix it.
> 
> https://win-builder.r-project.org/incoming_pretest/Clustering_1.0.0_20200322_181919/Windows/00check.log
>  
> 
> 
> Best regards

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


[R-pkg-devel] OpenMP variable not specified in enclosing 'parallel'

2020-03-23 Thread Emil Sjørup

Hi,


I am getting an error message during pre-checks when I upload a new 
version of my package to CRAN, and I need help.


See: 
https://win-builder.r-project.org/incoming_pretest/DriftBurstHypothesis_0.3.0.1_20200322_134148/Debian/00install.out 




The package installs just fine on windows, and on my system.


It seems to me that the message tells me that I have an undeclared 
variable in the parallel setup.


So, if I add the variable to the shared variables in the setup, I get 
the following error message:



error: ‘iMaxLag’ is predetermined ‘shared’ for ‘shared’


Passing the variable to the private variable in the setup doesn't work 
either.


Am I misunderstanding the error or is something weird going on?



For the interested, the source being uploaded can be found in:

ftp://cran.r-project.org/incoming/archive/

under DriftBurstHypothesis_0.3.0.1.tar.gz


Best,

Emil

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


[R-pkg-devel] CRAN upload checks

2020-03-23 Thread Christopher Jones
Chasing up a longstanding issue 
 with 
getting a package patch update 
uploaded to CRAN. We've never raised any reply to emails sent to 
cran-submissi...@r-project.org. The most recent mail was on 17th March. Is 
there a 
better email address to use?

The package is https://cran.r-project.org/web/packages/ROracle/index.html This 
needs a 3rd party (i.e. Oracle provided) SDK package to compile. Since 
that original thread, the SDK package is now available via wget or curl without 
login or click-through.

Chris

-- 
https://twitter.com/ghrd


[[alternative HTML version deleted]]

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