CentOS/MySQL 5 Installation Error

130 views
Skip to first unread message

jnunemaker

unread,
Jan 14, 2008, 12:04:53 PM1/14/08
to DataMapper
I asked around in IRC the other day and no one seemed to know how to
get around this. When I try to install do_mysql, I get the following
error:

Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install do_mysql
checking for mysql_query() in -lmysqlclient... yes
creating Makefile

make
gcc -fPIC -O0 -g -march=i386 -mcpu=i686 -Wall -fPIC -Wall -I. -I/
usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -I/usr/
include/mysql -c mysql_c.c
mysql_c.c: In function `_wrap_mysql_get_ssl_cipher':
mysql_c.c:8963: warning: implicit declaration of function
`mysql_get_ssl_cipher'
mysql_c.c: In function `_wrap_MYSQL_METHODS_advanced_command_set':
mysql_c.c:13715: warning: assignment from incompatible pointer type
mysql_c.c: In function `Init_mysql_c':
mysql_c.c:16079: error: `MYSQL_OPT_SSL_VERIFY_SERVER_CERT' undeclared
(first use in this function)
mysql_c.c:16079: error: (Each undeclared identifier is reported only
once
mysql_c.c:16079: error: for each function it appears in.)
make: *** [mysql_c.o] Error 1


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/
do_mysql-0.2.3 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/do_mysql-0.2.3/ext/
gem_make.out

I'm not a c dude so I have no idea what is going wrong. Any help would
be appreciated. I'll try to respond quickly if you need more
information.

mysql version: 5.0.22
linux flavor: centos

Nicolás Sanguinetti

unread,
Jan 14, 2008, 12:36:54 PM1/14/08
to datam...@googlegroups.com
Probably you don't have mysql's bin dir in your path (the gem needs
mysql_config in the path to build), maybe this works (it's what works
on mac, at least, but since it's the same error message... :))

sudo gem install do_mysql --
--with-mysql-config=/usr/local/mysql/bin/mysql_config

(or wherever you have mysql installed in)

Best,
-Nicolas

John Nunemaker

unread,
Jan 14, 2008, 12:48:22 PM1/14/08
to datam...@googlegroups.com
Tried that with the location of my mysql_config and got this: 

Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

ruby extconf.rb install do_mysql -- --with-mysql-config=/usr/bin/mysql_config
checking for mysql_query() in -lmysqlclient... yes
creating Makefile

make
gcc -fPIC -O0 -g -march=i386 -mcpu=i686 -Wall  -fPIC -Wall   -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I.  -I/usr/include/mysql  -c mysql_c.c
mysql_c.c: In function `_wrap_mysql_get_ssl_cipher':
mysql_c.c:8963: warning: implicit declaration of function `mysql_get_ssl_cipher'
mysql_c.c: In function `_wrap_MYSQL_METHODS_advanced_command_set':
mysql_c.c:13715: warning: assignment from incompatible pointer type
mysql_c.c: In function `Init_mysql_c':
mysql_c.c:16079: error: `MYSQL_OPT_SSL_VERIFY_SERVER_CERT' undeclared (first use in this function)
mysql_c.c:16079: error: (Each undeclared identifier is reported only once
mysql_c.c:16079: error: for each function it appears in.)
make: *** [mysql_c.o] Error 1


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/do_mysql-0.2.3 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/do_mysql-0.2.3/ext/gem_make.out

dschn

unread,
Jan 16, 2008, 11:26:51 PM1/16/08
to DataMapper
Have the same issue. I'm guessing Dreamhost too? Following some of the
instructions here got me a little further along with this:
http://franee-on-rails.blogspot.com/2008/01/domysql-023-gem-install-problem-on.html

But now getting this:
gcc -I. -I. -I/usr/lib/ruby/1.8/i386-linux -I. -I/usr/include/mysql -
fPIC -Wall -g -fno-strict-aliasing -O2 -fPIC -Wall -c mysql_c.c
mysql_c.c: In function `_wrap_MYSQL_DATA_embedded_info_set':
mysql_c.c:3631: error: structure has no member named `embedded_info'
mysql_c.c: In function `_wrap_MYSQL_DATA_embedded_info_get':
mysql_c.c:3655: error: structure has no member named `embedded_info'
mysql_c.c: In function `_wrap_mysql_get_ssl_cipher':
mysql_c.c:8963: warning: implicit declaration of function
`mysql_get_ssl_cipher'
mysql_c.c: In function `_wrap_MYSQL_METHODS_advanced_command_set':
mysql_c.c:13715: warning: assignment from incompatible pointer type
mysql_c.c: In function
`_wrap_MYSQL_METHODS_read_rows_from_cursor_set':
mysql_c.c:14457: error: structure has no member named
`read_rows_from_cursor'
mysql_c.c: In function
`_wrap_MYSQL_METHODS_read_rows_from_cursor_get':
mysql_c.c:14481: error: structure has no member named
`read_rows_from_cursor'
make: *** [mysql_c.o] Error 1

On Jan 14, 12:48 pm, John Nunemaker <nunema...@gmail.com> wrote:
> Tried that with the location of my mysql_config and got this:
>
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
> ERROR: Failed to build gem native extension.
>
> ruby extconf.rb install do_mysql -- --with-mysql-config=/usr/bin/
> mysql_config
> checking for mysql_query() in -lmysqlclient... yes
> creating Makefile
>
> make
> gcc -fPIC -O0 -g -march=i386 -mcpu=i686 -Wall -fPIC -Wall -I. -I/
> usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -I/usr/
> include/mysql -c mysql_c.c
> mysql_c.c: In function `_wrap_mysql_get_ssl_cipher':
> mysql_c.c:8963: warning: implicit declaration of function
> `mysql_get_ssl_cipher'
> mysql_c.c: In function `_wrap_MYSQL_METHODS_advanced_command_set':
> mysql_c.c:13715: warning: assignment from incompatible pointer type
> mysql_c.c: In function `Init_mysql_c':
> mysql_c.c:16079: error: `MYSQL_OPT_SSL_VERIFY_SERVER_CERT' undeclared
> (first use in this function)
> mysql_c.c:16079: error: (Each undeclared identifier is reported only
> once
> mysql_c.c:16079: error: for each function it appears in.)
> make: *** [mysql_c.o] Error 1
>
> Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/
> do_mysql-0.2.3 for inspection.
> Results logged to /usr/lib/ruby/gems/1.8/gems/do_mysql-0.2.3/ext/
> gem_make.out
>
> On Jan 14, 2008, at 12:36 PM, Nicolás Sanguinetti wrote:
>
>
>
> > Probably you don't have mysql's bin dir in your path (the gem needs
> > mysql_config in the path to build), maybe this works (it's what works
> > on mac, at least, but since it's the same error message... :))
>
> > sudo gem install do_mysql --
> > --with-mysql-config=/usr/local/mysql/bin/mysql_config
>
> > (or wherever you have mysql installed in)
>
> > Best,
> > -Nicolas
>

Aubrey

unread,
Feb 15, 2008, 9:21:59 PM2/15/08
to DataMapper
For me the centos magic line was:

sudo gem install do_mysql -- --with-mysql-dir=/usr/ --with-mysql-lib=/
usr/lib/mysql/ --with-mysql-include=/usr/include/mysql/



On Jan 16, 8:26 pm, dschn <dusti...@gmail.com> wrote:
> Have the same issue. I'm guessing Dreamhost too? Following some of the
> instructions here got me a little further along with this:http://franee-on-rails.blogspot.com/2008/01/domysql-023-gem-install-p...
Reply all
Reply to author
Forward
0 new messages