From bhh at xs4all.nl  Sun Nov  2 12:40:14 2014
From: bhh at xs4all.nl (Berend Hasselman)
Date: Sun, 2 Nov 2014 12:40:14 +0100
Subject: [Rd]
 =?windows-1252?q?Building_R_package=3A_=93Found_=27rand=27?=
 =?windows-1252?q?=2C_possibly_from_=27rand=27_=28C=29=94_NOTE_when_checki?=
 =?windows-1252?q?ng_package?=
In-Reply-To: <CA+A1kV4tt9JWMN0HjVjeDNMbdMS0UYkpPmDU189FHBmE_O6gTQ@mail.gmail.com>
References: <CA+A1kV4tt9JWMN0HjVjeDNMbdMS0UYkpPmDU189FHBmE_O6gTQ@mail.gmail.com>
Message-ID: <3265701A-0465-4D10-8DD2-C5FF4D10F9E2@xs4all.nl>


On 02-11-2014, at 12:20, January Weiner <january.weiner at gmail.com> wrote:

> I am building a package that makes a simple visualization. A part of
> the code is in C++, and utilizes the functions srand() and rand() for
> purposes not related to statistics (introducing random noise in the
> visualization). The package compiles without problems on my
> workstation(s), but when I submitted it to the winbuilder service, I
> got the following weird message:
> 
> * checking compiled code ... NOTE
> File 'tagcloud/libs/i386/tagcloud.dll':
>  Found 'rand', possibly from 'rand' (C)
>    Object: 'overlap.o'
>  Found 'srand', possibly from 'srand' (C)
>    Object: 'overlap.o'
> File 'tagcloud/libs/x64/tagcloud.dll':
>  Found 'rand', possibly from 'rand' (C)
>    Object: 'overlap.o'
>  Found 'srand', possibly from 'srand' (C)
>    Object: 'overlap.o'
> 
> Compiled code should not call entry points which might terminate R nor
> write to stdout/stderr instead of to the console, nor the C RNG.
> 
> To the best of my knowledge, I don't see where in the code I "call
> entry points which might terminate R" or "write to stdout/stderr", but
> then, if I remove the calls to rand/srand, this message disappears.
> 

Which version of R on your workstation?
Your code should also not call the C RNG (rand and srand) as the message clearly states.

Berend

> You can review the package her:e
> http://win-builder.r-project.org/toy6frr57aCU/
> 
> Kind regards,
> 
> January
> 
> -- 
> -------- January Weiner --------------------------------------
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] =?windows-1252?q?Building_R_package=3A_=93Found_=27rand=27?= =?windows-1252?q?=2C_possibly_from_=27rand=27_=28C=29=94_NOTE_when_checki?= =?windows-1252?q?ng_package?=
Berend Hasselman