* guile-pg @ 2002-11-26 13:32 David Pirotte 2002-11-27 2:07 ` guile-pg Christopher Cramer 0 siblings, 1 reply; 9+ messages in thread From: David Pirotte @ 2002-11-26 13:32 UTC (permalink / raw) Hello, Sorry to bother this list with guile-pg problems, but the guile-pg list is not accepting my posting (even though I registered) Thanks to read and answer me asap, I really need to get this work as soon as possible. I was trying to compile guile-pg latest version, plus the patch of tth, against postgres-7.2.3, but it did not work, here is some info: - guile-1.6.0 - postgresql-7.2.3 - gcc-3.2 - guile-pg-0.07 - guile-pg-0.07-0.07ttn4.diff.gz patch applied ==> guile-pg-0.07ttn4 thanks a lot for some hints, david ;; -- ./configure --with-libpq=/usr/local/pgsql david@faust:/usr/local/src/guile/guile-pg-0.07ttn4 11 $ make make all-recursive make[1]: Entering directory `/usr/local/src/guile/guile-pg-0.07ttn4' Making all in scm make[2]: Entering directory `/usr/local/src/guile/guile-pg-0.07ttn4/scm' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/src/guile/guile-pg-0.07ttn4/scm' Making all in doc make[2]: Entering directory `/usr/local/src/guile/guile-pg-0.07ttn4/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/src/guile/guile-pg-0.07ttn4/doc' Making all in test make[2]: Entering directory `/usr/local/src/guile/guile-pg-0.07ttn4/test' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/src/guile/guile-pg-0.07ttn4/test' make[2]: Entering directory `/usr/local/src/guile/guile-pg-0.07ttn4' /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I/usr/local/pgsql/include -g -O2 -Wall -Wmissing-prototypes -c libpostgres.c mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I/usr/local/pgsql/include -g -O2 -Wall -Wmissing-prototype s -c libpostgres.c -fPIC -DPIC -o .libs/libpostgres.lo cc1: warning: changing search order for system directory "/usr/local/include" cc1: warning: as it has already been specified as a non-system directory libpostgres.c:40:15: c.h: No such file or directory libpostgres.c: In function `sec_p': libpostgres.c:107: warning: comparison between pointer and integer libpostgres.c: In function `ser_p': libpostgres.c:184: warning: comparison between pointer and integer make[2]: *** [libpostgres.lo] Error 1 make[2]: Leaving directory `/usr/local/src/guile/guile-pg-0.07ttn4' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/guile/guile-pg-0.07ttn4' make: *** [all-recursive-am] Error 2 david@faust:/usr/local/src/guile/guile-pg-0.07ttn4 12 $ _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-26 13:32 guile-pg David Pirotte @ 2002-11-27 2:07 ` Christopher Cramer 2002-11-26 17:40 ` guile-pg David Pirotte 0 siblings, 1 reply; 9+ messages in thread From: Christopher Cramer @ 2002-11-27 2:07 UTC (permalink / raw) Cc: guile-user On Tue, Nov 26, 2002 at 08:32:03AM -0500, David Pirotte wrote: > Sorry to bother this list with guile-pg problems, but the guile-pg > list is not accepting my posting (even though I registered) I've heard that the guile-pg authors have disappeared. > libpostgres.c:40:15: c.h: No such file or directory I haven't looked too closely at the patch, but I think if you just remove this line it should be fine. (I have no idea what c.h is supposed to be.) If that doesn't work, you could try my patch, which I've been using for a long time with no problems. (Although I've never used large objects at all, so that part may be broken.) diff -ur guile-pg-0.07/Makefile.am guile-pg-0.07-new/Makefile.am --- guile-pg-0.07/Makefile.am Fri Jun 2 02:52:34 2000 +++ guile-pg-0.07-new/Makefile.am Sat Jul 20 19:04:00 2002 @@ -43,7 +43,7 @@ SUFFIXES = .x .c.x: - guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ + guile-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) > $@ ## Add -MG to make the .x magic work with auto-dep code. MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) diff -ur guile-pg-0.07/libpostgres.c guile-pg-0.07-new/libpostgres.c --- guile-pg-0.07/libpostgres.c Tue Jun 20 04:41:51 2000 +++ guile-pg-0.07-new/libpostgres.c Sat Jul 20 22:02:05 2002 @@ -37,7 +37,6 @@ #include <guile/gh.h> #include <libpq-fe.h> -#include <postgres.h> #include <libpq/libpq-fs.h> #include <libpostgres.h> @@ -1151,14 +1150,14 @@ #include <libpostgres.x> - scm_sysintern("PGRES_TUPLES_OK", SCM_MAKINUM(PGRES_TUPLES_OK)); - scm_sysintern("PGRES_COMMAND_OK", SCM_MAKINUM(PGRES_COMMAND_OK)); - scm_sysintern("PGRES_EMPTY_QUERY", SCM_MAKINUM(PGRES_EMPTY_QUERY)); - scm_sysintern("PGRES_COPY_OUT", SCM_MAKINUM(PGRES_COPY_OUT)); - scm_sysintern("PGRES_COPY_IN", SCM_MAKINUM(PGRES_COPY_IN)); - scm_sysintern("PGRES_BAD_RESPONSE", SCM_MAKINUM(PGRES_BAD_RESPONSE)); - scm_sysintern("PGRES_NONFATAL_ERROR", SCM_MAKINUM(PGRES_NONFATAL_ERROR)); - scm_sysintern("PGRES_FATAL_ERROR", SCM_MAKINUM(PGRES_FATAL_ERROR)); + scm_c_define("PGRES_TUPLES_OK", SCM_MAKINUM(PGRES_TUPLES_OK)); + scm_c_define("PGRES_COMMAND_OK", SCM_MAKINUM(PGRES_COMMAND_OK)); + scm_c_define("PGRES_EMPTY_QUERY", SCM_MAKINUM(PGRES_EMPTY_QUERY)); + scm_c_define("PGRES_COPY_OUT", SCM_MAKINUM(PGRES_COPY_OUT)); + scm_c_define("PGRES_COPY_IN", SCM_MAKINUM(PGRES_COPY_IN)); + scm_c_define("PGRES_BAD_RESPONSE", SCM_MAKINUM(PGRES_BAD_RESPONSE)); + scm_c_define("PGRES_NONFATAL_ERROR", SCM_MAKINUM(PGRES_NONFATAL_ERROR)); + scm_c_define("PGRES_FATAL_ERROR", SCM_MAKINUM(PGRES_FATAL_ERROR)); init_libpostgres_lo(); diff -ur guile-pg-0.07/libpostgres_lo.c guile-pg-0.07-new/libpostgres_lo.c --- guile-pg-0.07/libpostgres_lo.c Fri Jun 2 05:14:55 2000 +++ guile-pg-0.07-new/libpostgres_lo.c Sat Jul 20 20:05:16 2002 @@ -197,7 +197,7 @@ SCM_SETSTREAM (port, (SCM) lobp); pt->rw_random = 1; - if (SCM_INPORTP (port)) { + if (SCM_INPUT_PORT_P (port)) { pt->read_buf = malloc (LOB_BUFLEN); if (pt->read_buf == NULL) scm_memory_error (s_lob_mklobport); @@ -207,7 +207,7 @@ pt->read_buf = ((unsigned char *) pt->read_pos) = pt->read_end = &pt->shortbuf; pt->read_buf_size = 1; } - if (SCM_OUTPORTP (port)) { + if (SCM_OUTPUT_PORT_P (port)) { pt->write_buf = malloc (LOB_BUFLEN); if (pt->write_buf == NULL) scm_memory_error (s_lob_mklobport); @@ -219,7 +219,7 @@ } pt->write_end = pt->write_buf + pt->write_buf_size; - SCM_SETCAR (port, SCM_CAR (port) & ~SCM_BUF0); + SCM_SET_CELL_WORD_0 (port, SCM_CELL_WORD_0 (port) & ~SCM_BUF0); SCM_ALLOW_INTS; @@ -315,7 +315,7 @@ } pt->write_pos = pt->write_buf + remaining; } - if (!terminating) + if (1 /*!terminating*/) scm_syserror ("lob_flush"); else { const char *msg = "Error: could not flush large object file descriptor "; @@ -445,7 +445,7 @@ lob_flush (port); } /* handle line buffering. */ - if ((SCM_CAR (port) & SCM_BUFLINE) && memchr (data, '\n', size)) + if ((SCM_CELL_WORD_0 (port) & SCM_BUFLINE) && memchr (data, '\n', size)) lob_flush (port); } } diff -ur guile-pg-0.07/scm/postgres.scm.in guile-pg-0.07-new/scm/postgres.scm.in --- guile-pg-0.07/scm/postgres.scm.in Wed May 31 04:59:07 2000 +++ guile-pg-0.07-new/scm/postgres.scm.in Sat Jul 20 21:11:43 2002 @@ -20,10 +20,56 @@ ;; Load the C interface functions -(if (not (defined? 'pg-guile-pg-loaded)) ;; Unless already loaded (static) ... - (dynamic-call "init_postgres" (dynamic-link "libpostgres.so"))) +(define-module (database postgres) + :export ( + PGRES_TUPLES_OK + PGRES_COMMAND_OK + PGRES_EMPTY_QUERY + PGRES_COPY_OUT + PGRES_COPY_IN + PGRES_BAD_RESPONSE + PGRES_NONFATAL_ERROR + PGRES_FATAL_ERROR + pg-connectdb + pg-reset + pg-get-client-data + pg-set-client-data! + pg-exec + pg-error-message + pg-get-db + pg-set-db + pg-get-user + pg-get-pass + pg-get-host + pg-get-port + pg-get-tty + pg-get-options + pg-get-connection + pg-backend-pid + pg-result-status + pg-ntuples + pg-nfields + pg-cmdtuples + pg-oid-status + pg-oid-value + pg-fname + pg-fnumber + pg-ftype + pg-fsize + pg-getvalue + pg-getlength + pg-getisnull + pg-binary-tuples? + pg-fmod + pg-guile-pg-version + pg-getline + pg-putline + pg-endcopy + pg-trace + pg-untrace)) -(define-module (database postgres)) +(if (not (defined? 'pg-guile-pg-loaded)) ;; Unless already loaded (static) ... + (load-extension "libpostgres" "init_postgres")) (define-public (pg-guile-pg-module-config-stamp) "@GUILE_PG_STAMP@") (define-public (pg-guile-pg-module-version) "@VERSION@") -- Christopher Cramer <crayc@pyro.net> <http://www.pyro.net/~crayc/> "Gore would have finished ahead by the barest of margins had he pursued and gained a complete statewide recount." -- Associated Press, 9/6/2002 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-27 2:07 ` guile-pg Christopher Cramer @ 2002-11-26 17:40 ` David Pirotte 2002-11-27 20:57 ` guile-pg Christopher Cramer 0 siblings, 1 reply; 9+ messages in thread From: David Pirotte @ 2002-11-26 17:40 UTC (permalink / raw) Cc: guile-user Hi Christopher, thank you for your quick answer. removing the 'include c.h' did not work so I decided to go for your patch > If that doesn't work, you could try my patch, which I've been using for > a long time with no problems. (Although I've never used large objects > at all, so that part may be broken.) the patch applies fine and subsequent configuration also, but when I type make, I have the following message ;; -- ./configure --with-libpq=/usr/local/pgsql ... david@faust:/usr/local/src/guile/guile-pg-0.07 74 $ make cd . && automake --gnu --include-deps Makefile configure.in:24: your implementation of AM_INIT_AUTOMAKE comes from an configure.in:24: old Automake version. You should recreate aclocal.m4 configure.in:24: with aclocal and run automake again. Makefile.am: required file `./compile' not found Makefile.am: required file `./depcomp' not found /usr/share/automake-1.6/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.6/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.6/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.6/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.6/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.6/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.6/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL make: *** [Makefile.in] Error 1 ;; -- then, not knowing anything about these programs, I tried the following david@faust:/usr/local/src/guile/guile-pg-0.07 75 $ aclocal david@faust:/usr/local/src/guile/guile-pg-0.07 76 $ automake Makefile.am: required file `./compile' not found Makefile.am: required file `./depcomp' not found ;; -- my automake is the following david@faust:/usr/alto/staff/david 2 $ automake --version automake (GNU automake) 1.6.3 ==> So, does anybody know what commands and their sequence (like before ./configure I suppose) to bring the auto and conf files uptodate? So many thanks David _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-26 17:40 ` guile-pg David Pirotte @ 2002-11-27 20:57 ` Christopher Cramer 2002-11-27 11:54 ` guile-pg David Pirotte 0 siblings, 1 reply; 9+ messages in thread From: Christopher Cramer @ 2002-11-27 20:57 UTC (permalink / raw) Cc: guile-user On Tue, Nov 26, 2002 at 12:40:36PM -0500, David Pirotte wrote: > david@faust:/usr/alto/staff/david 2 $ automake --version > automake (GNU automake) 1.6.3 Oh, I think you need automake 1.4 for guile-pg. -- Christopher Cramer <crayc@pyro.net> <http://www.pyro.net/~crayc/> "Gore would have finished ahead by the barest of margins had he pursued and gained a complete statewide recount." -- Associated Press, 9/6/2002 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-27 20:57 ` guile-pg Christopher Cramer @ 2002-11-27 11:54 ` David Pirotte 2002-11-28 0:24 ` guile-pg Thien-Thi Nguyen 2002-11-28 2:29 ` guile-pg Christopher Cramer 0 siblings, 2 replies; 9+ messages in thread From: David Pirotte @ 2002-11-27 11:54 UTC (permalink / raw) Cc: guile-user On Wed, 27 Nov 2002 14:57:38 -0600 Christopher Cramer <crayc@pyro.net> wrote: > On Tue, Nov 26, 2002 at 12:40:36PM -0500, David Pirotte wrote: > > david@faust:/usr/alto/staff/david 2 $ automake --version > > automake (GNU automake) 1.6.3 > > Oh, I think you need automake 1.4 for guile-pg. But I am using SuSE 8.1, and really would prefer not to interfere with these kind of programs, especially not to downgrade them. Is there a way to rather upgrade guile-pg to cope with the new automake, autoconf, can anybody tell me how to? th, david _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-27 11:54 ` guile-pg David Pirotte @ 2002-11-28 0:24 ` Thien-Thi Nguyen 2002-11-30 6:22 ` guile-pg David Pirotte 2002-11-28 2:29 ` guile-pg Christopher Cramer 1 sibling, 1 reply; 9+ messages in thread From: Thien-Thi Nguyen @ 2002-11-28 0:24 UTC (permalink / raw) Cc: crayc, guile-user From: David Pirotte <david@altosw.be> Date: Wed, 27 Nov 2002 06:54:51 -0500 Is there a way to rather upgrade guile-pg to cope with the new automake, autoconf, can anybody tell me how to? yes. but maybe it's easier to read about that somewhere else and in the meantime use (and improve) http://www.glug.org/alt/guile-pg-0.07ttn6.tar.gz which represents a departure from the minimal-change (patch) approach taken for 0.07ttn[1-5]; everything has been spiffed in one way or another. co-unofficial-maintainer wannabes please see file autogen.sh and associated auto* tools documentation. note that i use postgresql 7.1.3; patches to make guile-pg compatable w/ later versions of postgresql welcome. on the other hand, patches to make guile-pg compatible w/ later versions of guile should be sent to the guile maintainers. thi _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-28 0:24 ` guile-pg Thien-Thi Nguyen @ 2002-11-30 6:22 ` David Pirotte 2002-11-30 8:47 ` guile-pg Thien-Thi Nguyen 0 siblings, 1 reply; 9+ messages in thread From: David Pirotte @ 2002-11-30 6:22 UTC (permalink / raw) Cc: ttn, crayc, guile-user On Wed, 27 Nov 2002 16:24:36 -0800 Thien-Thi Nguyen <ttn@giblet.glug.org> wrote: > http://www.glug.org/alt/guile-pg-0.07ttn6.tar.gz doanloaded and compiled ok, I just had to remove a line in libpostgres.c #include <c.h> > note that i use postgresql 7.1.3; patches to make guile-pg compatable w/ > later versions of postgresql welcome. on the other hand, patches to > make guile-pg compatible w/ later versions of guile should be sent to > the guile maintainers. I am using 7.2.3, and get the following error trying to load the module: david@faust:~ 6 $ guile guile> (use-modules (database postgres)) /usr/local/share/guile/database/postgres.scm:42:9: In procedure dynamic-link in expression (dynamic-link (car #)): /usr/local/share/guile/database/postgres.scm:42:9: file: "/usr/local/lib/guile-pg/0.07ttn6/libpostgres.so", message: "/usr/local/lib/guile-pg/0.07ttn6/libpostgres.so: undefined symbol: terminating" ABORT: (misc-error) Type "(backtrace)" to get more information or "(debug)" to enter the debugger. guile> I am not very helpfull, but here is where this symbol is used in guile-pg-0.07ttn6: david@faust:/usr/local/src/guile/guile-pg-0.07ttn6 29 $ cfind terminating extern int terminating; if (!terminating) ./libpostgres_lo.c david@faust:/usr/local/src/guile/guile-pg-0.07ttn6 30 $ thanks a lot for your help david _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-30 6:22 ` guile-pg David Pirotte @ 2002-11-30 8:47 ` Thien-Thi Nguyen 0 siblings, 0 replies; 9+ messages in thread From: Thien-Thi Nguyen @ 2002-11-30 8:47 UTC (permalink / raw) Cc: crayc, guile-user From: David Pirotte <david@altosw.be> Date: Sat, 30 Nov 2002 01:22:14 -0500 extern int terminating; if (!terminating) ./libpostgres_lo.c this variable can be used to control how a fd-flush failure is handled: whether to throw scm_syserror or continue after writing a message to stderr (fd 2, actually). throwing syserror is probably sufficient. to work around for now, change the line to: static int terminating = 0; keep the bug reports flowing! thi _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guile-pg 2002-11-27 11:54 ` guile-pg David Pirotte 2002-11-28 0:24 ` guile-pg Thien-Thi Nguyen @ 2002-11-28 2:29 ` Christopher Cramer 1 sibling, 0 replies; 9+ messages in thread From: Christopher Cramer @ 2002-11-28 2:29 UTC (permalink / raw) Cc: guile-user On Wed, Nov 27, 2002 at 06:54:51AM -0500, David Pirotte wrote: > Is there a way to rather upgrade guile-pg to cope with the new > automake, autoconf, can anybody tell me how to? I don't know all that much about automake. If I have more time in the future I will try to either fix guile-pg or replace it. At the moment, though, I don't have much time to spend on programming. Keep in mind that automake 1.4, 1.5, and 1.6 seem to all be incompatible with each other. Whoever is in charge of automake really screwed up, IMO. -- Christopher Cramer <crayc@pyro.net> <http://www.pyro.net/~crayc/> "Gore would have finished ahead by the barest of margins had he pursued and gained a complete statewide recount." -- Associated Press, 9/6/2002 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-11-30 8:47 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-11-26 13:32 guile-pg David Pirotte 2002-11-27 2:07 ` guile-pg Christopher Cramer 2002-11-26 17:40 ` guile-pg David Pirotte 2002-11-27 20:57 ` guile-pg Christopher Cramer 2002-11-27 11:54 ` guile-pg David Pirotte 2002-11-28 0:24 ` guile-pg Thien-Thi Nguyen 2002-11-30 6:22 ` guile-pg David Pirotte 2002-11-30 8:47 ` guile-pg Thien-Thi Nguyen 2002-11-28 2:29 ` guile-pg Christopher Cramer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).