OSDN Git Service

Update Linux and Irix FAQs
authorMarc G. Fournier <scrappy@hub.org>
Thu, 30 Jan 1997 03:55:40 +0000 (03:55 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Thu, 30 Jan 1997 03:55:40 +0000 (03:55 +0000)
From Andrew

doc/FAQ-Irix
doc/FAQ-Linux

index 55a8547..380cb01 100644 (file)
@@ -1,18 +1,18 @@
-====================================================
-Frequently Asked Questions (FAQ) for Postgres95
+=====================================================
+Frequently Asked Questions (FAQ) for PostgresSQL V6.0
 IRIX Specific
 TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
-====================================================
-last updated:           Fri Oct 25 18:40:00 BST 1996
+=====================================================
+last updated:           Wed Jan 29 21:25:00 GMT 1997
 
 current maintainer:     Andrew C.R. Martin (martin@biochem.ucl.ac.uk)
 original author:        Andrew C.R. Martin (martin@biochem.ucl.ac.uk)
 
 
 Changes in this version (* = modified, + = new, - = removed):
--0.*)   Bugs in Postgres95 V1.08
-*1.3)   What are the references in X11_LIB to libsocket and libnsl in
-        src/Makefile.global?
+*1.2)   What changes do I need to make to src/Makefile.global or
+        src/Makefile.custom?
+*1.4)   Are there any other changes I should make?
 
 This file is divided approximately as follows:
 1.*)    Installing Postgres95
@@ -45,15 +45,17 @@ Section 1:      Installing Postgres95
            support).
         b) tcl/tk (if you wish to compile pgtclsh)
 
-1.2)    What changes do I need to make to src/Makefile.global?
+1.2)    What changes do I need to make to src/Makefile.global or
+        src/Makefile.custom?
+
+        The easiest way to do this is to use the customize script in
+        the src directory.
 
         You *must* set the following variables:
                 PORTNAME=       irix5
-                IPCSDIR=        /usr/sbin
 
         You will also need to change the following to match your own
         installation:
-                SRCDIR
                 POSTGRESDIR
 
         If you switch on the USE_TCL option, you will need to set these:
@@ -71,16 +73,13 @@ Section 1:      Installing Postgres95
         src/Makefile.global?
 
         This was a problem in 1.08 (they are Sun Solaris specific). 
-        It is fixed in 1.09.
+        It is fixed in 1.09 and above.
 
 1.4)    Are there any other changes I should make?
 
         If you have installed the GNU install program (ginstall), you
-        should edit src/mk/port/postgres.mk.irix5
-        and change the line:
-                INSTALL=/usr/bin/X11/bsdinst
-        to
-                INSTALL=ginstall
+        should add the following line to src/Makefile.custom:
+                CUSTOM_INSTALL=ginstall
 
         For an explanation as to why this is a good idea, see Question 2.1
 
@@ -119,9 +118,3 @@ Section 3:      Extending Postgres95
                 -shared -o funcs.so funcs.c
 
 
-****************************************************************************
-Dr. Andrew C.R. Martin,         University College London & SciTech Software
-EMAIL: martin@biochem.ucl.ac.uk                Tel:(Work) +44(0)171 419 3890
-URL: http://www.biochem.ucl.ac.uk/~martin          (Home) +44(0)1372 275775
-****************************************************************************
-
index 514e023..1d0f91f 100644 (file)
@@ -1,34 +1,41 @@
-====================================================
-Frequently Asked Questions (FAQ) for Postgres95
+=====================================================
+Frequently Asked Questions (FAQ) for PostgresSQL V6.0
 Linux Specific
 TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
-====================================================
-last updated:           Mon Oct 28 10:25:00 BST 1996
+=====================================================
+last updated:           Wed Jan 29 20:16:00 GMT 1997
 
 current maintainer:     Andrew C.R. Martin (martin@biochem.ucl.ac.uk)
 original author:        Andrew C.R. Martin (martin@biochem.ucl.ac.uk)
 
 
 Changes in this version (* = modified, + = new, - = removed):
--0.*)   Bugs in Postgres95 V1.08
-*1.3)   [REDHAT] Why do I get problems with missing libdl and dlfcn.h?
-*1.4)   [SLACKWARE 3.1] Why do I get problems with missing libdl and dlfcn.h?
-*1.5)   My compile of the backend dies complaining about the include file 
-        dlfcn.h missing
-*1.9)   Why do I get problems with ld.so?
-*1.13)  What are the references in X11_LIB to libsocket and libnsl in
-        src/Makefile.global?
-
+*1.1)   What changes do I need to make to src/Makefile.global or
+        src/Makefile.custom?
+*1.2)   Why do I get problems with missing libreadline?
+*1.6)   GCC complains about an ignored option -fpic
+*1.7)   I get warnings of the form 
+        warning: cast from pointer to integer of different size
+*1.8)   [SuSE-Linux 4.2] Where is curses and termcap?
+*1.11)  How do I compile PostgreSQL on an a.out system?
+*1.12)  Why does make fail with:
+        yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y
+        make: /usr/bin/make: cannot execute binary file
+*1.14)  [DEBIAN] Where is libtermcap?
+*2.1)   The linker fails to find libX11 when compiling pgtclsh
++3.6)   Why does psql fail with:
+        psql: can't load library 'libpq.so.1'
+-4.*)   Spurious problems
 
 This file is divided approximately as follows:
-1.*)    Installing Postgres95
+1.*)    Installing PostgreSQL
 2.*)    Compiling accessory programs
 3.*)    Runtime Problems
-4.*)    Spurious Problems in Need of Verification
 
 
 Questions answered:
-1.1)    What changes do I need to make to src/Makefile.global
+1.1)    What changes do I need to make to src/Makefile.global or
+        src/Makefile.custom?
 1.2)    Why do I get problems with missing libreadline?
 1.3)    [REDHAT] Why do I get problems with missing libdl and dlfcn.h?
 1.4)    [SLACKWARE 3.1] Why do I get problems with missing libdl and dlfcn.h?
@@ -40,9 +47,9 @@ Questions answered:
 1.8)    [SuSE-Linux 4.2] Where is curses and termcap?
 1.9)    Why do I get problems with ld.so?
 1.10)   Why do I get `yy_flush_buffer undefined' errors?
-1.11)   How do I compile Postgres95 on an a.out system?
+1.11)   How do I compile PostgreSQL on an a.out system?
 1.12)   Why does make fail with:
-        yacc -d /disk2/postgres95/src/backend/parser/gram.y
+        yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y
         make: /usr/bin/make: cannot execute binary file
 1.13)   What are the references in X11_LIB to libsocket and libnsl in
         src/Makefile.global?
@@ -54,7 +61,7 @@ Questions answered:
         dumped)'
 3.3)    When I try to start the Postmaster, why do I get an error of the form
         Failed Assertion("!(file != 0):(null)", File:
-        "/usr/local/postgres95/src/backend/storage/file/fd.c", Line: 257)
+        "/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257)
         !(file != 0) (0)
         initdb: could not create template database
         initdb: cleaning up.
@@ -63,20 +70,26 @@ Questions answered:
         IpcMemoryCreate: memKey=155356396 , size=760632 ,
         permission=384IpcMemoryCreate: shmget(..., create, ...)
         failed: Invalid argument
+3.6)    Why does psql fail with:
+        psql: can't load library 'libpq.so.1'
 4.1)    Why doesn't the postmaster start the first time?
 
 ----------------------------------------------------------------------
-Section 1:      Compiling Postgres95
+Section 1:      Compiling PostgreSQL
 ----------------------------------------------------------------------
 
-1.1)    What changes do I need to make to src/Makefile.global
+1.1)    What changes do I need to make to src/Makefile.global or
+        src/Makefile.custom?
+
+       These changes are most easily made by running the customize
+       shell script in the src directory which will write a
+       Makefile.custom for you.
 
-        You *must* set the following variables:
+        If you do it by hand, you *must* set the following variable:
                 PORTNAME=       linux
 
         You will also need to change the following to match your own
         installation:
-                SRCDIR
                 POSTGRESDIR
 
         If you switch on the USE_TCL option, you will need to set these:
@@ -108,8 +121,9 @@ Section 1:      Compiling Postgres95
 1.2)    Why do I get problems with missing libreadline?
 
         Linux systems generally don't come with the GNU readline library
-        installed. Either comment out the USE_READLINE variable in   
-        src/Makefile.global or install the GNU readline library.
+        installed. Either ensure you do not activate the readline options
+        in src/Makefile.global or src/Makefile.custom or install the GNU 
+        readline library.
 
         Note that Debian Linux (like FreeBSD) does come with readline
         installed.
@@ -210,39 +224,39 @@ Section 1:      Compiling Postgres95
         If you are using an ELF version of Linux, this can safely be 
         ignored as -fPIC is the default.
 
-        You can correct this by editing
-        src/mk/port/postgres.mk.linux
+        You can correct this by editing src/Makefile.global and 
+        changing CFLAGS_SL
 
 
 1.7)    I get warnings of the form 
         warning: cast from pointer to integer of different size
 
-        These can safely be ignored
+        These were seen in earlier versions of Postgres95 and could
+        safely be ignored. PostgreSQL V6.0 should compile with no warnings
+        except those related to system header files (which can also
+        be safely ignored).
 
 1.8)    [SuSE-Linux 4.2] Where is curses and termcap?
 
-        SuSE-Linux has ncurses but not curses. Edit src/bin/psql/Makefile and 
-        Change
-                LIBCURSES=   -lcurses
-        to
-                LIBCURSES=   -lncurses
+        SuSE-Linux has ncurses but not curses. Set the value of CURSES_LIB
+        in src/Makefile.custom to -lncurses (or do this through the
+        customize script).
 
         SuSE-Linux has the termcap library is in /usr/lib/termcap instead of 
-        in /usr/lib
-        Edit src/bin/psql/Makefile and
-        Change
+        in /usr/lib. If you have a problem, you need to add the following 
+        line to src/Makefile.custom:
+
+                LDADD_BE+= -L/usr/lib/termcap
+
+        You may need to edit src/bin/psql/Makefile and comment out the
+        change:
                 ifeq ($(PORTNAME), linux)
-                LD_ADD += -ltermcap
-                else
-        to
+                   LD_ADD+= -ltermcap
+        to:
                 ifeq ($(PORTNAME), linux)
-                LD_ADD += -L/usr/lib/termcap -ltermcap
-                else
+                   LD_ADD+=
+
 
-        In fact, since ncurses uses terminfo rather than termcap, it should
-        be possible to change this line to
-                LD_ADD += 
-        since you shouldn't need the termcap library.
 
 1.9)    Why do I get problems with ld.so?
 
@@ -260,21 +274,26 @@ Section 1:      Compiling Postgres95
 
         This isn't really Linux specific, but is common on older Linux
         installations. You must have a recent version of flex (2.5.2 or later)
-        to compile Postgres95. Note that flex 2.5.3 has a bug: see
+        to compile PostgreSQL. Note that flex 2.5.3 has a bug: see
         Question 3.4.
 
-1.11)   How do I compile Postgres95 on an a.out system?
+1.11)   How do I compile PostgreSQL on an a.out system?
 
         First, you must install the dld library. This may be obtained
         from Sunsite as:
         Linux/libs/dld.3.2.7.tar.gz
 
-        Second, comment out the LINUX_ELF line in src/mk/port/postgres.mk.linux
+        Second, add the following line to src/Makefile.custom:
+                LINUX_ELF=
+        (or use the customize script)
 
 1.12)   Why does make fail with:
-        yacc -d /disk2/postgres95/src/backend/parser/gram.y
+        yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y
         make: /usr/bin/make: cannot execute binary file
 
+        This was a problem in earlier versions of Postgres95. The default
+        for PostgreSQL is to use bison -y rather than yacc.
+
         yacc is generally implemented as a script which invokes bison -y
         For some reason (certain versions of make? certain versions of 
         bash?) make is unable to execute this script file.
@@ -289,29 +308,23 @@ Section 1:      Compiling Postgres95
         src/Makefile.global?
 
         This was a problem in 1.08 (they are Sun Solaris specific). 
-        It is fixed in 1.09.
+        It is fixed in 1.09 and 6.0
 
 1.14)   [DEBIAN] Where is libtermcap?
 
         Debian Linux comes without the termcap library and uses ncurses
         (which uses terminfo instead). There is no need to change the 
-        LIBCURSES variable in src/bin/psql/Makefile since Debian provides 
+        CURSES_LIB variable in src/bin/psql/Makefile since Debian provides 
         a link from libncurses to libcurses (unlike SuSE-Linux --- see
         Question 1.8).
 
-        Edit src/bin/psql/Makefile and change:
-
+        You may need to edit src/bin/psql/Makefile and comment out the
+        change:
                 ifeq ($(PORTNAME), linux)
-                LD_ADD += -ltermcap
-                else
-
-        to
-
+                   LD_ADD+= -ltermcap
+        to:
                 ifeq ($(PORTNAME), linux)
-                CFLAGS += 
-                else
-
-
+                   LD_ADD+=
 
 
 ----------------------------------------------------------------------
@@ -320,9 +333,7 @@ Section 2:      Compiling accessory programs
 
 2.1)    The linker fails to find libX11 when compiling pgtclsh
 
-        Modify the src/Makefile.global to change
-                X11_LIBDIR = /usr/lib
-        to
+        Add the following to src/Makefile.custom
                 X11_LIBDIR = /usr/X11R6/lib
 
 
@@ -334,18 +345,19 @@ Section 3:      Runtime Problems
         running scripts like createuser
 
         This is a bug in V1.06-V1.07 of Postgres and is fixed in V1.08
+        and above.
 
 3.2)    I run postmaster and after that system says 'Bad system call(Core 
         dumped)'
 
-        This indicates that you have no compiled shared memory support 
+        This indicates that you have not compiled shared memory support 
         into your kernel. You need to recompile the Linux kernel to add this 
         feature.
 
 
 3.3)    When I try to start the Postmaster, why do I get an error of the form
         Failed Assertion("!(file != 0):(null)", File: 
-        "/usr/local/postgres95/src/backend/storage/file/fd.c", Line: 257)
+        "/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257)
         !(file != 0) (0)
         initdb: could not create template database
         initdb: cleaning up.
@@ -375,36 +387,16 @@ Section 3:      Runtime Problems
         You haven't build IPC support into your Linux kernel. You
         will have to rebuild the kernel and switch on this option.
 
+3.6)    Why does psql fail with:
+        psql: can't load library 'libpq.so.1'
 
-----------------------------------------------------------------------
-Section 4:      Spurious Problems in Need of Verification
-----------------------------------------------------------------------
-
-4.1)    Why doesn't the postmaster start the first time?
-
-        Pawko Olszewski <alder@amg.com.pl> reported a problem that, using
-        Linux kernel 2.0.18, the postmaster wouldn't start the first time 
-        it is run using
-
-                postmaster -B 256
-
-        but if run as
-
-                postmaster -B 64
-
-        killed and then restarted as
-
-                postmaster -B 256
-
-        everything was OK.
-
-        I haven't been able to repeat this problem! Nobody else has
-        reported anything similar.
-
+       Psql has been compiled to link dynamically with the libpq
+       library.
 
-****************************************************************************
-Dr. Andrew C.R. Martin,         University College London & SciTech Software
-EMAIL: martin@biochem.ucl.ac.uk                Tel:(Work) +44(0)171 419 3890
-URL: http://www.biochem.ucl.ac.uk/~martin          (Home) +44(0)1372 275775
-****************************************************************************
+       To solve this, you should log in as root and edit the file
+               /etc/ld.so.conf
+       Add a single line at the end which gives the name of the
+       PostgreSQL library directory (the lib subdirectory of your
+       PostgreSQL installation) and run
+               /sbin/ldconfig