Forum OpenACS Development: Re: Error on OS X using

Posted by Gustaf Neumann on
The first one seems to be a problem of homebrew. If you use the preconfigured versions from MacPorts, everything is fine. Are you using the postgres client and server from homebrew? if yes, this is a homebrew problem and should be reported to the homebrew maintainers.

The problem with tDOM is an old one, and was fixed 7 years ago [1]. Unfortunately, the release strategy of tDOM is very slow. So far, i was reluctant to use the tip verison from github in the script, but that gives unreliable results when new commits are added. The git repo seems outdated, but fossil archive is not better in this regard.

Maybe i'll find some time to work on a portfile for mac ports for OpenACS and its needed components.


Posted by Gustaf Neumann on
To address the tdom problem, i've changed the install script to use a date-based git release (due to lack of a proper tag in the tdom repos).
Posted by Dave Bauer on
Gustaf, do you know how Naviserver gets the path to the PostgreSQL socket? I use the home brew version of PostgreSQL every day and it seems to work fine with other applications, so somewhere there is a difference in how it connects.

I'll see if I can look into this further myself as well, but I thought you might know this type of thing.

Thanks for updating the tdom install. I found it simple enough to change but if there is a good way to automate it, that works, even better.

Posted by Gustaf Neumann on
NaviServer does not do anything for specifying the socket, it just uses the defaults from the postgres client library.
Posted by Dave Bauer on
Thanks for confirming that. I'll have to figure out where it gets that information.

I don't seem to be able to find more than one version of psql. I did

sudo su -
cd /
find . -type f -name "psql"

and only the home brew install of psql was found.

Is there another way I can look for another postgresql install? I am running OS X 10.9.5 Mavericks.

next I looked at the postgresql install script that builds postgresql

I don't see any configuration that changes the default socket directory. Presumably the Naviserver database driver is connecting to a misconfigured library? The socket is definitely in /tmp/.s.PGSQL.5432 and that is the default setting for Postgresql, from what I can find.

Any other ideas where to look? I'd like to be able to consistenly install it correctly, and if possible find the home brew postgresql install script, but I don't see where this is changed when postgresql is compiled.

Posted by Michael Aram on
Hello Dave,

IIRC, when compiling PG manually the default location of the socket is in /tmp/.s.PGSQL.5432. When using PG from the distribution, it is somewhere else.

Anyhow, when I install OpenACS, I typically use a wrapper script for starting NaviServer, which includes the PATH to PG. To be honest, I dont know if this is (still) really needed, but maybe it helps?

function install_nsd_pg {
# Add wrapper script
local NSD_PREFIX=$1
local PG_VERSION=$2
local PG_PREFIX=$3

cat < ${NSD_PREFIX}/bin/nsd-pg${PG_VERSION}
export PATH=\$PATH:${PG_PREFIX}/bin
ulimit -c unlimited
exec ${NSD_PREFIX}/bin/nsd \$*
chmod 755 ${NSD_PREFIX}/bin/nsd-pg${PG_VERSION}
# Set vars as needed....