Note that there are some explanatory texts on larger screens.

plurals
  1. PORails 3.2.3 MySQL 5.5.1 Mysql2 gem install fails with ld incompatibilities
    text
    copied!<p>I have a clean build system as follows</p> <p>Ubuntu 11.04</p> <p>Rvm 1.13.5</p> <p>Ruby 1.9.3p194</p> <p>Rails 3.2.3</p> <p>Gem 1.8.24</p> <p>MySql 5.5.24-1 (installed in /usr/local)</p> <p>I am trying to install the mysql2 gem (0.3.11) and getting the following problem:</p> <pre><code> pal@smurf01:~$ sudo gem install mysql2 [sudo] password for pal: Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.3-p194/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 client.c client.c: In function 'rb_raise_mysql2_error': client.c:98:3: warning: ISO C90 forbids mixed declarations and code client.c: In function 'rb_mysql_client_socket': client.c:590:3: warning: ISO C90 forbids mixed declarations and code compiling mysql2_ext.c compiling result.c linking shared-object mysql2/mysql2.so /usr/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient_r.so when searching for -lmysqlclient_r /usr/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient_r.a when searching 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/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11 for inspection. Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/gem_make.out pal@smurf01:~$ </code></pre> <p>First question: Has anyone got Rails mysql2 running with MySql 5.5.1 on Ubuntu? I have it running on another system with 5.1. The gem description is vague on supported MySql versions.</p> <p>Second question: Has anyone encountered this problem? I± have battled various library issues with the mysql2 gem over the passed year or so but this seems to be different.</p> <p>Any assistance is gratefully recieved.</p> <p>BTW: Reverting back to MySql 5.1 is a valid solution!</p> <p>Regards </p> <p>Peter</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload