From: johan.tempelman@... Date: 2012-09-04T16:31:58+09:00 Subject: Problem to build gem mysql2 --_000_6C58B5F102A787488BD61F1FFEDF0E072AF459F1A6EMV31UKDYdoma_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have installed OEL 5u8, ruby 1.9.3 p194 and MariaDB 5.5. When I trying to= build gem mysql2 I got the following error: [root@nic_prod_server ~]# ruby -v ruby 1.9.3p194 (2012-04-20) [x86_64-linux] [root@nic_prod_server ~]# gem install mysql2 Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for mysql.h... yes checking for errmsg.h... yes checking for mysqld_error.h... yes creating Makefile make compiling result.c In file included from ./mysql2_ext.h:39, from result.c:1: ./client.h:42:7: warning: no newline at end of file compiling client.c In file included from ./mysql2_ext.h:39, from client.c:1: ./client.h:42:7: warning: no newline at end of file client.c: In function =E2rb_raise_mysql2_error=E2: client.c:98: warning: ISO C90 forbids mixed declarations and code client.c: In function =E2rb_mysql_client_socket=E2: client.c:590: warning: ISO C90 forbids mixed declarations and code compiling mysql2_ext.c In file included from ./mysql2_ext.h:39, from mysql2_ext.c:1: ./client.h:42:7: warning: no newline at end of file linking shared-object mysql2/mysql2.so /usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient_r.so when search= ing for -lmysqlclient_r /usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient_r.a when searchi= ng for -lmysqlclient_r /usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient_r.so when search= ing for -lmysqlclient_r /usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient_r.a when searchi= ng for -lmysqlclient_r /usr/bin/ld: cannot find -lmysqlclient_r collect2: ld returned 1 exit status make: *** [mysql2.so] Error 1 Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/mysq= l2-0.3.11 for inspection. Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/ext/mys= ql2/gem_make.out What do I need to do in order to install the mysql2 gem? Best regards, Johan Tempelman BT Global Services - BI System Support --_000_6C58B5F102A787488BD61F1FFEDF0E072AF459F1A6EMV31UKDYdoma_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
I have ins=
talled OEL 5u8, ruby 1.9.3 p194 and MariaDB 5.5. When I trying to build gem=
mysql2 I got the following error:
[root@nic_prod_server ~]# ruby -v
ruby 1.9.3p194 (2012-04-20) =
[x86_64-linux]
[r=
oot@nic_prod_server ~]# gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERR=
OR: Failed to build gem native extension.
&=
nbsp; /usr/local/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checki=
ng for mysqld_error.h... yes
creating Ma=
kefile
make
compiling result.c
In file included from ./mysql2_ext.h:39,
&nbs=
p; from result.c:1:
./client.h:42:7: warning: no newline at end of =
file
compiling client.c
In file included from ./mysql2_ext.h:39,
./client.h:42:7: warning: no newline at end of file
client.c: In function ârb_raise_mysql2=
_errorâ:
client.c:98: warning: ISO=
C90 forbids mixed declarations and code
client.c: In function ârb_mysql_client_socketâ:
client.c:590: warning: ISO C90 forbids mixed declarati=
ons and code
compiling mysql2_ext.c
In file included from ./mysql2_ext.h:39,
&= nbsp; from mysql2_ext.c:1:<= o:p>
./client.h:42:7: warning: no newline at =
end of file
linking shared-object mysql2=
/mysql2.so
/usr/bin/ld: skipping incompa=
tible /usr/lib/libmysqlclient_r.so when searching for -lmysqlclient_r
/usr/bin/ld: skipping incompatible /usr/lib/l=
ibmysqlclient_r.a when searching for -lmysqlclient_r
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient_r.s=
o when searching for -lmysqlclient_r
/us=
r/bin/ld: skipping incompatible /usr/lib/libmysqlclient_r.a when searching =
for -lmysqlclient_r
/usr/bin/ld: cannot =
find -lmysqlclient_r
collect2: ld return=
ed 1 exit status
make: *** [mysql2.so] E=
rror 1
Gem files will remain in=
stalled in /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11 for inspection=
.
Results logged to /usr/local/lib/ruby/=
gems/1.9.1/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
What do I need to do in order to install the mysql2 =
gem?
Best regards,
Johan Tempelman
BT Global Services - BI System Support