Segmentation Fault in Snow Leopard

Oh. Just went back and read the rest of the posts.

You may want to re-install mysql. If you installed xcode, then
installed mysql, then installed xcode again, the mysql system
libraries may have been crushed in the last xcode install. Just a
guess.

Man, what a nightmare this is turning into. So many hours down the
drain. I thought I had everything figured out finally and tried to run
my app, but got this.

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from:
/Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle
Expected in: flat namespace

dyld: Symbol not found: _mysql_init
Referenced from:
/Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle
Expected in: flat namespace

Trace/BPT trap

sax wrote:

Oh. Just went back and read the rest of the posts.

You may want to re-install mysql. If you installed xcode, then
installed mysql, then installed xcode again, the mysql system
libraries may have been crushed in the last xcode install. Just a
guess.

Think of it as a learning experience :slight_smile: Some people pay for this kind
of training.

What kind of computer is this? If you run this in a terminal window:

ruby -e “p [‘foo’].pack(‘p’).size”

Do you get 4 or 8? Ruby should be running in 64 bit mode (thus giving
you an 8).

Also, how did you install mysql? Did you install it using port or
fink? Did you install from a package?

On Fri, Nov 6, 2009 at 11:17 AM, Eric Ee
[email protected]wrote:

did everything in the shell
I’m just lost now going in circles. Either of you guys have 5 minutes

ruby -e “p [‘foo’].pack(‘p’).size”

Do you get 4 or 8? Ruby should be running in 64 bit mode (thus giving
you an 8).

Also, how did you install mysql? Did you install it using port or
fink? Did you install from a package?

Eric, the Xcode install doesn’t touch the MySQL installation. In any
case,
lets do the following:

  1. update your .profile to have the following:

    export PATH=/opt/local/bin:/opt/local/sbin::${PATH}
    export
    DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:${DYLD_FALLBACK_LIBRARY_PATH}

  2. install and configure MacPorts

    a) Snow
    Leopardhttp://distfiles.macports.org/MacPorts/MacPorts-1.8.1-10.6-SnowLeopard.dmg

    b) sudo port -v selfupdate

  3. install the applications

    sudo port install mysql5-server

Note: Please following the onscreen instructions for setting up MySQL.

sudo port install sqlite3

  1. install the supporting gems

sudo gem install mysql
sudo gem install sqlite3-ruby

  1. test it and let me know

-Conrad

I get an 8. I seem to be going in circles unfortunately.

If I run this command…

sudo env ARCHFLAGS=“-arch x86_64” gem install mysql –
–with-mysql-config=/usr/local/mysql/bin/mysql_config

Things get messed and I get segmentation faults on my rake commands and
Illegal instruction on commands like gem -v or ruby -v.

If I go back and run export path commands

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

this gets rid of the illegal instruction errors.

As far as mysql goes, first time around I followed these instructions

did everything in the shell

2nd time around after talking to you, I followed this instructions and
did it through a package

However, I’m missing a step in the sequence of things I need to do to
get this right and it either results in a segmentation fault or that
last error I posted “lazy symbol binding failed.”

I’m just lost now going in circles. Either of you guys have 5 minutes
for an IM convo today? Just run through the commands real quick see if
we can get it going?

sax wrote:

Think of it as a learning experience :slight_smile: Some people pay for this kind
of training.

What kind of computer is this? If you run this in a terminal window:

ruby -e “p [‘foo’].pack(‘p’).size”

Do you get 4 or 8? Ruby should be running in 64 bit mode (thus giving
you an 8).

Also, how did you install mysql? Did you install it using port or
fink? Did you install from a package?

Eric Ee wrote:

I just upgraded to snow leopard and I’m trying to get the 64 bit version
of mysql and ruby going. I ran through the steps here…

Dan Benjamin

mysql is running properly and when I run
which ruby I get…
/usr/local/bin/ruby
[…]

Why are you building your own Ruby? Apple’s Ruby (in /usr/bin/ruby)
will serve you just fine. Honestly, I think the Hivelogic tutorials are
a little silly insofar as they encourage people to build a redundant
copy of Ruby. That was necessary in Tiger, but not since.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Hey Conrad,

Macports did the trick.

It’s working now.

Now if only I knew how to get rid of all the redundant and useless files
I just put on my computer I’d be in perfect shape.

However, thanks for walking through this ordeal with me. I’m never
upgrading my computer again…ha.

Cheers,

Eric

Conrad T. wrote:

On Fri, Nov 6, 2009 at 11:17 AM, Eric Ee
[email protected]wrote:

did everything in the shell
I’m just lost now going in circles. Either of you guys have 5 minutes

ruby -e “p [‘foo’].pack(‘p’).size”

Do you get 4 or 8? Ruby should be running in 64 bit mode (thus giving
you an 8).

Also, how did you install mysql? Did you install it using port or
fink? Did you install from a package?

Eric, the Xcode install doesn’t touch the MySQL installation. In any
case,
lets do the following:

  1. update your .profile to have the following:

    export PATH=/opt/local/bin:/opt/local/sbin::${PATH}
    export
    DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:${DYLD_FALLBACK_LIBRARY_PATH}

  2. install and configure MacPorts

    a) Snow
    Leopardhttp://distfiles.macports.org/MacPorts/MacPorts-1.8.1-10.6-SnowLeopard.dmg

    b) sudo port -v selfupdate

  3. install the applications

    sudo port install mysql5-server

Note: Please following the onscreen instructions for setting up MySQL.

sudo port install sqlite3

  1. install the supporting gems

sudo gem install mysql
sudo gem install sqlite3-ruby

  1. test it and let me know

-Conrad