Segmentation Fault in Snow Leopard

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

http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/

did everything in the shell

2nd time around after talking to you, I followed this instructions and

did it through a package

http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard

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, 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}

  1. install and configure MacPorts

a) Snow Leopard

b) sudo port -v selfupdate

  1. 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

  2. test it and let me know

-Conrad