Forum OpenACS Q&A: can not install Postgresql 7.2.3/4 on SUSE 8.2

Hi,

we are interested in dotLRN and OpenACS, so we downloaded the dotLRN tarball and OpenACS instructions for installation. However, we can not get Postgresql version 7.2.3 or 7.2.4 installed.
.configure does not mention any errors in the console, and ends with the lines as mentioned in the installation manual. However, make all does end with several errors (error 1 and 2), preventing installation of Postgres.

We are completely new to Linux and dotLRN/OpenACS, Postgresql, so follow the OpenACS manual to the letter.

configure does not show any errors in the console, but there are errors in the log file, like cannot find readline, ledit.

Any idea what might be wrong?

Collapse
Posted by Dirk Gomez on
Did you make && make install PostgreSQL 7.2.3/4?

Why don't you download a proper RPM?

Why don't you try the PG version shipped with Suse 8.2?

Please post the errors from the log file.

Collapse
Posted by Dirk Gomez on
See this thread. PG 7.3 is supported (simply assuming you are on PG 7.3): https://openacs.org/forums/message-view?message_id=132144
Collapse
Posted by bill kellerman on
francis,

i've had no problems running the latest postgresql (7.3.4) and I think it is now the supported version for oacs.

1. make sure postgres is not already installed on your system.  assuming it isn't...
2. try installing a postgres rpm.
3. if you really want to compile, post your error logs.  for readline errors specifically, i think you can use the command:

% configure --without-readline

what distribution of linux / version?

in the meantime, the postgresql installation docs on openacs are good, but you might also want to check postgresql.org as they will be a bit more detailed.  many times you can find that your question has already been answered by searching the forums here on openacs.org with your error message.

Collapse
Posted by Dirk Gomez on
The distribution is Suse 8.2 - and some pathnames etc are slightly different from Red Hat and Debian.
Collapse
Posted by Francis Brouns on
Hi,

thank you all for your quick responses.

The only reason we try to configure and make the PostgreSQL sources is because the OpenACS/dotLRN installation manual instructs to download the Postgresql 7.2.3 or 7.2.4 sources, make and install them.
Also the manual and the forums seem to suggest that Postgresql 7.3 is not supported for OpenACS 4.6.

Another reason is that we are complete newbies to Linux and installing applications under Linux.

We did try installing the Postgresql RPM that comes with Suse, but than stranded at the next step of the manual. Installing the RPM did not create the directories, the manual is talking about.

We would be happy to install the RPM as long as we know then how to proceed with the installation of OpenACS/dotLRN.

In the meantime, we installed Suse completely again. Ensured, we had installed the required applications, downloaded Postgresql 7.2.4 and followed the steps to configure and make the sources. The output in the console is similar to the lines mentioned in the manual, except that the make does reports errors.

I'll try to attach the outputs of the console for the configure and the make, and also the configure.log that is generated.

We searched the OpenACS and the Postgres forums on the errors we get, but did not come up with an answer.

Any pointers to get us started, are very welcome.

Thank you for your time and assistance,

Francis

Collapse
Posted by Francis Brouns on
Hi,

I don't know whether I can upload attachments to this forum, so will post some of the output here.

After a lot of checking statements, the console shows the following lines when running configure. This seems to suggest that configure has been successfull.

creating ./config.status
creating GNUmakefile
creating src/GNUmakefile
creating src/Makefile.global
creating src/backend/port/Makefile
creating src/include/pg_config.h
src/include/pg_config.h is unchanged
linking ./src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
linking ./src/backend/port/dynloader/linux.h to src/include/dynloader.h
linking ./src/include/port/linux.h to src/include/pg_config_os.h
linking ./src/makefiles/Makefile.linux to src/Makefile.port
linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s

However, the generated config.log reports the following error:

configure:7270: checking for rl_completion_append_character
configure:7285: gcc -o conftest -O2    conftest.c -lz -lcrypt -lresolv -lnsl -ldl -lm  1>&5
configure: In function `main':
configure:7281: error: `rl_completion_append_character' undeclared (first use in this function)
configure:7281: error: (Each undeclared identifier is reported only once
configure:7281: error: for each function it appears in.)
configure: failed program was:
#line 7272 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef HAVE_READLINE_READLINE_H
# include <readline/readline.h>
#elif defined(HAVE_READLINE_H)
# include <readline.h>
#endif

int main() {
rl_completion_append_character = 'x';
; return 0; }
configure:7303: checking for rl_completion_matches
configure:7303: checking for rl_filename_completion_function
configure:7358: checking for finite
configure:7367: gcc -o conftest -O2    conftest.c -lz -lcrypt -lresolv -lnsl -ldl -lm  1>&5
configure:7382: checking for sigsetjmp
configure:7391: gcc -o conftest -O2    conftest.c -lz -lcrypt -lresolv -lnsl -ldl -lm  1>&5
configure:7478: checking for optreset
configure:7516: checking test program
configure:7525: gcc -o conftest -O2    conftest.c -lz -lcrypt -lresolv -lnsl -ldl -lm  1>&5
configure:7545: checking whether long int is 64 bits
configure:7610: checking whether long long int is 64 bits
configure:7688: gcc -c -O2  conftest.c 1>&5
configure:7706: checking whether snprintf handles 'long long int' as %lld
configure:7742: gcc -o conftest -O2    conftest.c -lz -lcrypt -lresolv -lnsl -ldl -lm  1>&5
configure:7829: checking for strtoll

The make ends with the following errors:
make[3]: Leaving directory `/usr/local/src/postgresql-7.2.4/src/backend/utils'
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -Wl,-rpath,/usr/local/pgsql/lib -export-dynamic access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -lz -lcrypt -lresolv -lnsl -ldl -lm  -o postgres
commands/SUBSYS.o(.text+0x4adf): In function `DoCopy':
: undefined reference to `errno'
commands/SUBSYS.o(.text+0x4ae6): In function `DoCopy':
: undefined reference to `errno'
commands/SUBSYS.o(.text+0x4b52): In function `DoCopy':
: undefined reference to `errno'
commands/SUBSYS.o(.text+0x4b58): In function `DoCopy':
: undefined reference to `errno'
collect2: ld returned 1 exit status
make[2]: *** [postgres] Error 1
make[2]: Leaving directory `/usr/local/src/postgresql-7.2.4/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/postgresql-7.2.4/src'
make: *** [all] Error 2

Any pointers where to look for the cause of these errors are appreciated.

Thank you,

Francis

Collapse
Posted by Dirk Gomez on
Hmm, hard to say. I online have Suse 8.1 flying around somewhere.

But as I said: don't try to compile from the sources, but rather install an RPM. For that to succeed you have to uninstall the old RPM packages, get the 7.2.4 ones e.g. from sdb.suse.de or from rpmfind.net and then just install.

If you compile from scratch and are a Linux newbie, you completetely bypass RPM's nifty package management. Which means more trouble than needed

For installation it is often best to have someone around on-site. Why don't you just join us on the irc channel #openacs on the freenode network (irc.freenode.net)?

Collapse
Posted by bill kellerman on
Suse has a system management tool called yast2 that might help you out some.  You can add/remove rpm software, and should be able to reinstall postgresql.

Different linux distributions can install files in wierd places.  I don't remember suse's defaults, but one way to find out is issueing a command to look for postgresql's text-based management interface:

find /* -name psql

Someone with more linux knowledge than me might be able to tell you if you can install an rpm to a specific location?  As Dirk said, check the irc channel, they are helpful.

Collapse
Posted by Christian Eva on
Hi Francis

Just by accident found your post. Yes there is an error when you compile postgres 7.2.4 on SuSE 8.2. I had to fix a minor error, there is an include file missing in ./src/backend/commands/copy.c

this is the diff:
cjeva@sosonline:/t/tool/build/postgresql-7.2.4/src/backend/commands> diff copy.c copy.c.orig
8d7
<  * 2003-05-21 cjk: included <errno.h> as there are errors on Suse8.2 without it!
17,18d15
< #include <errno.h>
<
cjeva@sosonline:/t/tool/build/postgresql-7.2.4/src/backend/commands>

This is my configure:

configure=--prefix=/t/tool/pg724 --with-tcl --with-tclconfig=/t/tool/tcl835/lib --enable-locale --enable-multibyte

I can send you my compile script and logfiles of the compilation if you have furhter problems.

With 7.3.4 it should compile without problems.

Only if you have the Tcl installation non standard (as I have) you need some patches in some makefiles in order to properly locate tcl.h

Christian

Collapse
Posted by Francis Brouns on
Hi,

thank you for your replies. We ended up installing the RPM for Postgres 7.3.2 that comes with Suse, using Yast.

I'm still not sure yet, whether I should have installed in the path mentioned in the instruction. Sofar it seems to be working. I could make the test database.

Thank you for your suggestion to use the IRC channel (if we can find it).

Francis