Skip to content

Instantly share code, notes, and snippets.

@DHB
Last active December 14, 2015 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DHB/5067144 to your computer and use it in GitHub Desktop.
Save DHB/5067144 to your computer and use it in GitHub Desktop.
gem install mysql2
$ gem install mysql2 -- '--with-mysql-lib="h:\database\MySQL\MySQL%20Server%205.5\lib" --with-mysql-include="h:\database\MySQL\MySQL%20Serv
er%205.5\include"'
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-lib="h:\database\MySQL\MySQL%20Server%205.5\lib" --with-mysql-include="h:\database\MySQL\MySQ
L%20Server%205.5\include"'
This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
h:/Ruby200_p0/bin/ruby.exe extconf.rb --with-mysql-lib="h:\database\MySQL\MySQL%20Server%205.5\lib" --with-mysql-include="h:\database\My
SQL\MySQL%20Server%205.5\include"
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for main() in -llibmysql... 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=h:/Ruby200_p0/bin/ruby
--with-mysql-dir
--without-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/
--with-libmysqllib
--without-libmysqllib
Gem files will remain installed in h:/Ruby200_p0/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11 for inspection.
Results logged to h:/Ruby200_p0/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
gem_make.out
h:/Ruby200_p0/bin/ruby.exe extconf.rb --with-mysql-lib="h:\database\MySQL\MySQL%20Server%205.5\lib" --with-mysql-include="h:\database\MySQL\MySQL%20Server%205.5\include"
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for main() in -llibmysql... 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=h:/Ruby200_p0/bin/ruby
--with-mysql-dir
--without-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/
--with-libmysqllib
--without-libmysqllib
mkmf.log
have_func: checking for rb_thread_blocking_region()... -------------------- yes
"gcc -o conftest.exe -Ih:/Ruby200_p0/include/ruby-2.0.0/i386-mingw32 -Ih:/Ruby200_p0/include/ruby-2.0.0/ruby/backward -Ih:/Ruby200_p0/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. -Lh:/Ruby200_p0/lib -L. -lmsvcrt-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(void) {return 0;}
/* end */
"gcc -o conftest.exe -Ih:/Ruby200_p0/include/ruby-2.0.0/i386-mingw32 -Ih:/Ruby200_p0/include/ruby-2.0.0/ruby/backward -Ih:/Ruby200_p0/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. -Lh:/Ruby200_p0/lib -L. -lmsvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:9:1: warning: 'rb_thread_blocking_region' is deprecated (declared at h:/Ruby200_p0/include/ruby-2.0.0/ruby/intern.h:830) [-Wdeprecated-declarations]
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:
6: /*top*/
7: int main(void) {return 0;}
8: extern int t(void);
9: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return 0; }
/* end */
--------------------
have_func: checking for rb_wait_for_single_fd()... -------------------- yes
"gcc -o conftest.exe -Ih:/Ruby200_p0/include/ruby-2.0.0/i386-mingw32 -Ih:/Ruby200_p0/include/ruby-2.0.0/ruby/backward -Ih:/Ruby200_p0/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. -Lh:/Ruby200_p0/lib -L. -lmsvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:9:57: error: 'rb_wait_for_single_fd' undeclared (first use in this function)
conftest.c:9:57: note: each undeclared identifier is reported only once for each function it appears in
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:
6: /*top*/
7: int main(void) {return 0;}
8: extern int t(void);
9: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_wait_for_single_fd; return 0; }
/* end */
"gcc -o conftest.exe -Ih:/Ruby200_p0/include/ruby-2.0.0/i386-mingw32 -Ih:/Ruby200_p0/include/ruby-2.0.0/ruby/backward -Ih:/Ruby200_p0/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. -Lh:/Ruby200_p0/lib -L. -lmsvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:9: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: int main(void) {return 0;}
8: extern int t(void);
9: int t(void) { rb_wait_for_single_fd(); return 0; }
/* end */
--------------------
have_library: checking for main() in -llibmysql... -------------------- no
"gcc -o conftest.exe -Ih:/Ruby200_p0/include/ruby-2.0.0/i386-mingw32 -Ih:/Ruby200_p0/include/ruby-2.0.0/ruby/backward -Ih:/Ruby200_p0/include/ruby-2.0.0 -I. -Ih:\database\MySQL\MySQL%20Server%205.5\include -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. -Lh:/Ruby200_p0/lib -Lh:\database\MySQL\MySQL%20Server%205.5\lib -L. -lmsvcrt-ruby200 -llibmysql -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]
h:/ruby200_p0/devkit/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibmysql
collect2.exe: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: int main(void) {return 0;}
8: extern int t(void);
9: int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */
"gcc -o conftest.exe -Ih:/Ruby200_p0/include/ruby-2.0.0/i386-mingw32 -Ih:/Ruby200_p0/include/ruby-2.0.0/ruby/backward -Ih:/Ruby200_p0/include/ruby-2.0.0 -I. -Ih:\database\MySQL\MySQL%20Server%205.5\include -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. -Lh:/Ruby200_p0/lib -Lh:\database\MySQL\MySQL%20Server%205.5\lib -L. -lmsvcrt-ruby200 -llibmysql -lshell32 -lws2_32 -limagehlp -lshlwapi "
h:/ruby200_p0/devkit/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibmysql
collect2.exe: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: int main(void) {return 0;}
8: extern int t(void);
9: int t(void) { main(); return 0; }
/* end */
--------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment