Forum OpenACS Q&A: freebsd 4.5 ports: pgdriver depending on postgres 7.3 breaks install

hello,

i'm trying to install openacs using the freebsd ports collection following the instructions at orchardlab [1].

after installing postgresql72 the installation of the pgdriver says it depends on postgres7 and thus installs postgresql version 7.3.2 which gives me the following log entry when attempting to access the acs install page:

FATAL:  The data directory was initialized by PostgreSQL version 7.2, which is not compatible with this version 7.3.2.

i have tried sofar to deinstall 7.3.2 and reinstall 7.2.4, but now i simply get the error page without any postgresql errors.

also, rather cleverly -- so i thought -- i modified the Makefile of pgdriver to make it depend on postgres72 rather than postgres7 but then the make process aborts with

Error: shared library "pq.3" does not exist

has anyone got any suggestions or pointers in the right direction?

perhaps relevant: the guide assumes that postgresql is running as user 'postgres' whereas the port-install sets it up using the user 'pgsql'. I have adjusted the start-script in /usr/local/etc/rc.d/ accordingly, but perhaps acs itself expects that the user is called 'postgres'?

thanks for your time,

kind regards,

tom lazar

[1] http://www.orchardlabs.com/library/freebsd/postgresql

Oh, jeez, whose bright idea was it to set it up with the user "pgsql"?  The PostgreSQL docs use user postgres in their examples, that's where we've picked it up from.

I have no idea why it forced an upgrade to PG 7.3, but OpenACS 4 does not yet work correctly with it due to some non-backwards compatible changes in the semantics of the "timestamp" datatype (I'm working on fixing this today, as a matter of fact)

So you really want to uninstall 7.3 and go back to 7.2.4 now.

Why doesn't a dependency on postgres7 match postgres72?  That makes no sense to me but then again, I'm old-fashioned, I just install PG from source and control my own world rather than let something like the ports system mess it up for me...

don wrote:

<blockquote>So you really want to uninstall 7.3 and go back to 7.2.4 now.
</blockquote>

first of all, thanks for the quick response!

now: i've done that already and 7.2.4 is running just fine (as user pgsql...)

at the moment i'm inclined to agree with you to forego the ports for installing postgresql and follow the instructions at openacs.org [1]

HOWEVER: these instructions don't mention anything of a pgdriver AT ALL?!

since you -- obviously -- have already successfully installed postgresql and openacs without using the ports collection, what would you suggest to do next?

again, thanks for your time!

tom

The nspostgres driver is part of the AOLserver release, as it connects AOLserver to Postgres.  That's why there's no mention of it in the Postgres documentation.

Where did you get your copy of AOLserver and the Postgres driver from?  Are they being distributed as part of the ports collection?

Don wrote:

<blockquote>The nspostgres driver is part of the AOLserver release, as it connects
AOLserver to Postgres.  That's why there's no mention of it in the >Postgres documentation.
</blockquote>

that makes sense!

<blockquote>Where did you get your copy of AOLserver and the Postgres driver
from?  Are they being distributed as part of the ports collection?
</blockquote>

exactly. that's why i'm afraid, that i'll have to deinstall all of the relevant ports and then just stick to the unix-install documentation here on openacs.

<sigh>took me five hours of work to get to here... guess it'll be at least another eight until i finally get my first installation of acs running...</sigh>

oh, well, i HAVE been warned, that "openacs is not a turn-key system"... 😉

if there's any advice you think would be useful before i start compiling away, feel free to give it 😉

thx,

t.

Tom,

I'm running OpenACS on FreeBSD 4.7, and my recommandation is to compile what you need from source, even if it may seem 'messy'. You will need gmake and libxml2, and those can be installed though the ports collection.
/usr/ports/devel/gmake
/usr/ports/textproc/libxml2

PG 7.2.4 'just compiles' when using gmake, as per the installation instructions.

aolserver3.3ad13-oacs1-beta-src.tar.gz needs a few tweaks, as some BSD specific changes are no longer needed (for 4.7). You may need them for 4.5.

./aolserver/include/Makefile.global:line 262:
- TCL8X_LIB=libtcl83g.a
+ TCL8X_LIB=libtcl8.3g.a

nssha1/nssha1.c from line 139:
/*
typedef unsigned int u_int32_t;
typedef unsigned char u_int8_t;
*/

And this patch from https://openacs.org/forums/message-view?message_id=81818

./aolserver/nsd/tclvar.c from line 221;
  if (hPtr == NULL) {
      result = TCL_ERROR;
      Tcl_AppendResult(interp, "no such key: ", argv[2], NULL);
    } else if (result == TCL_OK) {

I've got a lot more FreeBSD details if you need them.

Frank.

I should add that the last patch is platform agnostic, not FreeBSD related.
Frank wrote:
<blockquote>I'm running OpenACS on FreeBSD 4.7, and my recommandation is to
compile what you need from source, even if it may seem 'messy'.
</blockquote>

i agree. meanwhile i've upgraded the system to 4.7... had been meaning to anyway 😉

<blockquote>You will need gmake and libxml2, and those can be installed though
the ports collection.
</blockquote>

i hoped as much, thanks for confirming that.

<blockquote>PG 7.2.4 'just compiles' when using gmake, as per the
installation instructions.
</blockquote>

yes, i can confirm that, meanwhile ;)

<blockquote>aolserver3.3ad13-oacs1-beta-src.tar.gz needs a few tweaks,
as some BSD specific changes are no longer needed (for 4.7).
You may need them for 4.5.
</blockquote>

thanks for the tips. that's exactly where i'm stuck at the moment. i'm sure i'll get back to you on your offer for freebsd specific help!

n.b. this is just a test-setup using an old 200 mhz pentium. after that i'm planning to deploy it on two different 'real world' freebsd 4.7 systems and will write a "walkthrough" for installing openacs 4.6 on freebsd 4.7 (the day i'm finished with that, i'm sure freebsd 4.8 and openacs 4.7 will be released *g*)

Frank wrote:
<blockquote>I'm running OpenACS on FreeBSD 4.7, and my recommandation is to
compile what you need from source, even if it may seem 'messy'.
</blockquote>

i agree. meanwhile i've upgraded the system to 4.7... had been meaning to anyway 😉

<blockquote>You will need gmake and libxml2, and those can be installed though
the ports collection.
</blockquote>

i hoped as much, thanks for confirming that.

<blockquote>PG 7.2.4 'just compiles' when using gmake, as per the
installation instructions.
</blockquote>

yes, i can confirm that, meanwhile ;)

<blockquote>aolserver3.3ad13-oacs1-beta-src.tar.gz needs a few tweaks,
as some BSD specific changes are no longer needed (for 4.7).
You may need them for 4.5.
</blockquote>

thanks for the tips. that's exactly where i'm stuck at the moment. i'm sure i'll get back to you on your offer for freebsd specific help!

n.b. this is just a test-setup using an old 200 mhz pentium. after that i'm planning to deploy it on two different 'real world' freebsd 4.7 systems and will write a "walkthrough" for installing openacs 4.6 on freebsd 4.7 (the day i'm finished with that, i'm sure freebsd 4.8 and openacs 4.7 will be released *g*)

hi frank,

as promised, i'm getting back to you on your offer to provide more freebsd-support 😉

i've (successfully?) applied your tips to install aol-server (i get the welcome page as per the instructions).

however, when i set up a demo-server (a.k.a. birdnet) all i get on port 8000 is this:

--snip--
command "ns_db" is not enabled
    while executing
"ns_db pools"
    (procedure "db_bootstrap_set_db_type" line 72)
    invoked from within
"db_bootstrap_set_db_type database_problem"
--snap--

my guess is, that something with pgdriver went wrong. or perhaps, it has to do with this environment variable thing: the nsd-postgres startupscript in /usr/local/aolserver/bin supposedly sets

LD_LIBRARY_PATH to "/usr/local/pgsql/lib"

but somehow i recall reading, that this is not necessary under freebsd.

i feel that i'm really close to having my very first openacs site running!

any feedback?

thanks,

t.

hold your horses 😉

i just solved it myself (i'm *sooo* proud...)

reading pgdriver/makefile brought enlightenment:

cp postgres.so /usr/local/aolserver/bin/

gave me the installation-page. yippi.

yes, it was "messy". i mean, i even modified sources and makefiles and such and restarted and killed various processes a thousand times. and it took forever. but really: the feeling is *much* more rewarding, i'll readily admit to that!

like the difference in enjoying the scenery when you climbed the mountain yourself or simply took the lift 😉

so i guess, i'll be pestering this forum here soon with openacs-specific questions ;)

cheers,

tom

um, so does anyone know of a driver that will work with PostgreSQL 7.3?