From: Masatoshi SEKI Date: 1998-11-27T00:23:38+09:00 Subject: [ruby-list:11081] postgres-0.4.tar.gz 咳です。 postgreSQL を ruby から使いたくなって postgres-0.4.tar.gz を rubyのftpサイトのcontribからgetして試したのですが、 次の環境で構築できませんでした。 このバージョン (postgres-0.4) が古かったのでしょうか? OS: Linux 2.0.35 ruby: ruby 1.1c5(98/09/08) [i586-linux] postgreSQL: 6.3.2 (Plamo Linuxについてきた) とりあえず次のように変更して無理矢理構築してみました。 こういう変更で良いのかなぁ。 # はじめてpatch file 作った…。 --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- diff -rc postgres/Makefile.rb ../postgres/Makefile.rb *** postgres/Makefile.rb Fri Dec 12 20:12:02 1997 --- ../postgres/Makefile.rb Thu Nov 26 23:40:43 1998 *************** *** 14,19 **** --- 14,21 ---- unless have_func("gethostname") have_func("uname") end + $CFLAGS = CFLAGS unless $CFLAGS + $CFLAGS += ' ' if ENV["SOCKS_SERVER"] # test if SOCKSsocket needed if have_library("socks", "Rconnect") $CFLAGS+="-DSOCKS" *************** *** 26,32 **** $LDFLAGS = "-L/usr/local/pgsql/lib" $CFLAGS += "-I/usr/local/pgsql/include" end ! if have_library("pq", "PQsetdb") create_makefile("postgres") end end --- 28,34 ---- $LDFLAGS = "-L/usr/local/pgsql/lib" $CFLAGS += "-I/usr/local/pgsql/include" end ! if have_library("pq", "PQsetdbLogin") create_makefile("postgres") end end diff -rc postgres/postgres.c ../postgres/postgres.c *** postgres/postgres.c Fri Dec 12 20:12:02 1997 --- ../postgres/postgres.c Thu Nov 26 23:39:45 1998 *************** *** 11,17 **** ************************************************/ #include "ruby.h" ! #include "io.h" #include #include --- 11,17 ---- ************************************************/ #include "ruby.h" ! #include "rubyio.h" #include #include --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- -- せき@大田原市民