Re: [R-pkg-devel] R CMD check getting stalled

2015-05-29 Thread Winston Chang
I should also mention that on the machine that had this problem, the user
had installed some software that provided the du program in
c:/windows/system32.

On that machine, with 64-bit R:

> > system2("du")


> Du v1.34 - report directory disk usage

Copyright (C) 2005-2009 Mark Russinovich

Sysinternals - www.sysinternals.com


> usage: C:\Windows\system32\du.exe [[-v] [-l ] | [-n]] [-q]
> 

   -l Specify subdirectory depth of information (default is all levels).

   -n Do not recurse.

   -q Quiet (no banner).

   -u Count only unique file occurences.

   -v Show size (in KB) of intermediate directories.


> Warning message:

running command '"du"' had status 65535


-Winston

On Thursday, May 28, 2015, Hadley Wickham > wrote:

> Ok, it looks like it's actually quite a subtle problem. (Thanks to
> Winston Chang for tracking it down). The root of the problem appears
> to be the call to du at
>
> https://github.com/wch/r-source/blob/9ffe87264a1cd59a31a829f72d57af0f1bfa327a/src/library/tools/R/check.R#L3639
>
> With 32-bit R Sys.which("du") finds Rtools/bin/du.exe, whereas 64-bit
> R finds c:/windows/system32/du.exe (see attached screenshot).
>
> Hadley
>
>
> On Thu, May 28, 2015 at 4:04 PM, Uwe Ligges
>  wrote:
> > I guess a package that was installed by root and later on checked by a
> > regular user or some such, so that permissions do not match.
> >
> > I think I'd try to remove the package from all libraries and try again.
> And
> > note that network drives/mounts may be the source of such a problem when
> > some listings are disabled.
> >
> > Best,
> > Uwe Ligges
> >
> >
> >
> >
> > On 28.05.2015 23:02, Hadley Wickham wrote:
> >>>
> >>> Wild guess: It's not the package but the file system or file
> permissions
> >>> so
> >>> that you cannot determine the size.
> >>
> >>
> >> Do you have any thoughts on where specifically to look? Permissions of
> >> the library or of the current dir?
> >>
> >> I also wondered if it might be caused by a recursive link that caused
> >> the size inspection to never finish, but there aren't any symlinks in
> >> the package.
> >>
> >> I have one student in a class of ~60 students who has this problem.
> >> The package source is at https://github.com/hadley/rv2/tree/check-me,
> >> but it seems unlikely to be related to the package as it works for
> >> everyone else.
> >>
> >> Hadley
> >>
> >
>
>
>
> --
> http://had.co.nz/
>


-- 
Sent from my phone

[[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] Extending MIT software

2015-05-29 Thread Thomas Petzoldt

Hi,

I am not a lawyer, but as far as I know, the MIT license allows 
re-licensing of derived work under the GPL.


See: http://en.wikipedia.org/wiki/License_compatibility

http://en.wikipedia.org/wiki/MIT_License

So what speaks against releasing your derived work under the GPL >= 2?

Thomas


On 28.05.2015 17:48, Charles Determan wrote:

When developing a new package we want to have a license attributed to that
package.  That said, I am a little confused how one would approach the MIT
license.  I am working on a package that extends upon another library that
has the MIT license.  I know that I need to create a LICENSE file with YEAR
and COPYRIGHT HOLDER.

My question is, would the copyright holder be just the authors for this
given R package or a combination of the R package authors and the original
library authors?

Regards,
Charles



--
Dr. Thomas Petzoldt
Technische Universitaet Dresden
Faculty of Environmental Sciences
Institute of Hydrobiology
01062 Dresden, Germany

E-Mail: thomas.petzo...@tu-dresden.de
http://tu-dresden.de/Members/thomas.petzoldt

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


[R-pkg-devel] license for package

2015-05-29 Thread Pieter Eendebak
Dear developers,

How can I specify the license for my package when my package includes some
code with other licenses (and different copyright holders). In particular:

- my package is BSD 2-clause
- my packages in includes MPL-2 code (Eigen math library)
- my package includes some MIT code (different author)

With kind regards,
Pieter Eendebak

[[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] license for package

2015-05-29 Thread Thomas Petzoldt

Dear Pieter,

there was recently a related discussion in the JSS editorial board. Some 
people took the position that there should be maximum possible freedom 
for software developers in choosing an appropriate license. Others saw 
the problem of confusion for users and developers of derived work, if 
too many licenses come into play and advocated for a strict application 
of the GPL.


In the end it was decided that "Code distributed with JSS articles uses 
the GNU General Public License version 2 or version 3 or a 
GPL-compatible license." (http://www.jstatsoft.org/instructions)


This compromise tries to respect both, rights of the software authors 
and interests of users, who (in most cases) don't want to bother too 
much about this.


More details about what is GPL compatible can be found here:
https://gnu.org/licenses/license-list.en.html

Information about the MPL-2 is found here:
https://www.mozilla.org/MPL/2.0/FAQ.html

R itself "as a package is licensed under GPL-2 | GPL-3", while 
associated software such as packages used licenses like this: 
http://www.r-project.org/Licenses/


Finally, technical advise to licensing of packages is found in "Writing 
R Extensions":


http://cran.at.r-project.org/doc/manuals/r-devel/R-exts.html#Licensing

Hope it helps,

Thomas



On 29.05.2015 11:44, Pieter Eendebak wrote:

Dear developers,

How can I specify the license for my package when my package includes some
code with other licenses (and different copyright holders). In particular:

- my package is BSD 2-clause
- my packages in includes MPL-2 code (Eigen math library)
- my package includes some MIT code (different author)

With kind regards,
Pieter Eendebak


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


Re: [R-pkg-devel] license for package

2015-05-29 Thread Dirk Eddelbuettel

On 29 May 2015 at 11:44, Pieter Eendebak wrote:
| Dear developers,
| 
| How can I specify the license for my package when my package includes some
| code with other licenses (and different copyright holders). In particular:
| 
| - my package is BSD 2-clause
| - my packages in includes MPL-2 code (Eigen math library)

Narrow comment: If you do 'LinkingTo: RcppEigen' you do not need to include
the Eigen headers yourself.

| - my package includes some MIT code (different author)

You cannot relicense code by other people.  Their license stays.

You have some choice in how you license _your_ code in the package.  That
said, license "cross-products" have conflicts, but licensing your code under
BSD-2 in the context of the GPL-2'ed R / MIT'ed other parts should be fine.
See the links in Thomas's post for more.

Lastly, in many cases [eg when you link against libR], the "aggregate work"
will be under GPL (>= 2) anyway.  But within the "aggregate work" the code
you added can be under a different license (as long as it is compatible).

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] Extending MIT software

2015-05-29 Thread Charles Determan
Thank you Thomas, I guess there is nothing, that I am aware of, that
prevents me from releasing with GPL >= 2 but I wanted to get some insights
as to what would be a best practice.  I prefer to give as much credit as
possible where it is do.

On Thu, May 28, 2015 at 10:59 AM, Thomas Petzoldt <
thomas.petzo...@tu-dresden.de> wrote:

> Hi,
>
> I am not a lawyer, but as far as I know, the MIT license allows
> re-licensing of derived work under the GPL.
>
> See: http://en.wikipedia.org/wiki/License_compatibility
>
> http://en.wikipedia.org/wiki/MIT_License
>
> So what speaks against releasing your derived work under the GPL >= 2?
>
> Thomas
>
>
>
> On 28.05.2015 17:48, Charles Determan wrote:
>
>> When developing a new package we want to have a license attributed to that
>> package.  That said, I am a little confused how one would approach the MIT
>> license.  I am working on a package that extends upon another library that
>> has the MIT license.  I know that I need to create a LICENSE file with
>> YEAR
>> and COPYRIGHT HOLDER.
>>
>> My question is, would the copyright holder be just the authors for this
>> given R package or a combination of the R package authors and the original
>> library authors?
>>
>> Regards,
>> Charles
>>
>
>
> --
> Dr. Thomas Petzoldt
> Technische Universitaet Dresden
> Faculty of Environmental Sciences
> Institute of Hydrobiology
> 01062 Dresden, Germany
>
> E-Mail: thomas.petzo...@tu-dresden.de
> http://tu-dresden.de/Members/thomas.petzoldt
>
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[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] license for package

2015-05-29 Thread Drew Schmidt


On 05/29/2015 07:56 AM, Dirk Eddelbuettel wrote:

Lastly, in many cases [eg when you link against libR], the "aggregate work"
will be under GPL (>= 2) anyway.  But within the "aggregate work" the code
you added can be under a different license (as long as it is compatible).


This is the generally the FSF's interpretation, but others disagree; for 
instance http://www.law.washington.edu/lta/swp/law/derivative.html.


In reality, this stuff has never been tested in court, so no one really 
knows what the rules are.


-Drew

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


Re: [R-pkg-devel] license for package

2015-05-29 Thread Achim Zeileis

On Fri, 29 May 2015, Dirk Eddelbuettel wrote:



On 29 May 2015 at 11:44, Pieter Eendebak wrote:
| Dear developers,
|
| How can I specify the license for my package when my package includes some
| code with other licenses (and different copyright holders). In particular:
|
| - my package is BSD 2-clause
| - my packages in includes MPL-2 code (Eigen math library)

Narrow comment: If you do 'LinkingTo: RcppEigen' you do not need to include
the Eigen headers yourself.

| - my package includes some MIT code (different author)

You cannot relicense code by other people.  Their license stays.


To add one detail to this argument: You may be able to sublicense, though. 
Especially for the permissive MIT/X11 license even "trivial" sublicensing 
is allowed as long as the original copyright is preserved. (IANAL, of 
course...)


The OSI had an FAQ at http://ideas.opensource.org/wiki/help/license which 
currently appears to be offline. However, FAQ item 7 was:


-
Q: Can I always "relicense" BSD licensed-software under a new license?

If you define relicensing as "sublicensing, possibly under additional 
terms and conditions which do not contradict the terms and conditions of 
an original licensor's permissive license", then the answer is generally 
"yes" -- provided you also retain the original copyright information. 
However, strictly speaking, you can only modify the license of a 
"derivative work", and opinions differ on how much change is required to 
qualify as a derivative work. The MIT license and Academic Free License, 
for example, freely allow "trivial" sublicensing (without any other 
changes) as long as the copyright is preserved. Conversely, the Apache 2.0 
license only allows sublicensing for "Derivative Works", which it defines 
as "original works of authorship" -- meaning non-trivial additions. The 
new BSD license, unfortunately, is silent on this point. If you are 
planning to "trivially relicense" BSD software, you are encouraged to 
first check with the copyright holder and/or your own legal counsel.

-


You have some choice in how you license _your_ code in the package.
That said, license "cross-products" have conflicts, but licensing your 
code under BSD-2 in the context of the GPL-2'ed R / MIT'ed other parts 
should be fine. See the links in Thomas's post for more.


Lastly, in many cases [eg when you link against libR], the "aggregate work"
will be under GPL (>= 2) anyway.  But within the "aggregate work" the code
you added can be under a different license (as long as it is compatible).

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
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


[R-pkg-devel] Package with multiple compilers?

2015-05-29 Thread Charles Determan
I am actively working on an R package that will incorporate some CUDA code
for using NVIDIA GPU devices.  I am quite familiar with Rcpp for C++ code
and accustomed to using a Makevars file for specifying compiler options.
However I am stumped currently about how to use the NVCC compiler for the
.cu files.

Typically, a CUDA program will first be compiled with NVCC and the linked
with any other .o files.

# very simplified example
nvcc my_cuda_function.cu -o my_cuda_function.o
g++ -o my_program.so other_cpp_function.o my_cuda_function.o

I have seem some older packages using a Makefile but I have also read that
this is currently recommended against because of the need for multiarch
builds.

Does anyone know how I can tell R to compile .cu files with NVCC and
'proceed as normal' with the resulting .o files?

Regards,
Charles

[[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] Package with multiple compilers?

2015-05-29 Thread Duncan Murdoch

On 29/05/2015 9:52 AM, Charles Determan wrote:

I am actively working on an R package that will incorporate some CUDA code
for using NVIDIA GPU devices.  I am quite familiar with Rcpp for C++ code
and accustomed to using a Makevars file for specifying compiler options.
However I am stumped currently about how to use the NVCC compiler for the
.cu files.

Typically, a CUDA program will first be compiled with NVCC and the linked
with any other .o files.

# very simplified example
nvcc my_cuda_function.cu -o my_cuda_function.o
g++ -o my_program.so other_cpp_function.o my_cuda_function.o

I have seem some older packages using a Makefile but I have also read that
this is currently recommended against because of the need for multiarch
builds.

Does anyone know how I can tell R to compile .cu files with NVCC and
'proceed as normal' with the resulting .o files?


You can include the recipes for those .o files in your Makevars file.  
It is essentially a fragment of the full Makefile needed by your 
package.  I forget if you'll need to give an explicit recipe for the 
library, or whether the standard file will link them in. Try it!


Duncan Murdoch

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


Re: [R-pkg-devel] Package with multiple compilers?

2015-05-29 Thread Kevin Ushey
The GitHub search feature is also quite useful for seeing how other package
authors have constructed Makevars (or Makevars.win) when compiling with
custom targets. For example, a quick search of how some authors manipulate
OBJECTS in Makevars.win:


https://github.com/search?utf8=%E2%9C%93&q=OBJECTS+extension%3Awin&type=Code&ref=advsearch&l=

Of course, not all examples are good examples, but it definitely provides
examples to learn from -- and personally, my Makefile-fu is pretty weak.

Here's an example from 'gpusim' using 'nvcc' in their own Makevars.win:
https://github.com/rforge/gpusim/blob/d07dd509be5d414d3f4add66db8c841146813544/pkg/src/Makefile.win

Hopefully this gives you some more direction...

Kevin

On Fri, May 29, 2015 at 10:49 AM Duncan Murdoch 
wrote:

> On 29/05/2015 9:52 AM, Charles Determan wrote:
> > I am actively working on an R package that will incorporate some CUDA
> code
> > for using NVIDIA GPU devices.  I am quite familiar with Rcpp for C++ code
> > and accustomed to using a Makevars file for specifying compiler options.
> > However I am stumped currently about how to use the NVCC compiler for the
> > .cu files.
> >
> > Typically, a CUDA program will first be compiled with NVCC and the linked
> > with any other .o files.
> >
> > # very simplified example
> > nvcc my_cuda_function.cu -o my_cuda_function.o
> > g++ -o my_program.so other_cpp_function.o my_cuda_function.o
> >
> > I have seem some older packages using a Makefile but I have also read
> that
> > this is currently recommended against because of the need for multiarch
> > builds.
> >
> > Does anyone know how I can tell R to compile .cu files with NVCC and
> > 'proceed as normal' with the resulting .o files?
>
> You can include the recipes for those .o files in your Makevars file.
> It is essentially a fragment of the full Makefile needed by your
> package.  I forget if you'll need to give an explicit recipe for the
> library, or whether the standard file will link them in. Try it!
>
> Duncan Murdoch
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[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] license for package

2015-05-29 Thread Dirk Eddelbuettel

On 29 May 2015 at 08:23, Drew Schmidt wrote:
| 
| On 05/29/2015 07:56 AM, Dirk Eddelbuettel wrote:
| > Lastly, in many cases [eg when you link against libR], the "aggregate work"
| > will be under GPL (>= 2) anyway.  But within the "aggregate work" the code
| > you added can be under a different license (as long as it is compatible).
| 
| This is the generally the FSF's interpretation, but others disagree; for 
| instance http://www.law.washington.edu/lta/swp/law/derivative.html.

Well neither you nor I are lawyers but folks at eg

  Software Freedom Conservancy (https://sfconservancy.org/) and

  Software Freedom Law Center (https://www.softwarefreedom.org/)

are, and they have views on this that differ from yours.  One you could also
point out that many commercial software firms (from large like RedHat to
smaller like RStudio) seems to agree with this view.
 
| In reality, this stuff has never been tested in court, so no one really 
| knows what the rules are.

Sure but there is both a pending case which may change this and of course
word of many cases settled before it had to move to court. 

Dirk


-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] license for package

2015-05-29 Thread Drew Schmidt


On 05/29/2015 03:31 PM, Dirk Eddelbuettel wrote:

Well neither you nor I are lawyers but folks at eg

   Software Freedom Conservancy (https://sfconservancy.org/) and

   Software Freedom Law Center (https://www.softwarefreedom.org/)

are, and they have views on this that differ from yours.


I don't recall stating my views on this topic.  My goal in this exchange 
was to provide differing legal opinion (via the link) to the FSF's 
notion of "derivative work" in the case of dynamic linking.


If by your additional comments you mean to suggest that someone should 
approach the issue cautiously, I couldn't agree more.  But, until this 
is resolved in court, behaving as though the matter is already settled 
is duplicitous, in my opinion.


But this is hastily drifting away from the original topic, and I 
apologize for causing the digression.


-Drew

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