Forum OpenACS Q&A: Can't get pltcl added to postgresql... (rpm's)

I get the following:
bash-2.04$ createlang pltcl acs
ERROR:  Load of file /usr/lib/pgsql/
failed: /usr/lib/pgsql/ undefined symbol: Tcl_CreateSlave
createlang: language installation failed

I've installed:
postgresql-7.1.3-4.i386.rpm          postgresql-perl-7.1.3-4.i386.rpm
postgresql-contrib-7.1.3-4.i386.rpm  postgresql-python-7.1.3-
postgresql-devel-7.1.3-4.i386.rpm    postgresql-server-7.1.3-
postgresql-jdbc-7.1.3-4.i386.rpm    postgresql-tcl-7.1.3-4.i386.rpm
postgresql-libs-7.1.3-4.i386.rpm    postgresql-tk-7.1.3-4.i386.rpm

Besides others.
Why won't it let me add TCL as a language?
This happened during the openacs-3.2.5-2.noarch.rpm
installation, so I tried it manually.
I checked the postgresql lists and site, and even search the internet
abroad and couldn't find anything useful.
This is a clean setup, so I even tried uninstalling an reinstalling
postgresql, but no difference.
The Following happens if I rerun the install (after uninstalling
openacs from failed initialization), blowing away the db files really
didn't make any difference, it's all the same errors:
rpm -i openacs-3.2.5-2.noarch.rpm
Postgresql user acs already exists
ACS geographical tables already loaded in database acs
ACS data model already loaded
ERROR:  Load of file /usr/lib/pgsql/
failed: /usr/lib/pgsql/ undefined symbol: Tcl_CreateSlave
createlang: language installation failed
ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'pltcl'.
        Recognized languages are sql, C, internal, and created
procedural languages.

I'm on Redhat 7.1 with updates.[root@acs openacs]# env | grep LD
[root@acs openacs]# env | grep PG

Any help is very much appreciated.

I also had trouble installing plTCL, and the problem turned out to be that the PGLIB environment variable wasn't getting exported since I wasn't doing a full su - into the postgres user. However, this problem generated a different error message than you're getting, so I'm not sure how relevant this is to your situation.

Anyway, you might make certain that you're actually the proper user with all the proper env vars set properly while you try to load the lang. Good luck!

I'm sorry you are having trouble installing OpenACS from RPMs on Red Hat 7.1. This looks more like a Postgresql issue than an OpenACS one.

Please try not to randomly install lots of stuff which you think might sort of be related... just follow the instructions, carefully. They work here, and they have been reported to work for some others. I just took the time to clean out OpenACS and PG from my RH 7.1 test machine and tried out the instructions once more... they worked.

By not following the instructions, you diverge from what has been tested, and so increase your risk of difficulties, and make it quite a bit harder for us to help you.

The Postgresql RPMs that you should be using for OpenACS under RH 7.1 are those listed in whichfilesdoineed.html. And no others!

Currently the public version of that document recommends PG 7.1.2-5PGDG RPMs for RH 7.1. I have sucessfully got things to work with PG 7.1.3-1PGDG RPMs also, but I have certainly not tried any PG 7.1.3-4 RPMs and do not know where you got them from. I do not see any such RPMs on the PG FTP site or its mirrors. I see some at Red Hat mirrors, as part of their bleeding edge 'rawhide' code -- I hope you are not trying to use those?? If you are, most likely you should post a bug report to Red Hat Bugzilla about your issues with postgresql-tcl and createlang.

I suggest that you use exactly the RPMs I recommend for RH 7.1, and try again. I suspect things will go a lot more smoothly when you do that. Even if they don't, I will be in a much better position to help you than if you use some other PG RPMs from some other source I know almost nothing about.

Lastly, the RPMs I am using (the official ones from the Postgresql Development Group, aka PGDG) do not mess with LD_LIBRARY_PATH and I suggest that you don't mess with it either, unless you are very sure you fully understand what it does. Those sort of tricks should not be needed if you use the recommended set of RPMs.

Now I'm having Hawke's problem as well on a fresh RedHat 7.2.  This
occurs both on the postgres rpm's included with the RedHat distro as
well as compiled rpms from srpms provided on the postgres site.

I've tried to force install postgresql-tcl rpms fro redhat 7.1 and I
can now do a 'createlang pltcl dbname', though I know this is not
the correct solution.

Hawke, what version of Tcl do you have installed?

I'll try a couple more things and if it doesn't add up then I'm
trying the postgres sources. Anybody there got createlang pltcl on
RedHat 7.2 working?

Posted by Hawke R on
Actually the problem I had was the version, I was installing the rawhide versions (foolish I know), and that's what was giving me grief.

When I installed the full stable versions of postgres, then everything went smoothly.

FOr 7.2 I wonder if it's using those rawhide versions and thus it's going to have to be worked out anyway now that 7.2 is out?

Sorry I can't be more help than that, maybe you could try installing a slightly older version of postgresql?

Good luck,