From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.devel Subject: Re: guile-gnome-0 - guile-1.6.8-6.3 - random crash Date: Sat, 10 Apr 2010 11:36:50 -0300 Organization: Alto Air Services [http://www.altosw.be/aas/] Message-ID: <20100410113650.229f39ed@rascar> References: <20100317170918.0a21c8be@rascar> <20100408150624.0534a579@rascar> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/ahrv7OEMp8bXfix_ZxaKCNh" X-Trace: dough.gmane.org 1270911043 15270 80.91.229.12 (10 Apr 2010 14:50:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 10 Apr 2010 14:50:43 +0000 (UTC) Cc: Thien-Thi Nguyen , guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Apr 10 16:50:41 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O0c1A-00055k-1H for guile-devel@m.gmane.org; Sat, 10 Apr 2010 16:50:40 +0200 Original-Received: from localhost ([127.0.0.1]:44617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0c19-0006ne-I8 for guile-devel@m.gmane.org; Sat, 10 Apr 2010 10:50:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0c0h-0006Vn-HP for guile-devel@gnu.org; Sat, 10 Apr 2010 10:50:11 -0400 Original-Received: from [140.186.70.92] (port=40486 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0c0a-0006GN-GS for guile-devel@gnu.org; Sat, 10 Apr 2010 10:50:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0bnt-0008Ep-Q4 for guile-devel@gnu.org; Sat, 10 Apr 2010 10:37:00 -0400 Original-Received: from maximusconfessor.all2all.org ([62.58.108.13]:51754) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0bnt-0008Ea-DQ for guile-devel@gnu.org; Sat, 10 Apr 2010 10:36:57 -0400 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 17016A04C0F7; Sat, 10 Apr 2010 16:36:56 +0200 (CEST) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id JRVNjqddTiOT; Sat, 10 Apr 2010 16:27:36 +0200 (CEST) Original-Received: from rascar (unknown [189.122.81.40]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 51BFBA04C0FB; Sat, 10 Apr 2010 16:36:52 +0200 (CEST) In-Reply-To: X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.9; i486-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10186 Archived-At: --MP_/ahrv7OEMp8bXfix_ZxaKCNh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline forgot to attach postgres.scm ... Le Thu, 08 Apr 2010 20:53:17 +0200, Andy Wingo a =C3=A9crit : > Hi David, >=20 > I'm happy to help, and glad to hear things are going OK. You probably > have the largest guile-gnome-using apps out there... Also, one of these > three lists is probably enough ;) :-) left guile-devel only this time > On Thu 08 Apr 2010 20:06, David Pirotte writes: > ... > I just downloaded > http://vychodil.inf.upol.cz/research/development/gtrees/download/gtrees-0= .5-alpha.tar.bz2, > and it seems to compile fine against 2.0. I did a (load-extension > "./libgtrees" "define_gtrees_module") and that worked, and then > (use-modules (gtrees-module)) and that worked too. Yes. Just made things working both with guile-1.6 and guile-1.8 [on the same machine I mean], by changing the module definition as this [if others would= like to do so...]: ;; -- (define-module (struct gtrees)) (let ((ef-ver (string->symbol (effective-version)))) (case ef-ver ((#{1.6}#) (dynamic-call "init_gtrees_module" (dynamic-link "/usr/local/lib/gtrees-0.3/libgtrees.so"))) (else (dynamic-call "init_gtrees_module" (dynamic-link "/usr/local/lib/gtrees-0.5/libgtrees.so"))) )) ;; -- > Perhaps you will be able to skip 1.8 ;-) But it should work with 1.8 as w= ell. Well, as much as possible, due to the amount of work I have, I'll stick to = debian packages until I finish the application I am working on, then I'll try 2.0 = and guile-vm, I can't wait! but I have to :-( > > guile-1.8 and guile-pg, a prehistoric version which will remain so unt= il > ^^=20 > No such luck with guile-pg, it will need patches. I even tried applying > debian's patches to see if that would help, but guile-pg uses gh.h. > Copying Thien-Thi, who appears to be the upstream: what is the right > thing to do here? Get it into a project on savannah in git hosting, no? If you remember, thanks to dsmith, on xchat, I could produce a guile-pg [de= bian] package patched that works with guile-1.8 [the problem was a dependency one= : here is what I wrote to myself: ;;; ;;; Debian package [patching guile-pg-0.16] ;;; A] Getting the source cd ~/alto/admin/guile-pg apt-get build-dep guile-pg apt-get source guile-pg cd guile-pg-0.16 B] Changing the dependency towards guile-1.8 =20 cd guile-pg-0.16/debian =09 perform the following change < Build-Depends: debhelper (>> 4.0), quilt, libpq-dev, guile-1.6-dev > Build-Depends: debhelper (>> 4.0), quilt, libpq-dev, guile-1.8-dev But I also wrote something about patching libpostgres.c and .h, [postgres-7.4: the only SW that's still is not a debian package [in my dependency 'little tower'] but a manual compilation [and they are @ 8.4 no= w, so quite late on this side too ...] can't find right now but if people are interested i'll make that info avalable too, let me know. C] Then I changed the module definition [attached] ;; -- So I was wondering, in order to be as practicle as possible and save 'lost' debugging time, is it possible to install both guile-gnom0 and guile-gnome2= on the same machine ? I think I tried and didn't work, but I might be wrong. That would fantastic because I could right away porting the development I a= m doing and later on port the old apps. Cheers, David --MP_/ahrv7OEMp8bXfix_ZxaKCNh Content-Type: text/x-scheme Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=postgres.scm ;;; postgres.scm --- wrap PostgreSQL libpq ;; Guile-pg - A Guile interface to PostgreSQL ;; Copyright (C) 1999,2000,2002,2003 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; Author: Ian Grant ;; Load the C interface functions (define-module (database postgres)) (let ((ef-ver (string->symbol (effective-version)))) (case ef-ver ((#{1.6}#) (dynamic-call "init_postgres" (dynamic-link "/usr/alto/admin/guile-pg/guile-1.6/libpostgres.so"))) (else (dynamic-call "init_postgres" (dynamic-link "/usr/alto/admin/guile-pg/guile-1.8/libpostgres.so"))) )) #! (cond ;; maybe this is already done ((and (defined? 'pg-guile-pg-loaded) pg-guile-pg-loaded)) ;; use app-module loader if there ((defined? 'make-app-module-loader) ((make-app-module-loader (lambda (name) (car (list `("~A/guile-pg/0.16" ,(assq-ref %guile-build-info 'libdir))))) (lambda (name) `("lib~A" ,name)) (lambda (name) `("init_~A" ,name))) "postgres")) ;; primitive way (else (dynamic-call "init_postgres" (dynamic-link (car (list (format #f "~A/guile-pg/0.16/libpostgres.so" (assq-ref %guile-build-info 'libdir)))))))) !# (export pg-guile-pg-loaded) ; ugh (export pg-connectdb) (export pg-connection?) (export pg-setdb) (export pg-reset) (export pg-get-client-data) (export pg-set-client-data!) (export pg-exec) (export pg-result?) (export pg-error-message) (export pg-get-db) (export pg-get-user) (export pg-get-pass) (export pg-get-host) (export pg-get-port) (export pg-get-tty) (export pg-get-options) (export pg-get-connection) (export pg-backend-pid) (export pg-result-status) (export pg-ntuples) (export pg-nfields) (export pg-cmdtuples) (export pg-oid-status) (export pg-oid-value) (export pg-fname) (export pg-fnumber) (export pg-ftype) (export pg-fsize) (export pg-getvalue) (export pg-getlength) (export pg-getisnull) (export pg-binary-tuples?) (export pg-fmod) (export pg-guile-pg-version) (export pg-getline) (export pg-putline) (export pg-endcopy) (export pg-trace) (export pg-untrace) (export pg-make-print-options) (export pg-print) (export pg-lo-creat) (export pg-lo-open) (export pg-lo-unlink) (export pg-lo-get-connection) (export pg-lo-get-oid) (export pg-lo-tell) (export pg-lo-seek) (export pg-lo-read) (export pg-lo-import) (export pg-lo-export) (define-public (pg-guile-pg-module-config-stamp) "Sun Apr 15 15:55:56 UTC 2007") (define-public (pg-guile-pg-module-version) "0.16") ;; backward compatibility (not documented to encourage ;; usage of symbols in new code) ;; ;; WARNING: these will go away! (define-public PGRES_EMPTY_QUERY 'PGRES_EMPTY_QUERY) (define-public PGRES_COMMAND_OK 'PGRES_COMMAND_OK) (define-public PGRES_TUPLES_OK 'PGRES_TUPLES_OK) (define-public PGRES_COPY_OUT 'PGRES_COPY_OUT) (define-public PGRES_COPY_IN 'PGRES_COPY_IN) (define-public PGRES_BAD_RESPONSE 'PGRES_BAD_RESPONSE) (define-public PGRES_NONFATAL_ERROR 'PGRES_NONFATAL_ERROR) (define-public PGRES_FATAL_ERROR 'PGRES_FATAL_ERROR) ;;; postgres.scm ends here --MP_/ahrv7OEMp8bXfix_ZxaKCNh--