From: Steve Dame Date: 2008-01-14T13:20:47+09:00 Subject: Re: MySQL gem on 64-bit Solaris won't compile Hi, I'm new to this group, but is it possible to put some sort of header on the subject line, etc. that denotes this as a [ruby-talk] group, so that I can set my e-mail up to automatically file these discussions under a Ruby folder? It is difficult to sort out these e-mails from SPAM. Or if someone else has a method of doing this on Thunderbird, that would be much appreciated. Thanks, Andrew Ohnstad wrote: > Hi all, > > Solaris 10 x86 on a 64-bit Xenon server... Can anyone guess where this > is going? > > root@hostname:~# gem install mysql -- > --with-mysql-config=/usr/local/mysql/bin/mysql_config > Building native extensions. This could take a while... > ERROR: Error installing mysql: > ERROR: Failed to build gem native extension. > > /usr/local/bin/ruby extconf.rb install mysql -- > --with-mysql-config=/usr/local/mysql/bin/mysql_config > checking for mysql_ssl_set()... no > checking for mysql.h... yes > creating Makefile > > make > gcc -I. -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. > -DHAVE_MYSQL_H -I/usr/local/include -I/usr/X11R6/include > -I/usr/local/ssl/include -I/usr/local/include/ncurses > -I/usr/local/BerkeleyDB.4.2/include -I/usr/openwin/include > -I/usr/local/mysql/include -m64 -mtune=k8 -fPIC -O2 -fpic -c mysql.c > > gcc -shared -fPIC -L/usr/local/lib -R/usr/local/lib -R/usr/lib > -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib > -R/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib > -R/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -R/usr/X11R6/lib > -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o mysql.so mysql.o -m64 -O2 > -mtune=k8 -static-libgcc -L/usr/local/mysql/lib -lmysqlclient -lz > -lposix4 -lresolv -lgen -lsocket -lnsl -lm -ldl -lcrypt -lm -lc > ld: fatal: file /usr/lib/libcrypt.so: wrong ELF class: ELFCLASS32 > ld: fatal: File processing errors. No output written to mysql.so > collect2: ld returned 1 exit status > *** Error code 1 > make: Fatal error: Command failed for target `mysql.so' > > > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection. > Results logged to > /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out > root@hostname:~# > > Of course make is barfing on my 32 bit libcrypt... > > root@hostname:~# file /usr/lib/libcrypt.so > /usr/lib/libcrypt.so: ELF 32-bit LSB dynamic lib 80386 Version 1, > dynamically linked, not stripped, no debugging information available > > root@hostname:~# file > /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/mysql.o > /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/mysql.o: ELF 64-bit LSB > relocatable AMD64 Version 1 > > root@hostname:~# file /usr/local/mysql/lib/libmysqlclient.so > /usr/local/mysql/lib/libmysqlclient.so: ELF 64-bit LSB dynamic lib AMD64 > Version 1, dynamically linked, not stripped, no debugging information > available > > I am assuming all this is happening because the Solaris package of MySQL > that I installed (from mysql.com) is a 64 bit package... > > Short of reinstalling MySQL as a 32 bit app, (which I would prefer not > to do) can anyone make any suggestions? I started trying to recompile > all kinds of so everything would match and got into a cycle of one thing > depending on something else, depending on something until I broke ruby, > gem, and half the system. > > Thanks in advance, > Andrew > -- Stephen Dame President/CEO Virtual DSP Corporation 4119 125th St SE Everett, WA 98208 Tel 425.379.8888 Fax 425.357.0567 http://www.virtual-dsp.com