[Rcppoctave-user] Apple Blues

Dominick Samperi djsamperi at gmail.com
Sat Nov 9 02:20:20 CET 2013


I've attached the output of R CMD check --as-cran.
No errors, just a few NOTE's. (Suggested package
RUnit must be installed.)

There has been a lot of discussion about "NOTE"
on r-revel, and it is not clear to me if this is considered
to be an error or just a warning. I don't know if CRAN
will accept a package with NOTE's...



On Fri, Nov 8, 2013 at 5:53 PM, Renaud Gaujoux <
renaud at mancala.cbio.uct.ac.za> wrote:

> Ah, I forgot something:
>   * running a full R CMD check --as-cran on Mac?
> :D
>
> On 8 November 2013 18:33, Renaud Gaujoux <renaud at mancala.cbio.uct.ac.za>
> wrote:
> > Nice. Many thanks!
> >
> > ... and along the way we, or at least I, learnt that the hooks
> > .onUnload and .onDetach are actually not called when R quits and that
> > required cleanup procedures must be registered via reg.finalizer to be
> > sure they are called.
> >
> > What is left:
> >   * check if a Mac binary package works fine on machine different than
> > the one it was built on.
> >   * get CRAN building machines geared with Octave so that binary
> > packages are available from CRAN. I will follow up with the CRAN
> > maintainer on this.
> >
> > Bests,
> > Renaud
> >
> >
> >
> > On 8 November 2013 16:23, Dominick Samperi <djsamperi at gmail.com> wrote:
> >> The biocLite windows binary install works (provided the user has Octave
> in
> >> PATH).
> >>
> >> The github (ref='develop') install works under Linux and Mac OS X
> >> (Mavericks).
> >>
> >> And by increasing the "biodiversity" (number of OS's supported) a
> hidden bug
> >> was
> >> uncovered and fixed (after 100 posts!).
> >>
> >> Cheers,
> >> Dominick
> >>
> >>
> >> On Fri, Nov 8, 2013 at 4:42 AM, Renaud Gaujoux
> >> <renaud at mancala.cbio.uct.ac.za> wrote:
> >>>
> >>> True :D
> >>> I thought of trying to get a neat sequence of flags without quote but
> >>> clearly did not work.
> >>> I updated the gh and myCRAN versions: they now contain your solution
> >>> for -Wl and also use mkoctfile rather than octave-config to retrieve
> >>> the include and linker flags.
> >>>
> >>> If possible, can anybody please try the windows binary from myCRAN:
> >>>
> >>> source('http://www.bioconductor.org/biocLite.R')
> >>> biocLite('RcppOctave', siteRepos =
> >>> 'http://web.cbio.uct.ac.za/~renaud/CRAN')
> >>>
> >>> Thank you.
> >>>
> >>> Bests,
> >>> Renaud
> >>>
> >>> On 7 November 2013 17:13, Dominick Samperi <djsamperi at gmail.com>
> wrote:
> >>> > This solution yields:
> >>> >
> >>> > -Wl,-F/Library/Frameworks/R.framework/..,-framework R ...
> >>> >
> >>> > and the linker doesn't know that the last "R" belongs to the
> >>> > -framework option.
> >>> >
> >>> > To fix, simply add the 'g' qualifier to the sed command in
> >>> > configure.ac:
> >>> >
> >>> > R_LDFLAGS=`echo "-Wl,$R_LDFLAGS" | sed 's/ /,/g'`
> >>> >
> >>> >
> >>> > My original solution works because the -Wl,"whatever"
> >>> > option causes mkoctfile to insert the string "whatever"
> >>> > into the linker command line without parsing. If instead
> >>> > mkoctfile used a form of exec(3) that expects tokenized
> >>> > options, the sed solution would be necessary.
> >>> >
> >>> >
> >>> >
> >>> > On Thu, Nov 7, 2013 at 7:20 AM, Renaud Gaujoux
> >>> > <renaud at mancala.cbio.uct.ac.za> wrote:
> >>> >>
> >>> >> I changed configure.ac into:
> >>> >> R_LDFLAGS=`echo "-Wl,$R_LDFLAGS" | sed 's/ /,/'`
> >>> >>
> >>> >> as I read/saw that multiple options must be comma separated.
> >>> >> This will break if the path to the R framework contains spaces
> though.
> >>> >> Can you please try again:
> >>> >>
> >>> >> install_github('RcppOctave', 'renozao', ref = 'develop')
> >>> >>
> >>> >> Thanks.
> >>> >>
> >>> >> Bests,
> >>> >> Renaud
> >>> >>
> >>> >> On 6 November 2013 22:37, Renaud Gaujoux
> >>> >> <renaud at mancala.cbio.uct.ac.za>
> >>> >> wrote:
> >>> >> > Nice. It is indeed a better solution than changing the flags and
> >>> >> > their
> >>> >> > values. The sed command did not work probably because I forgot to
> >>> >> > double
> >>> >> > the
> >>> >> > square brackets, which is necessary to correctly pass configure's
> >>> >> > first
> >>> >> > string evaluation.
> >>> >> > I will incorporate the change tomorrow.
> >>> >> > Thanks!
> >>> >> >
> >>> >> > Bests,
> >>> >> > Renaud
> >>> >> >
> >>> >> > On Wednesday, November 6, 2013, Dominick Samperi wrote:
> >>> >> >>
> >>> >> >> The reason we have been hacking away at '-F' vs '-L' instead of
> >>> >> >> letting 'R CMD config' figure things out is that mkoctfile does
> not
> >>> >> >> know about R frameworks ('-F' is invalid). But mkoctfile does
> have
> >>> >> >> the -Wl,whatever option, which simply passes whatever down to
> >>> >> >> the linker.
> >>> >> >>
> >>> >> >> I have attached a modified configure.ac that uses this option
> >>> >> >> instead of using sed to hack the output of R CMD config
> --ldflags.
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> On Wed, Nov 6, 2013 at 10:25 AM, Dominick Samperi
> >>> >> >> <djsamperi at gmail.com>
> >>> >> >> wrote:
> >>> >> >>
> >>> >> >> Hello Renaud,
> >>> >> >>
> >>> >> >> So, this R technical issue (reg.finalizer) was the crux of the
> >>> >> >> problem
> >>> >> >> all
> >>> >> >> along. Good work!
> >>> >> >>
> >>> >> >> The '..' is still there and the build still fails without my
> hacked
> >>> >> >> Makefile.in, but
> >>> >> >> with this change everything works (no more install memory
> errors).
> >>> >> >>
> >>> >> >> The '..' in the output of R CMD config --ldflags is there for a
> >>> >> >> purpose,
> >>> >> >> because
> >>> >> >> the R framework is under /Library/Frameworks, and not under
> >>> >> >> /Library/Frameworks/R.framework. This is analogous to
> >>> >> >> -L/usr/lib/mylibs -lfoo, where /usr/lib/mylibs may contain a
> >>> >> >> collection
> >>> >> >> of libraries (instead of frameworks), not just libfoo.so.
> >>> >> >> (A Mac OS framework is analogous to an R package.)
> >>> >> >>
> >>> >> >> Make sure '..' is not in the path supplied to '-L' and everything
> >>> >> >> should
> >>> >> >> work.
> >>> >> >>
> >>> >> >> Cheers,
> >>> >> >> Dominick
> >>> >> >>
> >>> >> >>
> >>> >> >> On Wed, Nov 6, 2013 at 8:19 AM, Renaud Gaujoux
> >>> >> >> <renaud at mancala.cbio.uct.ac.za> wrote:
> >>> >> >>
> >>> >> >> Hi,
> >>> >> >>
> >>> >> >> I made some changes available in the develop version, which
> should
> >>> >> >> hopefully solve both issues:
> >>> >> >>   * octave_end is now called on exit (via reg.finalizer: see my
> post
> >>> >> >> on r-devel
> >>> >> >> https://stat.ethz.ch/pipermail/r-devel/2013-November/067912.html
> )
> >>> >> >>   * the extra dots are removed by the sed in configure.ac, but I
> >>> >> >> think
> >>> >> >> we still need to figure out why these dots are there...
> >>> >> >>
> >>> >> >> To test:
> >>> >> >>
> >>> >> >> devtools::install_github('RcppOctave', 'renozao', ref =
> 'develop')
> >>> >> >>
> >>> >> >> Thanks.
> >>> >> >>
> >>> >> >> Bests,
> >>> >> >> Renaud
> >>> >> >>
> >>> >> >> On 6 November 2013 11:15, Renaud Gaujoux
> >>> >> >> <renaud at mancala.cbio.uct.ac.za>
> >>> >> >> wrote:
> >>> >> >> > Couple of questions to understand what is going on:
> >>> >> >> >
> >>> >> >> >   * why does R CMD config --ldflags returns these extra '..' if
> >>> >> >> > they
> >>> >> >> > are
> >>> >> >> > incorrect?
> >>> >> >> >   * why does the compilation work if the path is incorrect to R
> >>> >> >> > library
> >>> >> >> > is
> >>> >> >> > incorrect?
> >>> >> >> >   * why removing the dots should solve the malloc error?
> >>> >> >> >
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > On 5 November 2013 16:38, Dominick Samperi <
> djsamperi at gmail.com>
> >>> >> >> > wrote:
> >>> >> >> >>
> >>> >> >> >> R CMD config --ldflags
> >>> >> >> >> yields
> >>> >> >> >> -F/Library/Frameworks/R.framework/.. -framework R
> >>> >> >> >>
> >>> >> >> >> This needs to be hacked for mkoctfile to:
> >>> >> >> >> -L/Library/Frameworks/R.framework/Libraries -lR
> >>> >> >> >> (no '..')
> >>> >> >> >>
> >>> >> >> >> Applying this to the github source fixes it for
> >>> >> >> >> Mac OS X Mavericks provided the --no-test-load
> >>> >> >> >> and octave_end tricks are used.
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >> On Tue, Nov 5, 2013 at 9:04 AM, Renaud Gaujoux
> >>> >> >> >> <renaud at mancala.cbio.uct.ac.za> wrote:
> >>> >> >> >>>
> >>> >> >> >>> Not sure where the extra '..' would come from.
> >>> >> >> >>> Are you installing the latest version from github?
> >>> >> >> >>>
> >>> >> >> >>> devtools::install_github('RcppOctave', 'renozao')
> >>> >> >> >>>
> >>> >> >> >>>
> >>> >> >> >>>
> >>> >> >> >>> On 2 November 2013 07:00, Dominick Samperi <
> djsamperi at gmail.com>
> >>> >> >> >>> wrote:
> >>> >> >> >>>>
> >>> >> >> >>>> It appears that octave_end is not called at all under Mac
> OS X.
> >>> >> >> >>>> But
> >>> >> >> >>>> it
> >>> >> >> >>>> is also not called under Linux! I inserted Rprintf
> statements
> >>> >> >> >>>> to
> >>> >> >> >>>> check.
> >>> >> >> >>>>
> >>> >> >> >>>> Perhaps the explanation is that failing to call octave_end
> >>> >> >> >>>> under
> >>> >> >> >>>> Linux
> >>> >> >> >>>> (or Windows?) is non-fatal, but this is fatal under Mac OS
> X?
> >>> >> >> >>>> If
> >>> >> >> >>>> this
> >>> >> >> >>>> is so the Mac OS X behavior is less dangerous...
> >>> >> >> >>>>
> >>> >> >> >>>> If I do not use --no-test-load, I get the result in
> >>> >> >> >>>> RcppOctave.log
> >>> >> >> >>>> (attached)
> >>> >
> >>> >
> >>
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcppoctave-user/attachments/20131108/96587398/attachment-0001.html>
-------------- next part --------------
* using log directory ?/Users/dsamperi/Downloads/RcppOctave.Rcheck?
* using R version 3.0.2 (2013-09-25)
* using platform: x86_64-apple-darwin10.8.0 (64-bit)
* using session charset: UTF-8
* checking for file ?RcppOctave/DESCRIPTION? ... OK
* checking extension type ... Package
* this is package ?RcppOctave? version ?0.13.3?
* checking CRAN incoming feasibility ... OK
Maintainer: ?Renaud Gaujoux <renaud at tx.technion.ac.il>?
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Packages suggested but not available for checking: ?knitr? ?bibtex?
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... NOTE
Found the following hidden files and directories:
  .gitignore
  .project
  .settings
These were most likely included in error. See section ?Package
structure? in the ?Writing R Extensions? manual.

CRAN-pack knows about all of these
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ?RcppOctave? can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... NOTE
Non-standard files found at top level:
  ?config.log? ?config.status? ?man-roxygen? ?pkg.Rproj? ?staticdocs?
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... NOTE
Package has both ?src/Makevars.in? and ?src/Makevars?.
Installation with --no-configure' is unlikely to work.  If you intended
?src/Makevars? to be used on Windows, rename it to ?src/Makevars.win?
otherwise remove it.  If ?configure? created ?src/Makevars?, you need a
?cleanup? script.
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... OK
* checking sizes of PDF files under ?inst/doc? ... OK
* checking installed files from ?inst/doc? ... OK
* checking files in ?vignettes? ... OK
* checking examples ... OK
* checking for unstated dependencies in tests ... OK
* checking tests ...
  Running ?doRUnit.R?
 OK
* checking PDF version of manual ... OK

NOTE: There were 4 notes.
See
  ?/Users/dsamperi/Downloads/RcppOctave.Rcheck/00check.log?
for details.



More information about the Rcppoctave-user mailing list