gemでインストール

ダウンロード

http://www.sqlite.org/download.htmlよりsqlite-autoconf-3071602.tar.gzをダウンロード


任意のディレクトリへ解凍する


手順

c:\>set PATH=%PATH%;C:\Ruby200-x64\DevKit\bin;C:\Ruby200-x64\DevKit\mingw\bin
 
c:\>bash
bash-3.1$ cd C:/Ruby200-x64/sqlite-autoconf-3071602
bash-3.1$ pwd
/c/Ruby200-x64/sqlite-autoconf-3071602
bash-3.1$ ./configure --prefix=D:/Tools/sqlite3
bash-3.1$ make
bash-3.1$ mkdir D:/Tools/sqlite3
bash-3.1$ make install
bash-3.1$ cp D:/Tools/sqlite3/bin/* C:/Ruby200-x64/bin
bash-3.1$ exit
 
c:\>gem install sqlite3 -- --platform=ruby --with-opt-include="D:/Tools/sqlite3/include" --with-opt-lib="D:/Tools/sqlite3/lib"
 
 



設定ログ

c:\>set PATH=%PATH%;C:\Ruby200-x64\DevKit\bin;C:\Ruby200-x64\DevKit\mingw\bin
 
c:\>bash
bash-3.1$ cd C:\Ruby200-x64\sqlite-autoconf-3071602
bash: cd: C:Ruby200-x64sqlite-autoconf-3071602: No such file or directory
bash-3.1$ cd C:/Ruby200-x64/sqlite-autoconf-3071602
bash-3.1$ pwd
/c/Ruby200-x64/sqlite-autoconf-3071602
bash-3.1$ ./configure --prefix=D:/Tools/sqlite3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for ranlib... ranlib
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by gcc... c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /usr/mingw/bin/nm
checking whether ln -s works... no, using cp -pR
checking how to recognise dependent libraries... file_magic file format pei*-i386(.*architecture: i386)?
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... no
checking dlfcn.h presence... no
checking for dlfcn.h... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking the maximum length of command line arguments... 8192
checking command to parse /usr/mingw/bin/nm output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT
checking if gcc PIC flag -DDLL_EXPORT works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT
checking if g++ PIC flag -DDLL_EXPORT works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -DDLL_EXPORT
checking if gfortran PIC flag -DDLL_EXPORT works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (c:/ruby200-x64/devkit/mingw/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for fdatasync... no
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... no
checking for gmtime_r... no
checking whether strerror_r is declared... no
checking for strerror_r... no
checking whether strerror_r returns char *... no
checking for library containing tgetent... no
checking for library containing readline... no
checking for readline... no
checking for library containing pthread_create... -lpthread
checking for library containing dlopen... no
checking for whether to support dynamic extensions... yes
checking for posix_fallocate... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfiles commands
bash-3.1$
bash-3.1$ make
if /bin/sh ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" -DPAC
KAGE_STRING=\"sqlite\ 3.7.16.2\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\
" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DH
AVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_USLEEP=1 -DHAVE_DECL_STRERROR_R=0 -I. -I.    -D_REENTRANT=1 -
DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF ".deps/sqlite3.Tpo" -c -o sqlite3.lo sqli
te3.c; \
        then mv -f ".deps/sqlite3.Tpo" ".deps/sqlite3.Plo"; else rm -f ".deps/sqlite3.Tpo"; exit 1; fi
mkdir .libs
 gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" "-DPACKAGE_STRING=\"sqlite 3.7.16.2\"" -DPACKAGE_
BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 -
DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_
STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_USLEEP=1 -DHAVE_DECL_STRERROR_R=0 -I. -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQ
LITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c  -DDLL_EXPORT -DPIC -o .libs/sqlite3.o
 gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" "-DPACKAGE_STRING=\"sqlite 3.7.16.2\"" -DPACKAGE_
BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 -
DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_
STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_USLEEP=1 -DHAVE_DECL_STRERROR_R=0 -I. -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQ
LITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c -o sqlite3.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CC --mode=link gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2   -o libs
qlite3.la -rpath D:/Tools/sqlite3/lib -no-undefined -version-info 8:6:8 sqlite3.lo  -lpthread
 
*** Warning: linker path does not have real file for library -lpthread.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libpthread and none of the candidates passed a file format test
*** using a file magic. Last file checked: c:/ruby200-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw3
2/lib//libpthread.dll.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
 
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
copying selected object files to avoid basename conflicts...
rm -fr .libs/libsqlite3.lax
mkdir .libs/libsqlite3.lax
ar cru .libs/libsqlite3.a sqlite3.o
ranlib .libs/libsqlite3.a
rm -fr .libs/libsqlite3.lax
creating libsqlite3.la
(cd .libs && rm -f libsqlite3.la && cp -pR ../libsqlite3.la libsqlite3.la)
if gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" -DPACKAGE_STRING=\"sqlite\ 3.7.16.2\" -DPACKAGE
_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE
_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_USLEEP=1 -DHAVE_DECL_STRERROR_R=0 -I. -I.    -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3
 -DSQLITE_ENABLE_RTREE -g -O2 -MT shell.o -MD -MP -MF ".deps/shell.Tpo" -c -o shell.o shell.c; \
        then mv -f ".deps/shell.Tpo" ".deps/shell.Po"; else rm -f ".deps/shell.Tpo"; exit 1; fi
/bin/sh ./libtool --tag=CC --mode=link gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2   -o sqli
te3.exe  shell.o ./libsqlite3.la  -lpthread
gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -o sqlite3.exe shell.o  ./.libs/libsqlite3.a -lpt
hread
bash-3.1$
bash-3.1$ make install
make[1]: Entering directory `/c/Ruby200-x64/sqlite-autoconf-3071602'
test -z "D:/Tools/sqlite3/lib" || mkdir -p -- "D:/Tools/sqlite3/lib"
 /bin/sh ./libtool --mode=install /usr/bin/install -c  'libsqlite3.la' 'D:/Tools/sqlite3/lib/libsqlite3.la'
/usr/bin/install -c .libs/libsqlite3.lai D:/Tools/sqlite3/lib/libsqlite3.la
/usr/bin/install -c .libs/libsqlite3.a D:/Tools/sqlite3/lib/libsqlite3.a
chmod 644 D:/Tools/sqlite3/lib/libsqlite3.a
ranlib D:/Tools/sqlite3/lib/libsqlite3.a
----------------------------------------------------------------------
Libraries have been installed in:
   D:/Tools/sqlite3/lib
 
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-LLIBDIR' linker flag
 
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "D:/Tools/sqlite3/bin" || mkdir -p -- "D:/Tools/sqlite3/bin"
  /bin/sh ./libtool --mode=install /usr/bin/install -c 'sqlite3.exe' 'D:/Tools/sqlite3/bin/sqlite3.exe'
/usr/bin/install -c sqlite3.exe D:/Tools/sqlite3/bin/sqlite3.exe
test -z "D:/Tools/sqlite3/include" || mkdir -p -- "D:/Tools/sqlite3/include"
 /usr/bin/install -c -m 644 'sqlite3.h' 'D:/Tools/sqlite3/include/sqlite3.h'
 /usr/bin/install -c -m 644 'sqlite3ext.h' 'D:/Tools/sqlite3/include/sqlite3ext.h'
test -z "D:/Tools/sqlite3/share/man/man1" || mkdir -p -- "D:/Tools/sqlite3/share/man/man1"
 /usr/bin/install -c -m 644 './sqlite3.1' 'D:/Tools/sqlite3/share/man/man1/sqlite3.1'
test -z "D:/Tools/sqlite3/lib/pkgconfig" || mkdir -p -- "D:/Tools/sqlite3/lib/pkgconfig"
 /usr/bin/install -c -m 644 'sqlite3.pc' 'D:/Tools/sqlite3/lib/pkgconfig/sqlite3.pc'
make[1]: Leaving directory `/c/Ruby200-x64/sqlite-autoconf-3071602'
bash-3.1$
bash-3.1$ cp D:/Tools/sqlite3/bin/* C:/Ruby200-x64/bin
bash-3.1$ exit
 
c:\>gem install sqlite3 -- --platform=ruby --with-opt-include="D:/Tools/sqlite3/include" --with-opt-lib="D:/Tools/sqlite3/lib"
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--platform=ruby --with-opt-include=D:/Tools/sqlite3/include --with-opt-lib=D:/Tools/sqlite3/lib'
This could take a while...
Successfully installed sqlite3-1.3.7
Parsing documentation for sqlite3-1.3.7
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/sqlite3/sqlite3_native.so, skipping
Installing ri documentation for sqlite3-1.3.7
1 gem installed
 
c:\>
 
c:\>ruby -e "require 'sqlite3'"
 
c:\>
 
 




最終更新:2013年05月18日 11:20