[Rd] [PATCH] Makefile: add support for git svn clones

2015-01-12 Thread Felipe Balbi
git has an interface for cloning SVN repositories into git which
some users might decide to use. For those users' surprise, the
repository will always fail to build on svnonly target and it will
exit early.

The problem is simple enough to fix by just checking if a .git
directory exists in top_builddir and, if so, call git svn info insstead
of svn info.

Signed-off-by: Felipe Balbi 
---

Patch generated with git. Let me know if there are any formatting
changes you guys might want.

 Makefile.in | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 44b0a3b4b99f..221c437972ad 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -9,6 +9,9 @@ top_builddir = .
 
 include $(top_builddir)/Makeconf
 
+GIT := $(shell if [ -d "$(top_builddir)/.git" ]; then \
+   echo "git"; fi)
+
 distdir = $(PACKAGE)-$(VERSION)
 INSTFILES = COPYING
 NON_SVN_INSTFILES = SVN-REVISION
@@ -104,7 +107,7 @@ svnonly:
@if test ! -f "$(srcdir)/doc/FAQ" || test -f non-tarball ; then \
  (cd doc/manual && $(MAKE) front-matter html-non-svn) ; \
  touch non-tarball ; \
- (cd $(srcdir); LC_ALL=C TZ=GMT svn info || $(ECHO) "Revision: -99") 
2> /dev/null \
+ (cd $(srcdir); LC_ALL=C TZ=GMT $(GIT) svn info || $(ECHO) "Revision: 
-99") 2> /dev/null \
| sed -n -e '/^Revision/p' -e '/^Last Changed Date/'p \
| cut -d' ' -f1,2,3,4 > SVN-REVISION-tmp ; \
  if test "`cat SVN-REVISION-tmp`" = "Revision: -99"; then \
-- 
2.2.0

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


Re: [Rd] R CMD build looking for texi2dvi in the wrong place (R-devel)

2015-01-12 Thread Dan Tenenbaum


- Original Message -
> From: "Duncan Murdoch" 
> To: "Dan Tenenbaum" , "Simon Urbanek" 
> 
> Cc: "R-devel" 
> Sent: Monday, January 12, 2015 8:40:07 PM
> Subject: Re: [Rd] R CMD build looking for texi2dvi in the wrong place 
> (R-devel)
> 
> On 12/01/2015 6:26 PM, Dan Tenenbaum wrote:
> > 
> > 
> > - Original Message -
> >> From: "Simon Urbanek" 
> >> To: "Dan Tenenbaum" 
> >> Cc: "R-devel" 
> >> Sent: Monday, January 12, 2015 5:50:35 PM
> >> Subject: Re: [Rd] R CMD build looking for texi2dvi in the wrong
> >> place (R-devel)
> >>
> >> Dan,
> >>
> >> On Jan 12, 2015, at 7:50 PM, Dan Tenenbaum
> >> 
> >> wrote:
> >>
> >>> R CMD build fails with recent R-devel because it is looking for
> >>> texi2dvi in /usr/local/bin, but on this system, MacTex has
> >>> installed it in /usr/bin.
> >>>
> >>
> >> No, you're looking at the wrong package - texi2dvi comes from
> >> texinfo
> >> which is now mandatory in version 5.2+ located in /usr/local since
> >> OS X comes with an old version. You should install it from
> >>
> >> http://r.research.att.com/libs/texinfo-5.2-darwin10.tar.gz
> >>
> > 
> > Thanks, was there an announcement that I missed about this and if
> > so, where was it?
> 
> It has been in the NEWS file since Jan 6.  You can see it there, and
> would have seen it announced here:
> 
> http://developer.r-project.org/blosxom.cgi/R-devel/2015/01/06#n2015-01-06
> 

Thanks, I'll subscribe to these feeds.
Dan


> Duncan Murdoch
>

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


Re: [Rd] R CMD build looking for texi2dvi in the wrong place (R-devel)

2015-01-12 Thread Duncan Murdoch
On 12/01/2015 6:26 PM, Dan Tenenbaum wrote:
> 
> 
> - Original Message -
>> From: "Simon Urbanek" 
>> To: "Dan Tenenbaum" 
>> Cc: "R-devel" 
>> Sent: Monday, January 12, 2015 5:50:35 PM
>> Subject: Re: [Rd] R CMD build looking for texi2dvi in the wrong place 
>> (R-devel)
>>
>> Dan,
>>
>> On Jan 12, 2015, at 7:50 PM, Dan Tenenbaum 
>> wrote:
>>
>>> R CMD build fails with recent R-devel because it is looking for
>>> texi2dvi in /usr/local/bin, but on this system, MacTex has
>>> installed it in /usr/bin.
>>>
>>
>> No, you're looking at the wrong package - texi2dvi comes from texinfo
>> which is now mandatory in version 5.2+ located in /usr/local since
>> OS X comes with an old version. You should install it from
>>
>> http://r.research.att.com/libs/texinfo-5.2-darwin10.tar.gz
>>
> 
> Thanks, was there an announcement that I missed about this and if so, where 
> was it? 

It has been in the NEWS file since Jan 6.  You can see it there, and
would have seen it announced here:

http://developer.r-project.org/blosxom.cgi/R-devel/2015/01/06#n2015-01-06

Duncan Murdoch

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


Re: [Rd] R CMD build looking for texi2dvi in the wrong place (R-devel)

2015-01-12 Thread Dan Tenenbaum


- Original Message -
> From: "Simon Urbanek" 
> To: "Dan Tenenbaum" 
> Cc: "R-devel" 
> Sent: Monday, January 12, 2015 5:50:35 PM
> Subject: Re: [Rd] R CMD build looking for texi2dvi in the wrong place 
> (R-devel)
> 
> Dan,
> 
> On Jan 12, 2015, at 7:50 PM, Dan Tenenbaum 
> wrote:
> 
> > R CMD build fails with recent R-devel because it is looking for
> > texi2dvi in /usr/local/bin, but on this system, MacTex has
> > installed it in /usr/bin.
> > 
> 
> No, you're looking at the wrong package - texi2dvi comes from texinfo
> which is now mandatory in version 5.2+ located in /usr/local since
> OS X comes with an old version. You should install it from
> 
> http://r.research.att.com/libs/texinfo-5.2-darwin10.tar.gz
> 

Thanks, was there an announcement that I missed about this and if so, where was 
it? 

Dan



> Cheers,
> Simon
> 
> 
> 
> > $ R CMD build IRanges
> > * checking for file 'IRanges/DESCRIPTION' ... OK
> > * preparing 'IRanges':
> > * checking DESCRIPTION meta-information ... OK
> > * cleaning src
> > * installing the package to build vignettes
> > * creating vignettes ... ERROR
> > [...]
> > Warning in sub(object$syntax$docexpr, val, chunk[pos[1L]]) :
> >  argument 'replacement' has length > 1 and only the first element
> >  will be used
> > Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet =
> > quiet,  :
> >  Running 'texi2dvi' on 'IRangesOverview.tex' failed.
> > Messages:
> > sh: /usr/local/bin/texi2dvi: No such file or directory
> > Calls:  -> texi2pdf -> texi2dvi
> > Execution halted
> > 
> > That's with:
> > 
> > R Under development (unstable) (2015-01-11 r67421)
> > Platform: x86_64-apple-darwin13.4.0 (64-bit)
> > Running under: OS X 10.9.5 (Mavericks)
> > 
> > locale:
> > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> > 
> > attached base packages:
> > [1] stats graphics  grDevices utils datasets  methods
> >   base
> > 
> > The same command works without error on:
> > 
> > R Under development (unstable) (2014-11-11 r66970)
> > Platform: x86_64-apple-darwin13.4.0 (64-bit)
> > 
> > locale:
> > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> > 
> > attached base packages:
> > [1] stats graphics  grDevices utils datasets  methods
> >   base
> > 
> > Setting
> > options(texi2dvi='/usr/bin/texi2dvi')
> > 
> > in my ~/.Rprofile did not help, I suspect because R CMD build runs
> > buildVignettes() in a subprocess started with --vanilla. Creating
> > a symlink from /usr/bin/texi2dvi to /usr/local/bin/texi2dvi gave
> > me a "too many levels of symbolic links" error. Making it a hard
> > link works, but seems like a real hack (what if the executable was
> > not relocatable?).
> > 
> > Thanks in advance,
> > Dan
> > 
> > __
> > 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 CMD build looking for texi2dvi in the wrong place (R-devel)

2015-01-12 Thread Simon Urbanek
Dan,

On Jan 12, 2015, at 7:50 PM, Dan Tenenbaum  wrote:

> R CMD build fails with recent R-devel because it is looking for texi2dvi in 
> /usr/local/bin, but on this system, MacTex has installed it in /usr/bin.
> 

No, you're looking at the wrong package - texi2dvi comes from texinfo which is 
now mandatory in version 5.2+ located in /usr/local since OS X comes with an 
old version. You should install it from

http://r.research.att.com/libs/texinfo-5.2-darwin10.tar.gz

Cheers,
Simon



> $ R CMD build IRanges
> * checking for file 'IRanges/DESCRIPTION' ... OK
> * preparing 'IRanges':
> * checking DESCRIPTION meta-information ... OK
> * cleaning src
> * installing the package to build vignettes
> * creating vignettes ... ERROR
> [...]
> Warning in sub(object$syntax$docexpr, val, chunk[pos[1L]]) :
>  argument 'replacement' has length > 1 and only the first element will be used
> Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
>  Running 'texi2dvi' on 'IRangesOverview.tex' failed.
> Messages:
> sh: /usr/local/bin/texi2dvi: No such file or directory
> Calls:  -> texi2pdf -> texi2dvi
> Execution halted
> 
> That's with:
> 
> R Under development (unstable) (2015-01-11 r67421)
> Platform: x86_64-apple-darwin13.4.0 (64-bit)
> Running under: OS X 10.9.5 (Mavericks)
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base 
> 
> The same command works without error on:
> 
> R Under development (unstable) (2014-11-11 r66970)
> Platform: x86_64-apple-darwin13.4.0 (64-bit)
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base 
> 
> Setting 
> options(texi2dvi='/usr/bin/texi2dvi')
> 
> in my ~/.Rprofile did not help, I suspect because R CMD build runs 
> buildVignettes() in a subprocess started with --vanilla. Creating a symlink 
> from /usr/bin/texi2dvi to /usr/local/bin/texi2dvi gave me a "too many levels 
> of symbolic links" error. Making it a hard link works, but seems like a real 
> hack (what if the executable was not relocatable?). 
> 
> Thanks in advance,
> Dan
> 
> __
> 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


[Rd] R CMD build looking for texi2dvi in the wrong place (R-devel)

2015-01-12 Thread Dan Tenenbaum
R CMD build fails with recent R-devel because it is looking for texi2dvi in 
/usr/local/bin, but on this system, MacTex has installed it in /usr/bin.

$ R CMD build IRanges
* checking for file 'IRanges/DESCRIPTION' ... OK
* preparing 'IRanges':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
* creating vignettes ... ERROR
[...]
Warning in sub(object$syntax$docexpr, val, chunk[pos[1L]]) :
  argument 'replacement' has length > 1 and only the first element will be used
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  Running 'texi2dvi' on 'IRangesOverview.tex' failed.
Messages:
sh: /usr/local/bin/texi2dvi: No such file or directory
Calls:  -> texi2pdf -> texi2dvi
Execution halted

That's with:

R Under development (unstable) (2015-01-11 r67421)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base 

The same command works without error on:

R Under development (unstable) (2014-11-11 r66970)
Platform: x86_64-apple-darwin13.4.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base 

Setting 
options(texi2dvi='/usr/bin/texi2dvi')

in my ~/.Rprofile did not help, I suspect because R CMD build runs 
buildVignettes() in a subprocess started with --vanilla. Creating a symlink 
from /usr/bin/texi2dvi to /usr/local/bin/texi2dvi gave me a "too many levels of 
symbolic links" error. Making it a hard link works, but seems like a real hack 
(what if the executable was not relocatable?). 

Thanks in advance,
Dan

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


Re: [Rd] New version of Rtools for Windows

2015-01-12 Thread Avraham Adler
On Fri, Jan 9, 2015 at 12:19 PM, Duncan Murdoch
 wrote:
> On 09/01/2015 10:56 AM, Henric Winell wrote:
>> On 2015-01-08 02:31, Duncan Murdoch wrote:
>>
>>> On 07/01/2015 5:20 PM, Jeroen Ooms wrote:
 On Wed, Jan 7, 2015 at 8:00 AM, Duncan Murdoch  
 wrote:
>
> This version includes only minor updates to the tools.  I indicated last 
> summer that I was hoping to update GCC from the current version 4.6.3 
> before the R 3.2.0 release, but this now looks unlikely, unless someone 
> else with experience building it can help.

 I have been looking into this a bit over the past few months, also
 with mixed success. Nevertheless, below some experiences that might be
 worth sharing.

 The guys from mingw-w64 recommended (quite strongly) to move away from
 multilib. They explained that the standard approach is to create two
 separate toolchains; one that targets win32 and the other one that
 targets win64 (both tool chains can compiled for win32). Hence the
 only difference for R would be that instead of passing "-m64" and
 "-m32", it would need to set the path to the proper compiler.

 There are several initiatives that provide very complete suites of
 precompiled mingw-w64 tools. I think the ideal scenario would be if we
 could take advantage of an existing tool chain as we do on other
 platforms, although perhaps I do not fully understand the R-specific
 requirements on the windows compiler.
>>>
>>> I feel quite strongly that we need to be able to build the toolchain,
>>> rather than relying on binaries produced by others.  We may need to
>>> customize the toolchain, or we may need to rebuild it when a bug is
>>> identified.  Lots of binary builders abandon their builds and you can't
>>> count on them to solve problems at a later date.
>>>

 One project that looks very promising is msys2 [1,2]. It has a package
 manager (port of pacman from arch linux) and comes with a pretty
 complete set of msys [3] and other [4] packages that seems quite well
 maintained.
>>>
>>> Do they post complete instructions for building?  That's what I'm
>>> looking for.  I don't want to develop a build script (I don't know how),
>>> but I would like to have one.
>>
>> Have you looked at nuwen's distro (http://nuwen.net/mingw.html)?  It's
>> up-to-date (mingw-w64 3.3.0, binutils 2.25, GCC 4.9.2, ...) and includes
>> the build scripts.
>>
>
> No, I hadn't come across that one.  It looks quite promising. Thanks!



If it helps, after installing the nuwen distro and the latest version
of Rtools (for tar), both the release R-3.1.2 and R-patched (see [1])
builds stop on Windows7 64bit with the error below, probably related
to what Hin-Tak Leung said earlier. I can't even get to the point to
see if compat.c will fail.


windres -F pe-x86-64   -i dllversion.rc -o dllversion.o
comm: file 1 is not in sorted order
Makefile.win:29: recipe for target 'Rgraphapp.def' failed
make[4]: *** [Rgraphapp.def] Error 1
makefile:120: recipe for target 'rlibs' failed
make[3]: *** [rlibs] Error 1
makefile:179: recipe for target '../../bin/x64/R.dll' failed
make[2]: *** [../../bin/x64/R.dll] Error 2
makefile:104: recipe for target 'rbuild' failed
make[1]: *** [rbuild] Error 2
makefile:14: recipe for target 'all' failed
make: *** [all] Error 2

[1] 
https://stackoverflow.com/questions/12802723/comm-file-1-is-not-in-sorted-order-when-compiling-r-source-in-windows



>
> I also have another offer of help to put this together; I'll wait to see
> how that goes before announcing it.  But having two builds is better
> than one.
>
> Duncan Murdoch
>
>
>>
>> Henric
>>
>>
>>
>>>
>>> Duncan Murdoch
>>>

 The only issue I ran into with msys2 is that it uses a different c++
 exception model (seh/dwarf) than the current Rtools (which uses sjlj).
 See also [5]. Therefore, if a library uses exceptions, we cannot use
 the current Rtools to link a static library that was created with
 msys2  [6]. I am not sure if it also be a problem the other way
 around, and if this is still the case for recent versions of
 gcc/mingw.

 Finally, Ruby has build very similar to Rtools called DevKit-mingw64
 [7] that we might be able to borrow from.


 [1] https://msys2.github.io/
 [2] 
 http://stackoverflow.com/questions/25019057/how-are-msys-msys2-and-msysgit-related-to-each-other
 [3] https://github.com/Alexpux/MSYS2-packages
 [4] https://github.com/Alexpux/MINGW-packages
 [5] 
 http://stackoverflow.com/questions/15670169/what-is-difference-between-sjlj-vs-dwarf-vs-seh
 [6] 
 http://stackoverflow.com/questions/7751640/undefined-reference-to-gxx-personality-sj0
 [7] http://rubyinstaller.org/downloads/

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