[Rd] malloc error in tab-completion: OS X

2012-10-07 Thread R. Michael Weylandt
I've just built R-devel (r60889) from source on my Mac OS X 10.6.8
using gcc from Xcode and gfortran from Simon. I didn't use all the
recommended configuration flags only

./configure && make

Still, I seem to pass "make check" and
"make test-Segfault" in the tests directory with no problem, but the
following leads
to a persistent error + instant abort.

1) Start R
2) Type "tools::"
3) Tab to attempt to auto-complete

resulting in some variation on

mweylandt-laptop:~ michaelweylandt$ rDEVEL/bin/R --vanilla -q
> tools::R(44436) malloc: *** error for object 0x1006d8700: incorrect checksum 
> for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Abort trap

at which point hitting  drops me back into bash. This seems to
only occur with tools and no other packages (that I've found). It also
occurs whether tools has been library()'d or not, but sometimes it
takes two tabbings.

My compiler info follows

mweylandt-laptop:~ michaelweylandt$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.

mweylandt-laptop:~ michaelweylandt$ gfortran --version
GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.

I do think that it's only a problem with my local build, as I can't
replicate with Simon's nightly builds (http://r.research.att.com/),
which are at r60887 currently. Is there anything else I should check
with my setup? I don't see any advice on this particular issue in the
R installation manual, but I easily could have overlooked it.

Thanks,
Michael

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


Re: [Rd] malloc error in tab-completion: OS X

2012-10-07 Thread Berend Hasselman

On 07-10-2012, at 17:34, R. Michael Weylandt wrote:

> I've just built R-devel (r60889) from source on my Mac OS X 10.6.8
> using gcc from Xcode and gfortran from Simon. I didn't use all the
> recommended configuration flags only
> 
> .
> My compiler info follows
> 
> mweylandt-laptop:~ michaelweylandt$ gcc --version
> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
> Copyright (C) 2007 Free Software Foundation, Inc.
> 
> mweylandt-laptop:~ michaelweylandt$ gfortran --version
> GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5664)
> Copyright (C) 2007 Free Software Foundation, Inc.
> 
> I do think that it's only a problem with my local build, as I can't
> replicate with Simon's nightly builds (http://r.research.att.com/),
> which are at r60887 currently. Is there anything else I should check
> with my setup? I don't see any advice on this particular issue in the
> R installation manual, but I easily could have overlooked it.

Just a thought.

According to http://r.research.att.com/tools/ shouldn't you be using gcc 5664 
on Snow Leopard.
If I read the tools page correctly you seem to be using a Lion version of gcc.
On my 10.6.8 I have

[.../~]: gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.

[.../~]: gfortran --version
GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.


Berend

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


Re: [Rd] malloc error in tab-completion: OS X

2012-10-07 Thread Prof Brian Ripley

On 07/10/2012 18:11, Berend Hasselman wrote:


On 07-10-2012, at 17:34, R. Michael Weylandt wrote:


I've just built R-devel (r60889) from source on my Mac OS X 10.6.8
using gcc from Xcode and gfortran from Simon. I didn't use all the
recommended configuration flags only

.
My compiler info follows

mweylandt-laptop:~ michaelweylandt$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.

mweylandt-laptop:~ michaelweylandt$ gfortran --version
GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.

I do think that it's only a problem with my local build, as I can't
replicate with Simon's nightly builds (http://r.research.att.com/),
which are at r60887 currently. Is there anything else I should check
with my setup? I don't see any advice on this particular issue in the
R installation manual, but I easily could have overlooked it.


Just a thought.

According to http://r.research.att.com/tools/ shouldn't you be using gcc 5664 
on Snow Leopard.
If I read the tools page correctly you seem to be using a Lion version of gcc.
On my 10.6.8 I have

[.../~]: gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.


His and yours both say darwin10.  The Lion version says darwin11.  So it 
is claiming to be an OS 10.6.x aka Darwin 10.x compiler.





[.../~]: gfortran --version
GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.


Berend

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




--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


Re: [Rd] malloc error in tab-completion: OS X

2012-10-07 Thread Prof Brian Ripley
I would check the version of libreadline you compiled against.  Tab 
completion involves that library.


It works correctly for all my local builds, and nothing in that area in 
the R sources has changed for a long time.  I believe I am using 
http://r.research.att.com/libs/readline-5.2-12-darwin8-bin4.tar.gz .

And this is on Lion whereas Simon is building on Leopard (AFAIK).

On 07/10/2012 16:34, R. Michael Weylandt wrote:

I've just built R-devel (r60889) from source on my Mac OS X 10.6.8
using gcc from Xcode and gfortran from Simon. I didn't use all the
recommended configuration flags only

./configure && make

Still, I seem to pass "make check" and
"make test-Segfault" in the tests directory with no problem, but the
following leads
to a persistent error + instant abort.

1) Start R
2) Type "tools::"
3) Tab to attempt to auto-complete

resulting in some variation on

mweylandt-laptop:~ michaelweylandt$ rDEVEL/bin/R --vanilla -q

tools::R(44436) malloc: *** error for object 0x1006d8700: incorrect checksum 
for freed object - object was probably modified after being freed.

*** set a breakpoint in malloc_error_break to debug
Abort trap

at which point hitting  drops me back into bash. This seems to
only occur with tools and no other packages (that I've found). It also
occurs whether tools has been library()'d or not, but sometimes it
takes two tabbings.

My compiler info follows

mweylandt-laptop:~ michaelweylandt$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.

mweylandt-laptop:~ michaelweylandt$ gfortran --version
GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.

I do think that it's only a problem with my local build, as I can't
replicate with Simon's nightly builds (http://r.research.att.com/),
which are at r60887 currently. Is there anything else I should check
with my setup? I don't see any advice on this particular issue in the
R installation manual, but I easily could have overlooked it.

Thanks,
Michael

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




--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


Re: [Rd] How to build a list with missing values? What is missing, anyway?

2012-10-07 Thread Thomas Lumley
On Fri, Oct 5, 2012 at 4:07 PM, Bert Gunter  wrote:
> On Thu, Oct 4, 2012 at 6:31 PM, Peter Meilstrup

>> explain some things, such as under what circumstances one would get a
>> "`...` used in incorrect context" error.
>
> How could it possibly know that?
>
> -- Bert

By looking at the code that throws the error.

The code is in src/main/eval.c, and the error is thrown in several
places when the symbol ... appears in a call being evaluated, and the
value of the symbol is neither the special DOTSXP type nor NULL.  That
is, if you use ... in code and there isn't a ... formal argument in
scope.

   -thomas


-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland

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


Re: [Rd] malloc error in tab-completion: OS X

2012-10-07 Thread peter dalgaard

On Oct 7, 2012, at 21:00 , Prof Brian Ripley wrote:

> I would check the version of libreadline you compiled against.  Tab 
> completion involves that library.
> 
> It works correctly for all my local builds, and nothing in that area in the R 
> sources has changed for a long time.  I believe I am using 
> http://r.research.att.com/libs/readline-5.2-12-darwin8-bin4.tar.gz .
> And this is on Lion whereas Simon is building on Leopard (AFAIK).

And Peter is building on Snow Leopard with AFAICT same libreadline:

$ ls /usr/local/lib/libreadline*
/usr/local/lib/libreadline.5.2.dylib/usr/local/lib/libreadline.a
/usr/local/lib/libreadline.5.dylib  /usr/local/lib/libreadline.dylib

and has no issues with tools::

BTW: readline is configurable. There wouldn't happen to be a rogue .inputrc 
around by any chance?


> 
> On 07/10/2012 16:34, R. Michael Weylandt wrote:
>> I've just built R-devel (r60889) from source on my Mac OS X 10.6.8
>> using gcc from Xcode and gfortran from Simon. I didn't use all the
>> recommended configuration flags only
>> 
>> ./configure && make
>> 
>> Still, I seem to pass "make check" and
>> "make test-Segfault" in the tests directory with no problem, but the
>> following leads
>> to a persistent error + instant abort.
>> 
>> 1) Start R
>> 2) Type "tools::"
>> 3) Tab to attempt to auto-complete
>> 
>> resulting in some variation on
>> 
>> mweylandt-laptop:~ michaelweylandt$ rDEVEL/bin/R --vanilla -q
>>> tools::R(44436) malloc: *** error for object 0x1006d8700: incorrect 
>>> checksum for freed object - object was probably modified after being freed.
>> *** set a breakpoint in malloc_error_break to debug
>> Abort trap
>> 
>> at which point hitting  drops me back into bash. This seems to
>> only occur with tools and no other packages (that I've found). It also
>> occurs whether tools has been library()'d or not, but sometimes it
>> takes two tabbings.
>> 
>> My compiler info follows
>> 
>> mweylandt-laptop:~ michaelweylandt$ gcc --version
>> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
>> Copyright (C) 2007 Free Software Foundation, Inc.
>> 
>> mweylandt-laptop:~ michaelweylandt$ gfortran --version
>> GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5664)
>> Copyright (C) 2007 Free Software Foundation, Inc.
>> 
>> I do think that it's only a problem with my local build, as I can't
>> replicate with Simon's nightly builds (http://r.research.att.com/),
>> which are at r60887 currently. Is there anything else I should check
>> with my setup? I don't see any advice on this particular issue in the
>> R installation manual, but I easily could have overlooked it.
>> 
>> Thanks,
>> Michael
>> 
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>> 
> 
> 
> -- 
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

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