Forum: Ruby newbie ruby installation malloc issue

Posted by mark e. (mark_e)
on 2011-09-09 19:26
hi all -

i was able to build my own 1.9.1 with no problems (except it does not
support rails)

$ ruby -v ;
ruby 1.9.1p429 (2010-07-02 revision 28523) [i686-linux]


but i tried to build 1.9.2 and during make, i got the error:

*** glibc detected *** malloc(): memory corruption: 0x09c3f2b8 ***
make: *** [.rbconfig.time] Aborted

(more detail below)

suggestions? thanks!


$ uname -a ;
Linux edwardsmark.com 2.6.9-89.35.1.ELsmp #1 SMP Tue Jan 4 22:30:58 EST
2011 i686 i686 i386 GNU/Linux

$ ldd  --version
ldd (GNU libc) 2.3.4

$ rails -v ;

    Rails 3 doesn't officially support Ruby 1.9.1 since recent stable
    releases have segfaulted the test suite. Please upgrade to Ruby
1.9.2.

    You're running
      ruby 1.9.1p429 (2010-07-02 revision 28523) [i686-linux]

Rails 3.1.0



==error:

$ make ;
blah
blah
blah
gcc -O3 -ggdb -Wall -Wno-unused-parameter -Wno-parentheses
-Wpointer-arith -Wwrite-strings -Wno-long-long -I.
-I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT -o strlcat.o -c
./missing/strlcat.c

gcc -O3 -ggdb -Wall -Wno-unused-parameter -Wno-parentheses
-Wpointer-arith -Wwrite-strings -Wno-long-long -I.
-I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT -o dmyext.o -c
dmyext.c

gcc -O3 -ggdb -Wall -Wno-unused-parameter -Wno-parentheses
-Wpointer-arith -Wwrite-strings -Wno-long-long -L. -rdynamic
-Wl,-export-dynamic main.o dmydln.o dmyencoding.o dmyversion.o
miniprelude.o array.o bign um.o class.o compar.o complex.o dir.o
dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o g c.o
hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o
parse.o process.o random.o range .o rational.o re.o regcomp.o regenc.o
regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o s
printf.o st.o strftime.o string.o struct.o time.o transcode.o util.o
variable.o compile.o debug.o iseq.o v m.o vm_dump.o thread.o cont.o
ascii.o us_ascii.o unicode.o utf_8.o newline.o strlcpy.o strlcat.o
dmyext.o -lpthread -lrt -ldl -lcrypt -lm -o miniruby
*** glibc detected *** malloc(): memory corruption: 0x09c3f2b8 ***
make: *** [.rbconfig.time] Aborted
Posted by spiralofhope (Guest)
on 2011-09-09 22:04
(Received via mailing list)
On Sat, 10 Sep 2011 02:26:58 +0900
"mark e." <mark_f_edwards@yahoo.com> wrote:

> i was able to build my own 1.9.1 with no problems (except it does not
> support rails)
>
> but i tried to build 1.9.2 and during make, i got the error:
>
> *** glibc detected *** malloc(): memory corruption: 0x09c3f2b8 ***
> make: *** [.rbconfig.time] Aborted

For what it's worth, I also had issues with compiling on my own (for
other reasons) and ended up switching to RVM, with great success:

http://beginrescueend.com/
Posted by mark e. (mark_e)
on 2011-09-10 05:14
thank you spiralofhope -

i looked into rvm, but it required a newer version of BASH and git 
(whatever that is)

it seemed easier just to build on my own.   but i may have to revisit 
rvm.
Posted by mark e. (mark_e)
on 2011-09-10 07:14
what seems so strange to me is that 1.9.1 can build successfully, but 
1.9.2 cannot!

it also seems strange that rails will work with 1.8.6, 1.9.2, but not 
1.9.1 !
Posted by Dan Nachbar (Guest)
on 2011-09-10 13:03
(Received via mailing list)
On Sep 9, 2011, at 11:14 PM, mark e. wrote:

> ...
> i looked into rvm, but it required a newer version of BASH and git
> (whatever that is)
>
> it seemed easier just to build on my own.   but i may have to revisit
> rvm.
...

I strongly urge you to install rvm.
It is an incredibly useful tool.
Well worth the trouble to set up if you plan
to write anything beyond "Hello World!" or
similarly simple programs in ruby.

Dan Nachbar
Posted by mark e. (mark_e)
on 2011-09-11 07:48
it appears in order to install rvm i have to have "git" working.

sadly, it appears to build "git" is more difficult than building ruby 
(unless anybody has a better idea)


at this rate, i may have to stick with ruby-1.8.6
Posted by Josh Cheek (josh-cheek)
on 2011-09-11 08:01
(Received via mailing list)
On Sun, Sep 11, 2011 at 12:48 AM, mark e. <mark_f_edwards@yahoo.com> 
wrote:

> it appears in order to install rvm i have to have "git" working.
>
> sadly, it appears to build "git" is more difficult than building ruby
> (unless anybody has a better idea)
>
>
>
IDK, I was able to download a binary of git (I'm on OSX), so super easy.

And I never had much trouble building Ruby either. Had to look up some 
flags
and do a bit of experimenting, but I didn't run into any curve balls 
(maybe
my intuitions about which flags I needed for my use case were 
sufficient) I
really didn't feel like there were any curve balls.



> at this rate, i may have to stick with ruby-1.8.6
>
>
Ouch! Definitely try to get git installed, 1.8.6 is a deficit (though I
guess it depends why you're needing Ruby).
Posted by mark e. (mark_e)
on 2011-09-11 21:42
thanks josh.

i hope to abandon both perl and php in favor of ruby, but this is quite 
a stumbling block.

i am currently hosting with a VPS.  i am starting to wonder if maybe my 
gcc or my glibc is really out-of-date.

it does not help when the git download page seems to be permanently on 
vacation:

http://kernel.org/pub/software/scm/git/

otherwise i might get lucky and be able to snag a git-binary.

i still am very surprised that rails wont run on 1.9.1, and something 
changed so drastically in 1.9.2 to create build issues!
Posted by Josh Cheek (josh-cheek)
on 2011-09-12 00:16
(Received via mailing list)
On Sun, Sep 11, 2011 at 2:42 PM, mark e. <mark_f_edwards@yahoo.com> 
wrote:

>
> http://kernel.org/pub/software/scm/git/
>
>
Yeah, that's weird, such an important resource should be made available.
There's a git irc channel on freenode where people might be able to 
offer
you more informed help than I can.



I've not looked into it, but there's another tool for managing your Ruby
versions which might not depend on git, called rbenv (
https://github.com/sstephenson/rbenv)  glancing at the readme, it looks 
like
you can build yourself, or use ruby-build to install Rubies (
https://github.com/sstephenson/ruby-build).

The instructions there have you using "git clone", but you can get 
around
that by downloading the tarball of it from the github page and then pick 
up
after that step. It might still use git after that point, I've done less
than 1 minute worth of research, so I don't know. But it might be worth
looking into.
Posted by Hassan Schroeder (Guest)
on 2011-09-12 00:31
(Received via mailing list)
On Sun, Sep 11, 2011 at 12:42 PM, mark e. <mark_f_edwards@yahoo.com> 
wrote:

> it does not help when the git download page seems to be permanently on
> vacation:
>
> http://kernel.org/pub/software/scm/git/

The first hit from googling `git download` is 
<http://git-scm.com/download>;
try that.

You will definitely want/need to have git installed while you're working
with Ruby and Rails.
Posted by Josh Cheek (josh-cheek)
on 2011-09-12 00:45
(Received via mailing list)
On Sun, Sep 11, 2011 at 5:28 PM, Hassan Schroeder <
hassan.schroeder@gmail.com> wrote:

> try that.
>
> You will definitely want/need to have git installed while you're working
> with Ruby and Rails.
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
>
For Linux, that page links to the page on Kernel.org that is "Down for
maintenance"
Posted by Hassan Schroeder (Guest)
on 2011-09-12 03:39
(Received via mailing list)
On Sun, Sep 11, 2011 at 3:44 PM, Josh Cheek <josh.cheek@gmail.com> 
wrote:

> For Linux, that page links to the page on Kernel.org that is "Down for
> maintenance"

Ah, indeed, you're right. Well, time to bite the bullet and install from
source.

Personally, that's door number 1 for me anyway :-)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.