I am including a set of 4 small patches that enable PostgreSQL 7.3b3 to build
successfully on OpenUnix 8.0.  These same patches should also work for UnixWare
7.x.  I will confirm that tomorrow (Nov 7, 2002).

Here is an explanation of the patches:

1. An update of the FAQ_SCO file.

2. This patch removes a static declaration of a in-line function in
   src/backend/utils/sort/tuplesort.c 

3. This patch to src/makefiles/Makefile.unixware, together with the patch to
   src/Makefile.global.in allows any addition library search directories (added
   with the configure --with-libraries option) to be added to the rpath option 
   sent to the linker.  The use of a different variable to pass the addition 
   search paths was necessary to avoid a circular reference to LDFLAGS.

4. This patch creates the variable (trpath) used by the patch to 
   Makefile.unixware.  This patch would also be for other platforms that would 
   have to add the additional library search paths to  the rpath linker option.
   See Makefile.unixware for an example of how to do this.

After applying these patches, PostgreSQL successfully compiled on OpenUnix 8 
and it passed all the regression tests.

*** ./doc/FAQ_SCO.orig  Wed Nov  6 21:35:46 2002
--- ./doc/FAQ_SCO       Wed Nov  6 21:40:44 2002
***************
*** 71,76 ****
--- 71,79 ----
  
  configure --with-libs=/usr/local/lib --with-includes=/usr/local/include
  
+ You will also need to set LD_LIBRARY_PATH to '/usr/local/lib' (or add it to
+ LD_LIBRARY_PATH, if LD_LIBRARY_PATH already exists) before running config-
+ ure or the test for readline will fail.
  
  ***************************************************************************
  *) Using the UDK on OpenServer
*** ./src/backend/utils/sort/tuplesort.c.orig   Wed Nov  6 02:19:35 2002
--- ./src/backend/utils/sort/tuplesort.c        Wed Nov  6 02:21:14 2002
***************
*** 1802,1808 ****
  /*
   * Inline-able copy of FunctionCall2() to save some cycles in sorting.
   */
! static inline Datum
  myFunctionCall2(FmgrInfo *flinfo, Datum arg1, Datum arg2)
  {
        FunctionCallInfoData fcinfo;
--- 1802,1808 ----
  /*
   * Inline-able copy of FunctionCall2() to save some cycles in sorting.
   */
! inline Datum
  myFunctionCall2(FmgrInfo *flinfo, Datum arg1, Datum arg2)
  {
        FunctionCallInfoData fcinfo;
*** ./src/makefiles/Makefile.unixware.orig      Wed Nov  6 02:57:52 2002
--- ./src/makefiles/Makefile.unixware   Wed Nov  6 21:33:20 2002
***************
*** 7,15 ****
  
  ifeq ($(ld_R_works), yes)
  ifeq ($(with_gnu_ld), yes)
!       rpath = -Wl,-rpath,$(libdir)
  else
!       rpath = -Wl,-R$(libdir)
  endif
  endif
  shlib_symbolic = -Wl,-Bsymbolic
--- 7,21 ----
  
  ifeq ($(ld_R_works), yes)
  ifeq ($(with_gnu_ld), yes)
!       # Convert the list of library search paths into -rpath options.
!       # (i.e. "-LpathA -LpathB" -> ",-rpath,pathA,-rpath,pathB"
!       tpath := $(shell echo $(trpath) | sed -e 's/ *-L/,-rpath,/g')
!       rpath = -Wl,-rpath,$(libdir)$(trpath)
  else
!       # Convert the list of library search paths into a -R option path.
!       # (i.e. "-LpathA -LpathB" -> ":pathA:pathB"
!       tpath := $(shell echo $(trpath) | sed -e 's/ *-L/:/g')
!       rpath = -Wl,-R$(libdir)$(tpath)
  endif
  endif
  shlib_symbolic = -Wl,-Bsymbolic
*** ./src/Makefile.global.in.orig       Wed Nov  6 03:38:03 2002
--- ./src/Makefile.global.in    Wed Nov  6 04:22:34 2002
***************
*** 189,194 ****
--- 189,197 ----
  LD = @LD@
  with_gnu_ld = @with_gnu_ld@
  ld_R_works = @ld_R_works@
+ # Set trpath to a list of library paths included in LDFLAGS
+ # These paths can be added to rpath in the port specific makefiles if needed.
+ trpath = $(filter -L%,@LDFLAGS@)
  LDFLAGS = @LDFLAGS@
  LDREL = -r
  LDOUT = -o
____       | Billy G. Allie    | Domain....: [EMAIL PROTECTED]
|  /|      | 7436 Hartwell     | MSN.......: [EMAIL PROTECTED]
|-/-|----- | Dearborn, MI 48126|
|/  |LLIE  | (313) 582-1540    |

Attachment: msg24783/pgp00000.pgp
Description: PGP signature

Reply via email to