seg fault when building ruby 1.8.6-p111 on MacOS X 10.5

Discussion in 'Ruby' started by lists@humanesoftware.com, Nov 1, 2007.

  1. Guest

    I'm getting a segmentation fault when building ruby 1.8.6-p111 (from
    source and by itself, not as part of a larger distribution). I'm
    running on a clean version of MacOS X 10.5 and a new build of readline
    5.2 installed in /usr/local.

    My configure line is: ./configure --prefix=/usr/local/ruby --with-
    readline-dir=/usr/local/readline --enable-pthread

    There weren't any issues that I could see during the configure process
    and the make process looked fine right up until the segmentation
    fault. Here's where it ended:

    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c time.c
    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c util.c
    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c variable.c
    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c version.c
    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmyext.c
    ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o dln.o
    enum.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o
    numeric.o object.o pack.o parse.o process.o prec.o random.o range.o
    re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o
    util.o variable.o version.o dmyext.o
    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c main.c
    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmydln.c
    gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -L. main.o dmydln.o
    libruby-static.a -lpthread -ldl -lobjc -o miniruby
    ruby: [BUG] Segmentation fault
    ruby 1.8.6 (2007-09-24) [i686-darwin9.0.0]

    make: *** [.rbconfig.time] Abort trap

    Has anyone else run into this and maybe found a solution?

    Thanks!

    Mark
     
    , Nov 1, 2007
    #1
    1. Advertising

  2. Guest

    Interestingly, I'm getting the same problem when building ruby 1.8.6-
    p110 and ruby 1.8.6-p36... the latter being the same version that is
    include in the shipping OS!

    I've found many references to this issue, but never any explanation
    for what causes it, let alone a solution to fixing it.

    Mark

    On Nov 1, 2007, at 2:43 PM, Mark Slater wrote:

    > I'm getting a segmentation fault when building ruby 1.8.6-p111 (from
    > source and by itself, not as part of a larger distribution). I'm
    > running on a clean version of MacOS X 10.5 and a new build of
    > readline 5.2 installed in /usr/local.
    >
    > My configure line is: ./configure --prefix=/usr/local/ruby --with-
    > readline-dir=/usr/local/readline --enable-pthread
    >
    > There weren't any issues that I could see during the configure
    > process and the make process looked fine right up until the
    > segmentation fault. Here's where it ended:
    >
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c time.c
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c util.c
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c variable.c
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c version.c
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmyext.c
    > ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o
    > dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o
    > marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o
    > random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o
    > string.o struct.o time.o util.o variable.o version.o dmyext.o
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c main.c
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmydln.c
    > gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -L. main.o dmydln.o
    > libruby-static.a -lpthread -ldl -lobjc -o miniruby
    > ruby: [BUG] Segmentation fault
    > ruby 1.8.6 (2007-09-24) [i686-darwin9.0.0]
    >
    > make: *** [.rbconfig.time] Abort trap
    >
    > Has anyone else run into this and maybe found a solution?
    >
    > Thanks!
    >
    > Mark
    >
     
    , Nov 1, 2007
    #2
    1. Advertising

  3. Guest

    So I was able to get ruby to compile by removing the --enable-pthread
    option. I'm not sure why that was needed though, since I've always
    used it before. I did see a reference to ruby not liking pthread
    enabled if tcl/tk's pthread was disabled, but that there was a warning
    mechanism in place to handle that.

    I'm going to try building my own version of tcl/tk and seeing if I can
    get things to be happy again with pthread, but if anyone knows a
    different way of fixing things up, I'd really appreciate it.

    Mark

    On Nov 1, 2007, at 3:45 PM, Mark Slater wrote:

    > Interestingly, I'm getting the same problem when building ruby 1.8.6-
    > p110 and ruby 1.8.6-p36... the latter being the same version that is
    > include in the shipping OS!
    >
    > I've found many references to this issue, but never any explanation
    > for what causes it, let alone a solution to fixing it.
    >
    > Mark
    >
    > On Nov 1, 2007, at 2:43 PM, Mark Slater wrote:
    >
    >> I'm getting a segmentation fault when building ruby 1.8.6-p111
    >> (from source and by itself, not as part of a larger distribution).
    >> I'm running on a clean version of MacOS X 10.5 and a new build of
    >> readline 5.2 installed in /usr/local.
    >>
    >> My configure line is: ./configure --prefix=/usr/local/ruby --with-
    >> readline-dir=/usr/local/readline --enable-pthread
    >>
    >> There weren't any issues that I could see during the configure
    >> process and the make process looked fine right up until the
    >> segmentation fault. Here's where it ended:
    >>
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c time.c
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c util.c
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c variable.c
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c version.c
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmyext.c
    >> ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o
    >> dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o
    >> marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o
    >> random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o
    >> string.o struct.o time.o util.o variable.o version.o dmyext.o
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c main.c
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmydln.c
    >> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -L. main.o dmydln.o
    >> libruby-static.a -lpthread -ldl -lobjc -o miniruby
    >> ruby: [BUG] Segmentation fault
    >> ruby 1.8.6 (2007-09-24) [i686-darwin9.0.0]
    >>
    >> make: *** [.rbconfig.time] Abort trap
    >>
    >> Has anyone else run into this and maybe found a solution?
    >>
    >> Thanks!
    >>
    >> Mark
    >>

    >
    >
     
    , Nov 2, 2007
    #3
  4. Guest

    What type of performance does pthread offer when it is enabled?

    -Ron

    On Nov 1, 2007, at 8:46 PM, Mark Slater wrote:

    > So I was able to get ruby to compile by removing the --enable-
    > pthread option. I'm not sure why that was needed though, since I've
    > always used it before. I did see a reference to ruby not liking
    > pthread enabled if tcl/tk's pthread was disabled, but that there was
    > a warning mechanism in place to handle that.
    >
    > I'm going to try building my own version of tcl/tk and seeing if I
    > can get things to be happy again with pthread, but if anyone knows a
    > different way of fixing things up, I'd really appreciate it.
    >
    > Mark
    >
    > On Nov 1, 2007, at 3:45 PM, Mark Slater wrote:
    >
    >> Interestingly, I'm getting the same problem when building ruby
    >> 1.8.6-p110 and ruby 1.8.6-p36... the latter being the same version
    >> that is include in the shipping OS!
    >>
    >> I've found many references to this issue, but never any explanation
    >> for what causes it, let alone a solution to fixing it.
    >>
    >> Mark
    >>
    >> On Nov 1, 2007, at 2:43 PM, Mark Slater wrote:
    >>
    >>> I'm getting a segmentation fault when building ruby 1.8.6-p111
    >>> (from source and by itself, not as part of a larger distribution).
    >>> I'm running on a clean version of MacOS X 10.5 and a new build of
    >>> readline 5.2 installed in /usr/local.
    >>>
    >>> My configure line is: ./configure --prefix=/usr/local/ruby --with-
    >>> readline-dir=/usr/local/readline --enable-pthread
    >>>
    >>> There weren't any issues that I could see during the configure
    >>> process and the make process looked fine right up until the
    >>> segmentation fault. Here's where it ended:
    >>>
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c time.c
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c util.c
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c variable.c
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c version.c
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmyext.c
    >>> ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o
    >>> dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o
    >>> marshal.o math.o numeric.o object.o pack.o parse.o process.o
    >>> prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o
    >>> st.o string.o struct.o time.o util.o variable.o version.o dmyext.o
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c main.c
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmydln.c
    >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -L. main.o
    >>> dmydln.o libruby-static.a -lpthread -ldl -lobjc -o miniruby
    >>> ruby: [BUG] Segmentation fault
    >>> ruby 1.8.6 (2007-09-24) [i686-darwin9.0.0]
    >>>
    >>> make: *** [.rbconfig.time] Abort trap
    >>>
    >>> Has anyone else run into this and maybe found a solution?
    >>>
    >>> Thanks!
    >>>
    >>> Mark
    >>>

    >>
    >>

    >
    >
     
    , Nov 2, 2007
    #4
  5. Guest

    Laurent has already explained why this is and provides patches. Which
    already have been committed to macports.

    FMI see ...

    http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/12895

    On 11/1/07, Ronald Valente <> wrote:
    > What type of performance does pthread offer when it is enabled?
    >
    > -Ron
    >
    > On Nov 1, 2007, at 8:46 PM, Mark Slater wrote:
    >
    > > So I was able to get ruby to compile by removing the --enable-
    > > pthread option. I'm not sure why that was needed though, since I've
    > > always used it before. I did see a reference to ruby not liking
    > > pthread enabled if tcl/tk's pthread was disabled, but that there was
    > > a warning mechanism in place to handle that.
    > >
    > > I'm going to try building my own version of tcl/tk and seeing if I
    > > can get things to be happy again with pthread, but if anyone knows a
    > > different way of fixing things up, I'd really appreciate it.
    > >
    > > Mark
    > >
    > > On Nov 1, 2007, at 3:45 PM, Mark Slater wrote:
    > >
    > >> Interestingly, I'm getting the same problem when building ruby
    > >> 1.8.6-p110 and ruby 1.8.6-p36... the latter being the same version
    > >> that is include in the shipping OS!
    > >>
    > >> I've found many references to this issue, but never any explanation
    > >> for what causes it, let alone a solution to fixing it.
    > >>
    > >> Mark
    > >>
    > >> On Nov 1, 2007, at 2:43 PM, Mark Slater wrote:
    > >>
    > >>> I'm getting a segmentation fault when building ruby 1.8.6-p111
    > >>> (from source and by itself, not as part of a larger distribution).
    > >>> I'm running on a clean version of MacOS X 10.5 and a new build of
    > >>> readline 5.2 installed in /usr/local.
    > >>>
    > >>> My configure line is: ./configure --prefix=/usr/local/ruby --with-
    > >>> readline-dir=/usr/local/readline --enable-pthread
    > >>>
    > >>> There weren't any issues that I could see during the configure
    > >>> process and the make process looked fine right up until the
    > >>> segmentation fault. Here's where it ended:
    > >>>
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c time.c
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c util.c
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c variable.c
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c version.c
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmyext.c
    > >>> ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o
    > >>> dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o
    > >>> marshal.o math.o numeric.o object.o pack.o parse.o process.o
    > >>> prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o
    > >>> st.o string.o struct.o time.o util.o variable.o version.o dmyext.o
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c main.c
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmydln.c
    > >>> gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -L. main.o
    > >>> dmydln.o libruby-static.a -lpthread -ldl -lobjc -o miniruby
    > >>> ruby: [BUG] Segmentation fault
    > >>> ruby 1.8.6 (2007-09-24) [i686-darwin9.0.0]
    > >>>
    > >>> make: *** [.rbconfig.time] Abort trap
    > >>>
    > >>> Has anyone else run into this and maybe found a solution?
    > >>>
    > >>> Thanks!
    > >>>
    > >>> Mark
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
    >



    --
    Michael Steinfeld
    Linux Admin/Developer
    AIM: mikesteinfeld
    GTALK:
     
    , Nov 2, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    11
    Views:
    320
  2. Cynthia Jeness
    Replies:
    3
    Views:
    242
    Cynthia Jeness
    Dec 14, 2006
  3. Urabe Shyouhei
    Replies:
    2
    Views:
    152
    Michal Suchanek
    Nov 8, 2007
  4. snowcrash+rubytalk
    Replies:
    10
    Views:
    166
    Roger Pack
    Dec 6, 2007
  5. Greg Donald
    Replies:
    0
    Views:
    122
    Greg Donald
    Jan 23, 2008
Loading...

Share This Page