Thanks for your help Hassan.
Here's the mfmk.log showing what threw the compile error.
I'll try 2) run mysql_config manually to see what it says. 
and experiment with the compile stream to see if i can get it going

Would it be appropriate to pass this problem onto the Rubygem team, and/or 
Mysql/Oracle people?
Your suggestion to use MacPort will be my last resort
Thanks again
Dave


davids-MacBook-Pro:sailing_oli_bk31mar2013pg bone_david$ cat 
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/mkmf.log
have_func: checking for rb_thread_blocking_region()... -------------------- 
yes

"/usr/bin/gcc-4.2 -o conftest 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.2.0 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/backward 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1 -I. 
-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   
-I/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/include -fno-common -pipe 
conftest.c  -L. -L/usr/local/rvm/rubies/ruby-1.9.3-p194/lib -L. 
-L/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib     -lruby.1.9.1  -lpthread 
-ldl -lobjc "
ld: warning: directory not found for option 
'-L/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib'
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main() {return 0;}
/* end */

"/usr/bin/gcc-4.2 -o conftest 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.2.0 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/backward 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1 -I. 
-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   
-I/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/include -fno-common -pipe 
conftest.c  -L. -L/usr/local/rvm/rubies/ruby-1.9.3-p194/lib -L. 
-L/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib     -lruby.1.9.1  -lpthread 
-ldl -lobjc "
ld: warning: directory not found for option 
'-L/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib'
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: /*top*/
4: int main() {return 0;}
5: int t() { void ((*volatile p)()); p = (void 
((*)()))rb_thread_blocking_region; return 0; }
/* end */

--------------------

have_func: checking for rb_wait_for_single_fd()... -------------------- yes

"/usr/bin/gcc-4.2 -o conftest 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.2.0 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/backward 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1 -I. 
-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   
-I/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/include -fno-common -pipe 
conftest.c  -L. -L/usr/local/rvm/rubies/ruby-1.9.3-p194/lib -L. 
-L/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib     -lruby.1.9.1  -lpthread 
-ldl -lobjc "
conftest.c: In function ‘t’:
conftest.c:5: error: ‘rb_wait_for_single_fd’ undeclared (first use in this 
function)
conftest.c:5: error: (Each undeclared identifier is reported only once
conftest.c:5: error: for each function it appears in.)
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: /*top*/
4: int main() {return 0;}
5: int t() { void ((*volatile p)()); p = (void 
((*)()))rb_wait_for_single_fd; return 0; }
/* end */

"/usr/bin/gcc-4.2 -o conftest 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.2.0 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/backward 
-I/usr/local/rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1 -I. 
-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   
-I/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/include -fno-common -pipe 
conftest.c  -L. -L/usr/local/rvm/rubies/ruby-1.9.3-p194/lib -L. 
-L/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib     -lruby.1.9.1  -lpthread 
-ldl -lobjc "
ld: warning: directory not found for option 
'-L/Users/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib'
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: /*top*/
4: int main() {return 0;}
5: int t() { rb_wait_for_single_fd(); return 0; }
/* end */

--------------------

davids-MacBook-Pro:sailing_oli_bk31mar2013pg bone_david$ 


On Sunday, May 12, 2013 1:34:36 PM UTC-4, dave wrote:
>
> Hi Group,
> I've got mysql database installed and the server running on a Mac Pro with 
> latest mountain lion setup 10.8.3. 
> I'm able to use mysql tools like mysql, mysqladmin to converse with it. :}
>
> I use RVM's scripts to fetch gems.
> I've visited RVM's website but their advise to get "mysql gem loaded" does 
> the same thing *as below aborted output*!
>  I'm not sure that this website is being maintained anymore as their 
> copyright notice is 2011.
>
> What/how suggestions appreciated to get this mysql2 gem installed so that 
> i can use rails/ruby against this database?
>
> My ROR config:
> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]
> Rails 3.2.12
> RVM gem managed
>
> So far Macport seems to work to install mysql and gen/install the mysql2 
> gem. I've not tried this gem yet as i'm still using RVM.
> I don't believe this is the latest mysql release by Macport. 
> It goes against Mysql's website advise to install it by DMG route for Mac 
> which I did with the latest stable 64 bit libraries/server.
>
> Thanks for your help in trying to resolve this issue.
> Dave
>
>
> *The aborted output from gem install mysql2.*
> *Both ways attempted: gem install mysql2 and with the option 
> --with-mysql-config=/usr/local/mysql/bin/mysql_config*
>
> gem install mysql2 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
> Building native extensions.  This could take a while...
> ERROR:  Error installing mysql2:
> ERROR: Failed to build gem native extension.
>
>         /Users/bone_david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
> --with-mysql-config=/usr/local/mysql/bin/mysql_config
> checking for rb_thread_blocking_region()... yes
> checking for rb_wait_for_single_fd()... yes
> checking for mysql.h... no
> checking for mysql/mysql.h... no
> -----
> mysql.h is missing.  please check your installation of mysql and try again.
> -----
> *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.
>
> Provided configuration options:
> --with-opt-dir
> --without-opt-dir
> --with-opt-include
> --without-opt-include=${opt-dir}/include
> --with-opt-lib
> --without-opt-lib=${opt-dir}/lib
> --with-make-prog
> --without-make-prog
> --srcdir=.
> --curdir
> --ruby=/Users/bone_david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
> --with-mysql-config
>
>
> Gem files will remain installed in 
> /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11 for 
> inspection.
> Results logged to 
> /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
>
> *To show mysql_config file exists:*
> ls -al /usr/local/mysql/bin/mysql_config
> -rwxr-xr-x  1 root  wheel  6382  5 Apr 09:53 
> /usr/local/mysql/bin/mysql_config
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/jz7jbAu_2lIJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to