[plt-scheme] Compiling SrPersist in plt-201

From: 'Richard Michael' (rmichael at fields.utoronto.ca)
Date: Wed Sep 4 20:47:47 EDT 2002

Ok, just so this goes into an archive somewhere :) , here's what I've
done:

in plt-201/src/srpersist:

  edited the Makefile:

    removed "-lmzgc" from the srpmain.so target
    made my local changes to DRIVER_MGR_LIB, LIBDIR and INCDIR

  edited srpersist.cxx:

    delete the ODBCVER checking for the #include of "sqlucode.h"

  edited srpersist.h:

    added:

      #define SQL_WCHAR              (-8)
      #define SQL_WVARCHAR           (-9)
      #define SQL_WLONGVARCHAR       (-10)
      #define SQL_C_WCHAR            SQL_WCHAR


SrPersist now builds and installs and "works" (i.e. I can add it in my
DrScheme REPL window).  I haven't made any calls to my PG database yet.

I'm now going to remove plt-201, install 202 and redo the entire process
and make sure it all still works!

> Once you get the driver manager (i|unix)ODBC, and the actual ODBC
> driver for your particular flavor of DBMS going, I bet that compiling
> SrPersist from sources is as easy as it gets.  Although, having a
> configure script, would help.  I'll try to write one.

I don't think you have to spend time worrying about it.  The docs and
Makefile are clear.  I'm new to ODBC, so I'm a little confused about the
various versions (3.x, etc.) and I was just coming off two days of
trying to sort out a free ODBC driver (which was nuts).  Paul's tip
about removing the #include for sqlucode.h and adding the necessary
defines in srpersist.h was a real help though.

> Now, since you're setup is almost exact to mine, maybe you would like
> to give SchemeQL a try (and test the support for ODBC >= 3.0, that I
> wrote with the manual on my lap, but no actual driver to test :) 
> Make sure to get the latest version (SchemeQL v. 0.04) from here:

I downloaded it two days ago when I was collecting all the requisite
software components! :)  I plan to look at it .. I want as high level an
interface as possible.

I came to SrPersist and SchemeQL after starting out with BRL.  BRL was
great, but I didn't want to run a Java servlet engine and didn't want to
get into trying to move all BRL's methods into another scheme system.  I
also wanted to be able to write CGI stuff using !#/usr/bin/foobar style stuff
(I guess scsh would have done, but I didn't look at it at the time).  I
also wanted to be able to write system scripts with the scheme that I
was learning.. that lead me to Bigloo.  Then I wanted nice HTML/XML with
all that for the CGI stuff, so I looked at LAML.  I eventually abandoned
LAML after setup woes (it didn't install easily with a non-mzscheme
system - i.e. bigloo .. I wrote the requisite methods for portability,
but the installer was troublesome).  I *finally* settled on plt, because
it seems to have pretty much everything.  I might go back to bigloo for
some stuff.  After plt, I decided all the DB work should be done as ODBC
calls for portability and further setup woes ensued.  Now all looks
well, and I think I can _start_.  :) Whew.  Of course, I'm now of the
opinion that there are too many scheme implementations.

Thanks for the book tip.

regards,
richard



Posted on the users mailing list.