# Mysql/ruby + gcc 3.2?

**URL:** <https://www.ruby-forum.com/t/mysql-ruby-gcc-3-2/53821>\
**Category:** Rails\
**Created:** [February 14, 2006, 11:18pm UTC](https://www.ruby-forum.com/t/mysql-ruby-gcc-3-2/53821 "2006-02-14T23:18:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kylemathews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/51bf81/32.png) [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Post date:** [February 14, 2006, 11:18pm UTC](https://www.ruby-forum.com/t/mysql-ruby-gcc-3-2/53821/1 "2006-02-14T23:18:12Z")

</div>

Anyone succeed in installing the mysql/ruby C bindings (2.7) with gcc  
3.2? I am not able to install gcc 4. Any help or direction would be  
appreciated!

-Kyle

[root@server1 root]# gem install mysql –  
–with-mysql-config=/usr/bin/mysql\_config  
Attempting local installation of ‘mysql’  
Local gem file not found: mysql\*.gem  
Attempting remote installation of ‘mysql’  
Building native extensions. This could take a while…  
Makefile:111: warning: overriding commands for target  
`/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib' Makefile:109: warning: ignoring old commands for target`/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib’  
Makefile:111: warning: overriding commands for target  
`/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib' Makefile:109: warning: ignoring old commands for target`/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib’  
ruby extconf.rb install mysql –  
–with-mysql-config=/usr/bin/mysql\_config  
checking for mysql\_ssl\_set()… yes  
checking for mysql.h… yes  
creating Makefile

make  
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux  
-I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE\_MYSQL\_SSL\_SET  
-DHAVE\_MYSQL\_H -I/usr/include/mysql -mcpu=i486 -fno-strength-reduce  
-c mysql.c  
gcc -shared -L’/usr/local/lib’ -Wl,-R’/usr/local/lib’ -o mysql.so  
mysql.o -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc  
-lnss\_files -lnss\_dns -lresolv -lc -lnss\_files -lnss\_dns -lresolv  
-ldl -lcrypt -lm -lc

make install  
/usr/bin/install -c -m 0755 mysql.so  
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib  
Successfully installed mysql-2.7

---

<div class="post-metadata">

**Author:** ![kylemathews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/51bf81/32.png) [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Post date:** [February 15, 2006, 5:20am UTC](https://www.ruby-forum.com/t/mysql-ruby-gcc-3-2/53821/2 "2006-02-15T05:20:19Z")

</div>

I’m sorry if I’m being dense, but what’s the problem? Looks like the  
build finishes fine.

b

---

<div class="post-metadata">

**Author:** ![kylemathews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/51bf81/32.png) [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Post date:** [February 15, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/mysql-ruby-gcc-3-2/53821/3 "2006-02-15T18:01:43Z")

</div>

On 2/14/06, Ben M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m sorry if I’m being dense, but what’s the problem? Looks like the build finishes fine.
> 
> b

I thought so too, but indications from my rails app are that it is  
still using the native ruby bindings.

The same thing happened on my powerbook, then I recompiled with gcc 4,  
and everything worked fine. Unfortunately, I don’t have that option  
on the production server.

-Kyle
