Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-06-06 Thread Duncan Murdoch

On 06/06/2019 4:19 p.m., Toby Hocking wrote:

If anybody else has this issue, please add a comment on
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17478 so we are more
likely to get R-core to address this.


Please don't encourage spam there.  Add a comment if you have 
information to add, but "me too" messages just waste everybody's time.


Duncan Murdoch



Thanks
Toby

On Tue, Jun 4, 2019 at 2:58 PM Pages, Herve  wrote:


On 5/31/19 08:41, Toby Hocking wrote:...

In my opinion install.packages should stop with an error (instead of a
warning) if this happens.


Totally agree with that.

Best,
H.

--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319



[[alternative HTML version deleted]]

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



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


Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-06-06 Thread Toby Hocking
If anybody else has this issue, please add a comment on
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17478 so we are more
likely to get R-core to address this.

Thanks
Toby

On Tue, Jun 4, 2019 at 2:58 PM Pages, Herve  wrote:

> On 5/31/19 08:41, Toby Hocking wrote:...
> > In my opinion install.packages should stop with an error (instead of a
> > warning) if this happens.
>
> Totally agree with that.
>
> Best,
> H.
>
> --
> Hervé Pagès
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M1-B514
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpa...@fredhutch.org
> Phone:  (206) 667-5791
> Fax:(206) 667-1319
>

[[alternative HTML version deleted]]

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


Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-06-04 Thread Pages, Herve
On 5/31/19 08:41, Toby Hocking wrote:...
> In my opinion install.packages should stop with an error (instead of a
> warning) if this happens.

Totally agree with that.

Best,
H.

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-31 Thread Toby Hocking
thanks for your input Hervé. Glad to hear I'm not the only one still having
this issue.

In my opinion install.packages should stop with an error (instead of a
warning) if this happens.

However even if you want to keep the warning, at least make it so that
users can set options(warn=2) to get an error if they want one. I tried
setting options(warn=2) but for some reason I still get a warning.

I believe that is a bug in install.packages -- if I specify options(warn=2)
it should convert that warning to an error (but it currently does not).

Toby

On Thu, May 30, 2019 at 4:50 PM Pages, Herve  wrote:

> Also note that this can lead to people not being able to load the
> package if the set of .Call entry points has changed between the old
> and new versions of the package. We strongly suspect that this is what
> happened to this Bioconductor user:
>
>https://support.bioconductor.org/p/121228/
>
> Note that she's installing the binary and in this case no warning
> is issued. All we see is:
>
>package ‘S4Vectors’ successfully unpacked and MD5 sums checked
>
> but the old DLL apparently didn't get replaced with the new one.
> Hence the
>
>error: "make_RAW_from_NA_LLINT" not available for .Call() for package
> "S4Vectors"
>
> later on when trying to load the package.
>
> Cheers,
> H.
>
>
> On 5/30/19 16:31, Toby Hocking wrote:
> > thanks for the tip Jan.
> >
> > However it would be nice if I didn't have to handle this myself for all
> of
> > my packages. (and teach my students how to do that)
> >
> > BTW I tried to disable staged installation, and the issue still happens:
> >
> > th798@cmp2986 MINGW64 ~/projects/max-generalized-auc (master)
> > $ R_INSTALL_STAGED=FALSE R --vanilla -e
> > ".libPaths('~/R/library');.libPaths();options(repos='
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.r-2Dproject.org&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=zldJhdavBFtHDHr08_HFRAi9MY2WBkTiDn1ggbog4cA&s=7X00xNRObhT9O68YU8m-IBkt38N5p_GP-UV77XEnKZw&e=
> ',
> > warn=2);library(penaltyLearning);install.packages('penaltyLearning',
> > type='source');getOption('warn');sessionInfo()"
> >
> > R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
> > Copyright (C) 2019 The R Foundation for Statistical Computing
> > Platform: x86_64-w64-mingw32/x64 (64-bit)
> >
> > R is free software and comes with ABSOLUTELY NO WARRANTY.
> > You are welcome to redistribute it under certain conditions.
> > Type 'license()' or 'licence()' for distribution details.
> >
> > R is a collaborative project with many contributors.
> > Type 'contributors()' for more information and
> > 'citation()' on how to cite R or R packages in publications.
> >
> > Type 'demo()' for some demos, 'help()' for on-line help, or
> > 'help.start()' for an HTML browser interface to help.
> > Type 'q()' to quit R.
> >
> >> .libPaths('~/R/library');.libPaths();options(repos='
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.r-2Dproject.org&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=zldJhdavBFtHDHr08_HFRAi9MY2WBkTiDn1ggbog4cA&s=7X00xNRObhT9O68YU8m-IBkt38N5p_GP-UV77XEnKZw&e=
> ',
> > warn=2);library(penaltyLearning);install.packages('penaltyLearning',
> > type='source');getOption('warn');sessionInfo()
> > [1] "C:/Users/th798/R/library"   "C:/Program
> > Files/R/R-3.6.0/library"
> > Loading required package: data.table
> > Registered S3 methods overwritten by 'ggplot2':
> >method from
> >[.quosures rlang
> >c.quosures rlang
> >print.quosures rlang
> > Installing package into 'C:/Users/th798/R/library'
> > (as 'lib' is unspecified)
> > trying URL '
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.r-2Dproject.org_src_contrib_penaltyLearning-5F2018.09.04.tar.gz&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=zldJhdavBFtHDHr08_HFRAi9MY2WBkTiDn1ggbog4cA&s=o34c6BnD4LvJv-00tYn5M2TqO_IjH5qtaKnnhI4ph50&e=
> '
> > Content type 'application/x-gzip' length 2837289 bytes (2.7 MB)
> > ==
> > downloaded 2.7 MB
> >
> > * installing *source* package 'penaltyLearning' ...
> > ** package 'penaltyLearning' successfully unpacked and MD5 sums checked
> > ** using non-staged installation
> > ** libs
> > c:/Rtools/mingw_64/bin/g++  -std=gnu++11
> -I"C:/PROGRA~1/R/R-36~1.0/include"
> > -DNDEBUG  -O2 -Wall  -mtune=generic -c interface.cpp -o
> interface.o
> > c:/Rtools/mingw_64/bin/g++  -std=gnu++11
> -I"C:/PROGRA~1/R/R-36~1.0/include"
> > -DNDEBUG  -O2 -Wall  -mtune=generic -c
> largestContinuousMinimum.cpp
> > -o largestContinuousMinimum.o
> > largestContinuousMinimum.cpp: In function 'int
> > largestContinuousMinimum(int, double*, double*, int*)':
> > largestContinuousMinimum.cpp:38:27: warning: 'start' may be used
> > uninitialized in this function [-Wmaybe-uninitialized]
> > index_vec[0] = start;
> >   

Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-30 Thread Pages, Herve
Also note that this can lead to people not being able to load the
package if the set of .Call entry points has changed between the old
and new versions of the package. We strongly suspect that this is what
happened to this Bioconductor user:

   https://support.bioconductor.org/p/121228/

Note that she's installing the binary and in this case no warning
is issued. All we see is:

   package ‘S4Vectors’ successfully unpacked and MD5 sums checked

but the old DLL apparently didn't get replaced with the new one.
Hence the

   error: "make_RAW_from_NA_LLINT" not available for .Call() for package 
"S4Vectors"

later on when trying to load the package.

Cheers,
H.


On 5/30/19 16:31, Toby Hocking wrote:
> thanks for the tip Jan.
> 
> However it would be nice if I didn't have to handle this myself for all of
> my packages. (and teach my students how to do that)
> 
> BTW I tried to disable staged installation, and the issue still happens:
> 
> th798@cmp2986 MINGW64 ~/projects/max-generalized-auc (master)
> $ R_INSTALL_STAGED=FALSE R --vanilla -e
> ".libPaths('~/R/library');.libPaths();options(repos='
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.r-2Dproject.org&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=zldJhdavBFtHDHr08_HFRAi9MY2WBkTiDn1ggbog4cA&s=7X00xNRObhT9O68YU8m-IBkt38N5p_GP-UV77XEnKZw&e=
>  ',
> warn=2);library(penaltyLearning);install.packages('penaltyLearning',
> type='source');getOption('warn');sessionInfo()"
> 
> R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
> Copyright (C) 2019 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
> 
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
> 
>> .libPaths('~/R/library');.libPaths();options(repos='
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.r-2Dproject.org&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=zldJhdavBFtHDHr08_HFRAi9MY2WBkTiDn1ggbog4cA&s=7X00xNRObhT9O68YU8m-IBkt38N5p_GP-UV77XEnKZw&e=
>  ',
> warn=2);library(penaltyLearning);install.packages('penaltyLearning',
> type='source');getOption('warn');sessionInfo()
> [1] "C:/Users/th798/R/library"   "C:/Program
> Files/R/R-3.6.0/library"
> Loading required package: data.table
> Registered S3 methods overwritten by 'ggplot2':
>method from
>[.quosures rlang
>c.quosures rlang
>print.quosures rlang
> Installing package into 'C:/Users/th798/R/library'
> (as 'lib' is unspecified)
> trying URL '
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.r-2Dproject.org_src_contrib_penaltyLearning-5F2018.09.04.tar.gz&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=zldJhdavBFtHDHr08_HFRAi9MY2WBkTiDn1ggbog4cA&s=o34c6BnD4LvJv-00tYn5M2TqO_IjH5qtaKnnhI4ph50&e=
>  '
> Content type 'application/x-gzip' length 2837289 bytes (2.7 MB)
> ==
> downloaded 2.7 MB
> 
> * installing *source* package 'penaltyLearning' ...
> ** package 'penaltyLearning' successfully unpacked and MD5 sums checked
> ** using non-staged installation
> ** libs
> c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
> -DNDEBUG  -O2 -Wall  -mtune=generic -c interface.cpp -o interface.o
> c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
> -DNDEBUG  -O2 -Wall  -mtune=generic -c largestContinuousMinimum.cpp
> -o largestContinuousMinimum.o
> largestContinuousMinimum.cpp: In function 'int
> largestContinuousMinimum(int, double*, double*, int*)':
> largestContinuousMinimum.cpp:38:27: warning: 'start' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
> index_vec[0] = start;
> ^
> c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
> -DNDEBUG  -O2 -Wall  -mtune=generic -c modelSelection.cpp -o
> modelSelection.o
> /usr/bin/sed: -e expression #1, char 1: unknown command: `C'
> c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o penaltyLearning.dll
> tmp.def interface.o largestContinuousMinimum.o modelSelection.o
> -LC:/PROGRA~1/R/R-36~1.0/bin/x64 -lR
> installing to C:/Users/th798/R/library/penaltyLearning/libs/x64
> Warning in file.copy(files, dest, overwrite = TRUE) :
>problem copying .\penaltyLearning.dll to
> C:\Users\th798\R\library\penaltyLearning\libs\x64\penaltyLearning.dll:
> Permission denied
> ** R
> ** data
> ** byte-compile and prepare package for lazy loading
> ** help
> *** installing hel

Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-30 Thread Toby Hocking
thanks for the tip Jan.

However it would be nice if I didn't have to handle this myself for all of
my packages. (and teach my students how to do that)

BTW I tried to disable staged installation, and the issue still happens:

th798@cmp2986 MINGW64 ~/projects/max-generalized-auc (master)
$ R_INSTALL_STAGED=FALSE R --vanilla -e
".libPaths('~/R/library');.libPaths();options(repos='
https://cloud.r-project.org',
warn=2);library(penaltyLearning);install.packages('penaltyLearning',
type='source');getOption('warn');sessionInfo()"

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> .libPaths('~/R/library');.libPaths();options(repos='
https://cloud.r-project.org',
warn=2);library(penaltyLearning);install.packages('penaltyLearning',
type='source');getOption('warn');sessionInfo()
[1] "C:/Users/th798/R/library"   "C:/Program
Files/R/R-3.6.0/library"
Loading required package: data.table
Registered S3 methods overwritten by 'ggplot2':
  method from
  [.quosures rlang
  c.quosures rlang
  print.quosures rlang
Installing package into 'C:/Users/th798/R/library'
(as 'lib' is unspecified)
trying URL '
https://cloud.r-project.org/src/contrib/penaltyLearning_2018.09.04.tar.gz'
Content type 'application/x-gzip' length 2837289 bytes (2.7 MB)
==
downloaded 2.7 MB

* installing *source* package 'penaltyLearning' ...
** package 'penaltyLearning' successfully unpacked and MD5 sums checked
** using non-staged installation
** libs
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
-DNDEBUG  -O2 -Wall  -mtune=generic -c interface.cpp -o interface.o
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
-DNDEBUG  -O2 -Wall  -mtune=generic -c largestContinuousMinimum.cpp
-o largestContinuousMinimum.o
largestContinuousMinimum.cpp: In function 'int
largestContinuousMinimum(int, double*, double*, int*)':
largestContinuousMinimum.cpp:38:27: warning: 'start' may be used
uninitialized in this function [-Wmaybe-uninitialized]
   index_vec[0] = start;
   ^
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
-DNDEBUG  -O2 -Wall  -mtune=generic -c modelSelection.cpp -o
modelSelection.o
/usr/bin/sed: -e expression #1, char 1: unknown command: `C'
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o penaltyLearning.dll
tmp.def interface.o largestContinuousMinimum.o modelSelection.o
-LC:/PROGRA~1/R/R-36~1.0/bin/x64 -lR
installing to C:/Users/th798/R/library/penaltyLearning/libs/x64
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\penaltyLearning.dll to
C:\Users\th798\R\library\penaltyLearning\libs\x64\penaltyLearning.dll:
Permission denied
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'penaltyLearning'
finding HTML links ... done
GeomTallRecthtml
IntervalRegressionCVhtml
IntervalRegressionCVmargin  html
IntervalRegressionInternal  html
IntervalRegressionRegularized   html
IntervalRegressionUnregularized html
ROChangehtml
change.colors   html
change.labels   html
changeLabel html
check_features_targets  html
check_target_pred   html
coef.IntervalRegression html
demo8   html
featureMatrix   html
featureVector   html
geom_tallrect   html
labelError  html
largestContinuousMinimumC   html
largestContinuousMinimumR   html
modelSelection  html
modelSelectionC html
modelSelectionR html
neuroblastomaProcessed  html
oneSkip html
plot.IntervalRegression html
predict.IntervalRegression  html
print.IntervalRegressionhtml
squared.hinge   html
targetIntervalROC   ht

Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-29 Thread Jan Gorecki
Hi Toby,
AFAIK it has not been addressed in R. You can handle the problem on
your package side, see
https://github.com/Rdatatable/data.table/pull/3237
Regards,
Jan


On Thu, May 30, 2019 at 4:46 AM Toby Hocking  wrote:
>
> Hi all,
>
> I am having an issue related to installing packages on windows with
> R-3.6.0. When installing a package that is in use, I expected R to stop
> with an error. However I am getting a warning that the DLL copy was not
> successful, but the overall package installation IS successful. This is
> quite dangerous because the old DLL and the new R code could be
> incompatible.
>
> I am definitely not the first person to have this issue.
> * Matt Dowle reported
> https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17478 which was never
> addressed.
> * Jim Hester reported
> https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17453 which was
> apparently addressed in R-3.5.1, via
> https://github.com/wch/r-source/commit/828a04f9c428403e476620b1905a1d8ca41d0bcd
>
> But I am now having the same issue in R-3.6.0 -- is this a regression in R?
> or is there another fix that I can use?
>
> Below is the minimal R code that I used to reproduce the issue. Essentially,
> * I start R with --vanilla and set options repos=cloud and warn=2 (which I
> expect should convert warnings to errors).
> * I do library(penaltyLearning) and then install the package from source,
> which results in the
>   warnings. I expected there should be an error.
>
> th798@cmp2986 MINGW64 ~/R
> $ R --vanilla -e "options(repos='https://cloud.r-project.org',
> warn=2);library(penaltyLearning);install.packages('penaltyLearning',
> type='source');getOption('warn');sessionInfo()"
>
> R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
> Copyright (C) 2019 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> > options(repos='https://cloud.r-project.org',
> warn=2);library(penaltyLearning);install.packages('penaltyLearning',
> type='source');getOption('warn');sessionInfo()
> Loading required package: data.table
> Registered S3 methods overwritten by 'ggplot2':
>   method from
>   [.quosures rlang
>   c.quosures rlang
>   print.quosures rlang
> trying URL '
> https://cloud.r-project.org/src/contrib/penaltyLearning_2018.09.04.tar.gz'
> Content type 'application/x-gzip' length 2837289 bytes (2.7 MB)
> ==
> downloaded 2.7 MB
>
> * installing *source* package 'penaltyLearning' ...
> ** package 'penaltyLearning' successfully unpacked and MD5 sums checked
> ** using staged installation
> ** libs
> c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
> -DNDEBUG  -O2 -Wall  -mtune=generic -c interface.cpp -o interface.o
> c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
> -DNDEBUG  -O2 -Wall  -mtune=generic -c largestContinuousMinimum.cpp
> -o largestContinuousMinimum.o
> largestContinuousMinimum.cpp: In function 'int
> largestContinuousMinimum(int, double*, double*, int*)':
> largestContinuousMinimum.cpp:38:27: warning: 'start' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>index_vec[0] = start;
>^
> c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
> -DNDEBUG  -O2 -Wall  -mtune=generic -c modelSelection.cpp -o
> modelSelection.o
> /usr/bin/sed: -e expression #1, char 1: unknown command: `C'
> c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o penaltyLearning.dll
> tmp.def interface.o largestContinuousMinimum.o modelSelection.o
> -LC:/PROGRA~1/R/R-36~1.0/bin/x64 -lR
> installing to C:/Program
> Files/R/R-3.6.0/library/00LOCK-penaltyLearning/00new/penaltyLearning/libs/x64
> ** R
> ** data
> ** byte-compile and prepare package for lazy loading
> ** help
> *** installing help indices
>   converting help for package 'penaltyLearning'
> finding HTML links ... done
> GeomTallRecthtml
> IntervalRegressionCVhtml
> IntervalRegressionCVmargin  html
> IntervalRegressionInternal  html
> IntervalRegressionRegularized   html
> IntervalRegressionUnregularized html
> ROChangehtml
> change.colors   html
> change.labels   html
> changeLabel html
> check_features_tar

[Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-29 Thread Toby Hocking
Hi all,

I am having an issue related to installing packages on windows with
R-3.6.0. When installing a package that is in use, I expected R to stop
with an error. However I am getting a warning that the DLL copy was not
successful, but the overall package installation IS successful. This is
quite dangerous because the old DLL and the new R code could be
incompatible.

I am definitely not the first person to have this issue.
* Matt Dowle reported
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17478 which was never
addressed.
* Jim Hester reported
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17453 which was
apparently addressed in R-3.5.1, via
https://github.com/wch/r-source/commit/828a04f9c428403e476620b1905a1d8ca41d0bcd

But I am now having the same issue in R-3.6.0 -- is this a regression in R?
or is there another fix that I can use?

Below is the minimal R code that I used to reproduce the issue. Essentially,
* I start R with --vanilla and set options repos=cloud and warn=2 (which I
expect should convert warnings to errors).
* I do library(penaltyLearning) and then install the package from source,
which results in the
  warnings. I expected there should be an error.

th798@cmp2986 MINGW64 ~/R
$ R --vanilla -e "options(repos='https://cloud.r-project.org',
warn=2);library(penaltyLearning);install.packages('penaltyLearning',
type='source');getOption('warn');sessionInfo()"

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> options(repos='https://cloud.r-project.org',
warn=2);library(penaltyLearning);install.packages('penaltyLearning',
type='source');getOption('warn');sessionInfo()
Loading required package: data.table
Registered S3 methods overwritten by 'ggplot2':
  method from
  [.quosures rlang
  c.quosures rlang
  print.quosures rlang
trying URL '
https://cloud.r-project.org/src/contrib/penaltyLearning_2018.09.04.tar.gz'
Content type 'application/x-gzip' length 2837289 bytes (2.7 MB)
==
downloaded 2.7 MB

* installing *source* package 'penaltyLearning' ...
** package 'penaltyLearning' successfully unpacked and MD5 sums checked
** using staged installation
** libs
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
-DNDEBUG  -O2 -Wall  -mtune=generic -c interface.cpp -o interface.o
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
-DNDEBUG  -O2 -Wall  -mtune=generic -c largestContinuousMinimum.cpp
-o largestContinuousMinimum.o
largestContinuousMinimum.cpp: In function 'int
largestContinuousMinimum(int, double*, double*, int*)':
largestContinuousMinimum.cpp:38:27: warning: 'start' may be used
uninitialized in this function [-Wmaybe-uninitialized]
   index_vec[0] = start;
   ^
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include"
-DNDEBUG  -O2 -Wall  -mtune=generic -c modelSelection.cpp -o
modelSelection.o
/usr/bin/sed: -e expression #1, char 1: unknown command: `C'
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o penaltyLearning.dll
tmp.def interface.o largestContinuousMinimum.o modelSelection.o
-LC:/PROGRA~1/R/R-36~1.0/bin/x64 -lR
installing to C:/Program
Files/R/R-3.6.0/library/00LOCK-penaltyLearning/00new/penaltyLearning/libs/x64
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'penaltyLearning'
finding HTML links ... done
GeomTallRecthtml
IntervalRegressionCVhtml
IntervalRegressionCVmargin  html
IntervalRegressionInternal  html
IntervalRegressionRegularized   html
IntervalRegressionUnregularized html
ROChangehtml
change.colors   html
change.labels   html
changeLabel html
check_features_targets  html
check_target_pred   html
coef.IntervalRegression html
demo8   html
featureMatrix   html
featureVector   html
geom_tallrect   html
labelError  html
largestContinuousMinimumC   html