Unable to install mysql gem after MacOS 10.14 install and brew update - mysql

after macOS 10.14 install + Brew update my dev system is broken.
I am unable to install the mysql gem. When trying to install I get:
$ gem install mysql -v '2.8.1' --source 'http://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
current directory: /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/gems/mysql-2.8.1/ext/mysql_api
/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/bin/ruby -r ./siteconf20180926-49343-waujia-0.rb extconf.rb
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... yes
checking for mysql.h... no
checking for mysql/mysql.h... no
*** 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/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/bin/ruby
--with-mysql-config
--without-mysql-config
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/extensions/x86-darwin-14/1.8/mysql-2.8.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/gems/mysql-2.8.1 for inspection.
Results logged to /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/extensions/x86-darwin-14/1.8/mysql-2.8.1/gem_make.out
the relative mkmf.log is:
have_func: checking for mysql_ssl_set()... -------------------- yes
"/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -ldl -lobjc "
conftest.c: In function 't':
conftest.c:3:53: error: 'mysql_ssl_set' undeclared (first use in this function)
int t() { void ((*volatile p)()); p = (void ((*)()))mysql_ssl_set; return 0; }
^
conftest.c:3:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))mysql_ssl_set; return 0; }
/* end */
"/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -ldl -lobjc "
ld: warning: directory not found for option '-L/usr/local/opt/openssl098/lib'
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { mysql_ssl_set(); return 0; }
/* end */
--------------------
have_func: checking for rb_str_set_len()... -------------------- yes
"/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -ldl -lobjc "
conftest.c: In function 't':
conftest.c:3:53: error: 'rb_str_set_len' undeclared (first use in this function)
int t() { void ((*volatile p)()); p = (void ((*)()))rb_str_set_len; return 0; }
^
conftest.c:3:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_str_set_len; return 0; }
/* end */
"/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -ldl -lobjc "
ld: warning: directory not found for option '-L/usr/local/opt/openssl098/lib'
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { rb_str_set_len(); return 0; }
/* end */
--------------------
have_func: checking for rb_thread_start_timer()... -------------------- yes
"/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -ldl -lobjc "
conftest.c: In function 't':
conftest.c:3:53: error: 'rb_thread_start_timer' undeclared (first use in this function)
int t() { void ((*volatile p)()); p = (void ((*)()))rb_thread_start_timer; return 0; }
^
conftest.c:3:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_thread_start_timer; return 0; }
/* end */
"/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto -ldl -lobjc "
ld: warning: directory not found for option '-L/usr/local/opt/openssl098/lib'
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { rb_thread_start_timer(); return 0; }
/* end */
--------------------
have_header: checking for mysql.h... -------------------- no
"/usr/local/bin/gcc-4.9 -E -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -o conftest.i"
In file included from conftest.c:1:0:
/usr/local/Cellar/mysql/5.7.21/include/mysql/mysql.h:35:23: fatal error: sys/types.h: No such file or directory
#include <sys/types.h>
^
compilation terminated.
checked program was:
/* begin */
1: #include <mysql.h>
/* end */
--------------------
have_header: checking for mysql/mysql.h... -------------------- no
"/usr/local/bin/gcc-4.9 -E -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/mysql/5.7.21/include/mysql -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fno-common -pipe -fno-common conftest.c -o conftest.i"
In file included from conftest.c:1:0:
/usr/local/include/mysql/mysql.h:35:23: fatal error: sys/types.h: No such file or directory
#include <sys/types.h>
^
compilation terminated.
checked program was:
/* begin */
1: #include <mysql/mysql.h>
/* end */
--------------------
I have mysql installed via Brew and keep mysql, mysql#5.6 or mysql#5.7 active. Path is set in .bash_profile:
### Customize path for MYSQL
MYSQL=/usr/local/mysql/bin
export PATH=$PATH:$MYSQL
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
When I switch to mysql#5.6 or 5.7 I change the path accordingly.
There appears to be some problem with mysql in general.
While one webapp in Ruby 1.8.7, Rails 3.2.5 with mysql database is running, two other webapps with the same technology stack are unable to either reinstall the mysql gem or connect to the database.
$ rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Mysql::Error: Table 'dev_WEBPROJECT.safts' doesn't exist: SHOW FULL FIELDS FROM `safts`
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `query'
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `execute'
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log'
.
.
.
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/gems/rake-0.9.6/bin/rake:37
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/bin/rake:22:in `load'
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/bin/rake:22
/Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374#WEBPROJECT/bin/ruby_executable_hooks:15
Tasks: TOP => db:migrate => environment
Can anyone help?

Mojave changed the location of header files necessary for compiling C extensions. You might need to run the following command to install mysql gem:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Ref: https://gorails.com/setup/osx/10.14-mojave

Do you have xcode installed? /usr/bin/xcodebuild -version

Related

Cuda compiling error when coming to g++ compiling step

nvcc -D_DEBUG --use_fast_math -I"/usr/local/cuda-9.0//include" -I"/usr/include/eigen3" -I"/home/xingfu/NVIDIA_CUDA-9.0_Samples/common/inc" -dlink --machine 64 -arch=sm_50 -c -o kernel_cuda.o ../CudaTest/kernel.cu
g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I../CudaTest -I. -I/usr/local/cuda-9.0/include -isystem /usr/include/eigen3 -I../NVIDIA_CUDA-9.0_Samples/common/inc -isystem /usr/local/include -I../Qt5.11.0/5.11.0/gcc_64/include -I../Qt5.11.0/5.11.0/gcc_64/include/QtCore -I. -I../Qt5.11.0/5.11.0/gcc_64/mkspecs/linux-g++ -o LBDM.o ../CudaTest/LBDM.cpp
The two steps above have passed, however, when run the following step, the error occured:
g++ -Wl,-rpath,/home/xingfu/Qt5.11.0/5.11.0/gcc_64/lib -o CudaTest kernel_cuda.o LBDM.o -L/usr/local/cuda-9.0//lib64/ -lcuda -lcudart -lcublas -L/home/xingfu/CudaTest/../../../usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -L/home/xingfu/Qt5.11.0/5.11.0/gcc_64/lib -lQt5Core -lpthread
The compiler error shows:
kernel_cuda.o: In function `__sti____cudaRegisterAll()':
tmpxft_00000e7d_00000000-5_kernel.cudafe1.cpp:(.text+0x177e): undefined reference to `__cudaRegisterLinkedBinary_41_tmpxft_00000e7d_00000000_6_kernel_cpp1_ii_channel'
How can I fix the error?
What's more,
I add the -dlink, because it shows the error when dealing the following step:
nvcc -D_DEBUG --use_fast_math -I"/usr/local/cuda-9.0//include" -I"/usr/include/eigen3" -I"/home/xingfu/NVIDIA_CUDA-9.0_Samples/common/inc" --machine 64 -arch=sm_50 -c -o kernel_cuda.o ../CudaTest/kernel.cu
and the error is:
ptxas fatal : Unresolved extern function 'cublasCreate_v2'
However, when I add -dlink, the error occured like I said above.
BTW, before I add -dlink, I can run a simple function in another test project like this:
__global__ void add(float* x, float * y, float* z, int n)
{
int index = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
for (int i = index; i < n; i += stride)
{
z[i] = x[i] + y[i];
}
}
After I add -dlink, the test project shows an error:
cuda_code_cuda.o: In function `__sti____cudaRegisterAll()':
tmpxft_000017db_00000000-5_cuda_code.cudafe1.cpp:(.text+0x861): undefined reference to `__cudaRegisterLinkedBinary_44_tmpxft_000017db_00000000_6_cuda_code_cpp1_ii_5b538d80'
which is very similar to the above error.
For relocatable device code linking, which seems to be what you're after, the recommended sequence would be as follows. In addition, it appears your code is attempting to use the cublas device interface, so for good measure we'll add those libraries to the link steps:
#replace -dlink -c with -dc
nvcc -D_DEBUG --use_fast_math -I"/usr/local/cuda-9.0//include" -I"/usr/include/eigen3" -I"/home/xingfu/NVIDIA_CUDA-9.0_Samples/common/inc" -dc --machine 64 -arch=sm_50 -o kernel_cuda.o ../CudaTest/kernel.cu
#generate device-linked object with cublas device libraries
nvcc -D_DEBUG --use_fast_math -dlink --machine 64 -arch=sm_50 -o kernel_dlink.o kernel_cuda.o -lcublas -lcublas_device -lcudadevrt
#no change to this line
g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I../CudaTest -I. -I/usr/local/cuda-9.0/include -isystem /usr/include/eigen3 -I../NVIDIA_CUDA-9.0_Samples/common/inc -isystem /usr/local/include -I../Qt5.11.0/5.11.0/gcc_64/include -I../Qt5.11.0/5.11.0/gcc_64/include/QtCore -I. -I../Qt5.11.0/5.11.0/gcc_64/mkspecs/linux-g++ -o LBDM.o ../CudaTest/LBDM.cpp
#add device-linked object to final link phase plus cublas device libraries
g++ -Wl,-rpath,/home/xingfu/Qt5.11.0/5.11.0/gcc_64/lib -o CudaTest kernel_cuda.o LBDM.o kernel_dlink.o -L/usr/local/cuda-9.0//lib64/ -lcuda -lcudart -lcublas -lcublas_device -lcudadevrt -L/home/xingfu/CudaTest/../../../usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -L/home/xingfu/Qt5.11.0/5.11.0/gcc_64/lib -lQt5Core -lpthread

cgicc make fails when trying to install cgicc libraries for c++ web programming

I'm a newbie to c++ web programming. I followed the link tutorialspoint for C++ web programming.
http://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm
I installed the cgicc library, confirgures it but will making i get the following error: I need to usecgicc libraries to make my html work.
Making all in cgicc
make[1]: Entering directory '/path/to/cgicc-3.0.2/cgicc'
/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c CgiEnvironment.cc
mkdir .libs
c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c -fPIC -DPIC CgiEnvironment.cc -o .libs/CgiEnvironment.lo
c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c CgiEnvironment.cc -o CgiEnvironment.o >/dev/null 2>&1
mv -f .libs/CgiEnvironment.lo CgiEnvironment.lo
/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c CgiUtils.cc
rm -f .libs/CgiUtils.lo
c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c -fPIC -DPIC CgiUtils.cc -o .libs/CgiUtils.lo
CgiUtils.cc:111:30: error: 'string' does not name a type
CGICCNS unescapeString(const string& src)
^
CgiUtils.cc:111:41: error: 'std::__cxx11::string cgicc::unescapeString(const int&)' should have been declared inside 'cgicc'
CGICCNS unescapeString(const string& src)
^
CgiUtils.cc: In function 'std::__cxx11::string cgicc::unescapeString(const int&)':
CgiUtils.cc:117:18: error: request for member 'begin' in 'src', which is of non-class type 'const int'
for(iter = src.begin(); iter != src.end(); ++iter) {
^
CgiUtils.cc:117:39: error: request for member 'end' in 'src', which is of non-class type 'const int'
for(iter = src.begin(); iter != src.end(); ++iter) {
^
Makefile:229: recipe for target 'CgiUtils.lo' failed
make[1]: * [CgiUtils.lo] Error 1
make[1]: Leaving directory '/path/to/cgicc-3.0.2/cgicc'
Makefile:161: recipe for target 'all-recursive' failed
make: * [all-recursive] Error 1
Please tell me where I'm going wrong! Is there anything else i need to do

How can I get mysql2 to install?

I'm completely new to rails development and have been struggling with installing mysql2 with the past month. I'm have windows 8.1 64 bit, ruby 2.0.0p535 64bit, rails 4.0.2, and I have mysql2 (0.3.14) 64bit. The errors that I am getting from cmd are below.
C:\Users\tghol_000>gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:\mysql-connector\"' --with-mysql lib="C:\mysql-connector\lib"'
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-dir="C:\mysql-connector\" --with-mysql-lib=C:\mysql- connector\lib'
This could take a while...
*** 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=C:/Ruby200-x64/bin/ruby
--with-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/
--with-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
C:/Ruby200-x64/lib/ruby/2.0.0/shellwords.rb:75:in `block in shellsplit': Unmatched double quote: "\"-IC:\\mysql-connector\" --with-mysql-lib=C:\\mysql-connector\\lib 2>&1/include\" -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 $(DEFS) $(cppflags)"
(ArgumentError)
from C:/Ruby200-x64/lib/ruby/2.0.0/shellwords.rb:73:in `scan'
from C:/Ruby200-x64/lib/ruby/2.0.0/shellwords.rb:73:in `shellsplit'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1687:in `dir_config'
from extconf.rb:42:in `'
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb --with-mysql-dir="C:\mysql-connector\" --with- mysql-lib=C:\mysql-connector\lib
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl()
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.14 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/mysql2-0.3.14/gem_make.out
mkmf.log
have_header: checking for ruby/thread.h... -------------------- yes
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
"x86_64-w64-mingw32-gcc -E -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <ruby/thread.h>
/* end */
--------------------
have_func: checking for rb_thread_call_without_gvl() in ruby/thread.h... -------------------- yes
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:9:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <ruby/thread.h>
6:
7: /*top*/
8: extern int t(void);
9: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_call_without_gvl; return 0; }
10: int main(int argc, char **argv)
11: {
12: if (argc > 1000000) {
13: printf("%p", &t);
14: }
15:
16: return 0;
17: }
/* end */
--------------------
have_func: checking for rb_thread_blocking_region()... -------------------- yes
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:8:1: warning: 'rb_thread_blocking_region' is deprecated (declared at C:/Ruby200-x64/include/ruby-2.0.0/ruby/intern.h:841) [-Wdeprecated-declarations]
conftest.c:8:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return 0; }
9: int main(int argc, char **argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
/* end */
--------------------
have_func: checking for rb_wait_for_single_fd()... -------------------- yes
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:8:57: error: 'rb_wait_for_single_fd' undeclared (first use in this function)
conftest.c:8:57: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:8:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_wait_for_single_fd; return 0; }
9: int main(int argc, char **argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
/* end */
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:8:1: warning: implicit declaration of function 'rb_wait_for_single_fd' [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int t(void) { rb_wait_for_single_fd(); return 0; }
9: int main(int argc, char **argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
/* end */
--------------------
have_func: checking for rb_hash_dup()... -------------------- yes
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:8:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_hash_dup; return 0; }
9: int main(int argc, char **argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
/* end */
--------------------
have_func: checking for rb_intern3()... -------------------- yes
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:8:57: error: 'rb_intern3' undeclared (first use in this function)
conftest.c:8:57: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:8:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_intern3; return 0; }
9: int main(int argc, char **argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
/* end */
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:8:1: warning: implicit declaration of function 'rb_intern3' [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int t(void) { rb_intern3(); return 0; }
9: int main(int argc, char **argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
/* end */
--------------------
C:\Users\tghol_000>gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:\mysql-connector\"' --with-mysql lib="C:\mysql-connector\lib"'
^-- remove that '
You have got unnecessary apostrophe, I have checked where it is, remove and try again.

I cant install oj ruby gem on windows 7 64

I tried to install oj ruby gem
gem install oj -v '1.3.5'
Here's the output log
C:/Ruby192/bin/ruby.exe extconf.rb
Creating Makefile for ruby version 1.9.2 <<<<<
creating Makefile
make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_oj'" > oj-i386-mingw32.def
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_TYPE=ruby -DRUBY_RUBY -DRUBY_VERSION=1.9.2 -DRUBY_VERSION_MAJOR=1 -DRUBY_VERSION_MINOR=9 -DRUBY_VERSION_MICRO=2 -DHAS_RB_TIME_TIMESPEC=0 -DHAS_ENCODING_SUPPORT=1 -DHAS_NANO_TIME=1 -DHAS_RSTRUCT=1 -DHAS_IVAR_HELPERS=1 -DHAS_EXCEPTION_MAGIC=0 -DHAS_PROC_WITH_BLOCK=1 -DHAS_TOP_LEVEL_ST_H=0 -DSAFE_CACHE -Wall -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o cache.o -c cache.c
cache.c: In function 'oj_cache_new':
cache.c:54:5: warning: implicit declaration of function 'bzero'
cache.c:54:5: warning: incompatible implicit declaration of built-in function 'bzero'
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_TYPE=ruby -DRUBY_RUBY -DRUBY_VERSION=1.9.2 -DRUBY_VERSION_MAJOR=1 -DRUBY_VERSION_MINOR=9 -DRUBY_VERSION_MICRO=2 -DHAS_RB_TIME_TIMESPEC=0 -DHAS_ENCODING_SUPPORT=1 -DHAS_NANO_TIME=1 -DHAS_RSTRUCT=1 -DHAS_IVAR_HELPERS=1 -DHAS_EXCEPTION_MAGIC=0 -DHAS_PROC_WITH_BLOCK=1 -DHAS_TOP_LEVEL_ST_H=0 -DSAFE_CACHE -Wall -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o cache8.o -c cache8.c
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_TYPE=ruby -DRUBY_RUBY -DRUBY_VERSION=1.9.2 -DRUBY_VERSION_MAJOR=1 -DRUBY_VERSION_MINOR=9 -DRUBY_VERSION_MICRO=2 -DHAS_RB_TIME_TIMESPEC=0 -DHAS_ENCODING_SUPPORT=1 -DHAS_NANO_TIME=1 -DHAS_RSTRUCT=1 -DHAS_IVAR_HELPERS=1 -DHAS_EXCEPTION_MAGIC=0 -DHAS_PROC_WITH_BLOCK=1 -DHAS_TOP_LEVEL_ST_H=0 -DSAFE_CACHE -Wall -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o dump.o -c dump.c
In file included from c:/Ruby192/include/ruby-1.9.1/ruby/defines.h:205:0,
from c:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:74,
from c:/Ruby192/include/ruby-1.9.1/ruby.h:32,
from oj.h:43,
from dump.c:39:
c:/Ruby192/include/ruby-1.9.1/ruby/win32.h:272:12: error: conflicting types for 'gettimeofday'
c:\devkit\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/sys/time.h:39:29: note: previous declaration of 'gettimeofday' was here
In file included from c:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:1326:0,
from c:/Ruby192/include/ruby-1.9.1/ruby.h:32,
from oj.h:43,
from dump.c:39:
c:/Ruby192/include/ruby-1.9.1/ruby/missing.h:42:8: error: redefinition of 'struct timezone'
c:\devkit\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/sys/time.h:26:8: note: originally defined here
In file included from dump.c:39:0:
oj.h:50:21: fatal error: pthread.h: No such file or directory
compilation terminated.
make: *** [dump.o] Error 1
I am running windows 7 x64, ruby 1.92, rails 3.1.
Any idea how can I install the oj gem?
Thanks
New release from OJ fixed the windows problems.
I installed OJ 1.4.3

Ruby - Gem - mysql - Failed to build gem native extension

since two days I'm facing a problem I can't solve. I'm trying to install redmine on a debian machine. When it comes to installation for the gem mysql it fails. I don't know what to do anymore. My last instance is your help.
Error
root#host:~# gem1.8 install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** 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=/usr/bin/ruby1.8
--with-mysql-config
--without-mysql-config
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
What I've tried
Installing packages by instruction: http://wiki.rubyonrails.org/database-support/mysql#linux_ubuntu
installing with mysql_config parameter
root#host:~# find / -name mysql_config
/usr/bin/mysql_config
root#host:~# gem1.8 install mysql -- --with-mysql-config=/usr/bin/mysql_config
System
user#host:~# uname -a
Linux www.example.org 2.6.18-028stab070.4 #1 SMP Tue Aug 17 18:32:47 MSD 2010 x86_64 GNU/Linux
root#s15428277:~# aptitude search '~i (mysql|ruby)|mysql.*dev'
i A libdbd-mysql-perl - A Perl5 database interface to the MySQL database
p libghc6-hsql-mysql-dev - Multi-Database Interface System for Haskell
p libgnademysql-dev - GNat Ada Database Environment - MySQL programming interface
p liblua5.1-sql-mysql-dev - luasql development files for the lua language version 5.1
i libmysql++-dev - mysql C++ library bindings (development)
i A libmysql++2c2a - mysql C++ library bindings (runtime)
p libmysql-ocaml-dev - OCaml bindings for MySql
v libmysqlclient-dev -
i libmysqlclient15-dev - MySQL database development files
i A libmysqlclient15off - MySQL database client library
i libopenssl-ruby1.8 - OpenSSL interface for Ruby 1.8
i A libreadline-ruby1.8 - Readline interface for Ruby 1.8
i A libruby1.8 - Libraries necessary to run Ruby 1.8
i libsqlite3-ruby1.8 - SQLite3 interface for Ruby 1.8
i A mysql-client-5.0 - MySQL database client binaries
i A mysql-common - MySQL database common files
i mysql-server - MySQL database server (metapackage depending on the latest version)
i A mysql-server-5.0 - MySQL database server binaries
i ruby1.8 - Interpreter of object-oriented scripting language Ruby 1.8
i ruby1.8-dev - Header files for compiling extension modules for the Ruby 1.8
root#host:~# gem1.8 --version
1.3.7
root#host:~# ruby1.8 --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
Files
mkmf.log
have_func: checking for mysql_ssl_set()... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))mysql_ssl_set; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { mysql_ssl_set(); return 0; }
/* end */
--------------------
have_func: checking for rb_str_set_len()... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_str_set_len; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { rb_str_set_len(); return 0; }
/* end */
--------------------
have_func: checking for rb_thread_start_timer()... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_thread_start_timer; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { rb_thread_start_timer(); return 0; }
/* end */
--------------------
have_header: checking for mysql.h... -------------------- no
"cc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include
/* end */
--------------------
have_header: checking for mysql/mysql.h... -------------------- no
"cc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include
/* end */
--------------------
It looks like you are on the right track. Even though you appear to have the mysql libraries installed, you need to ensure that the MySQL development header files and their dependencies are fully installed in order for the MySQL gem to be compiled.
Try:
sudo apt-get install mysql-dev
And then:
sudo gem install mysql --
--with-mysql-config=/usr/local/mysql/bin/mysql_config
Clearly, the exact command depends upon where the mysql-dev files are installed.
I had the same problem.
The solution for me was to install ruby-dev.
Maybe it helps somebody else, I see you've already solved your porblem.