I have tried to perform a regression test on AIX 5.1 (PostgreSQL 7.4beta3).
I have encountered an error.


gmake[3]: Leaving directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces/libpq'
gmake[3]: Entering directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces/ecpg'
gmake -C include all
gmake[4]: Entering directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces/ecpg/include'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces/ecpg/include'
gmake -C pgtypeslib all
gmake[4]: Entering directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces/ecpg/pgtypeslib'
gcc -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations 
-I../../../../src/interfaces/ecpg/include -I../../../../src
/include/utils -I../../../../src/include   -g  -c -o numeric.o numeric.c
gcc -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations 
-I../../../../src/interfaces/ecpg/include -I../../../../src
/include/utils -I../../../../src/include   -g  -c -o datetime.o datetime.c
gcc -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations 
-I../../../../src/interfaces/ecpg/include -I../../../../src
/include/utils -I../../../../src/include   -g  -c -o common.o common.c
common.c: In function `pgtypes_fmt_replace':
common.c:94: union has no member named `int64_val'
gmake[4]: *** [common.o] Error 1
gmake[4]: Leaving directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces/ecpg/pgtypeslib'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces/ecpg'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/interfaces'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/src/shopnet/postgresql-7.4beta3/src'


PostgreSQL 7.3.4 works nicely (gmake, GCC 2.95) for me (production system).

	Regards,

		Hans
	

--
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706; +43/660/816 40 77
www.cybertec.at, www.postgresql.at, kernel.cybertec.at



Sun, 21 Sep 2003 18:37:33 +0200
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres@cybertec.at>
PostgreSQL 7.4beta3 does not compile on AIX 5 ...
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres@cybertec.at> writes:
> I have tried to perform a regression test on AIX 5.1 (PostgreSQL 7.4beta3).
> I have encountered an error.

Ill-considered combination of #ifdefs apparently.  I have applied the
attached patch.

			regards, tom lane

*** src/interfaces/ecpg/pgtypeslib/extern.h~	Sun Aug  3 23:01:49 2003
--- src/interfaces/ecpg/pgtypeslib/extern.h	Sun Sep 21 13:41:53 2003
***************
*** 29,37 ****
  	char		char_val;
  	unsigned long int luint_val;
  	double		double_val;
- #ifdef HAVE_INT64_TIMESTAMP
  	int64		int64_val;
- #endif
  };
  
  int			pgtypes_fmt_replace(union un_fmt_comb, int, char **, int *);
--- 29,35 ----
*** src/interfaces/ecpg/pgtypeslib/common.c~	Sun Aug  3 23:01:49 2003
--- src/interfaces/ecpg/pgtypeslib/common.c	Sun Sep 21 13:41:43 2003
***************
*** 88,99 ****
  						i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
  									 "%0.0g", replace_val.double_val);
  						break;
- #ifdef HAVE_INT64
  					case PGTYPES_TYPE_INT64:
  						i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
  									 INT64_FORMAT, replace_val.int64_val);
  						break;
- #endif
  					case PGTYPES_TYPE_UINT:
  						i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
  									 "%u", replace_val.uint_val);
--- 88,97 ----

Sun, 21 Sep 2003 13:45:30 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: PostgreSQL 7.4beta3 does not compile on AIX 5 ... 
Tom Lane wrote:
>>we have fixed the first problem.
>>here is the next one ...
>>libm seems to be missing although it is installed (I have installed it 
>>for running 7.3.4).

 > It looks like -lm needs to be added to SHLIB_LINK in ecpglib/Makefile.
 > I had already proposed this patch for SSL-enabled builds:
 >
 > *** src/interfaces/ecpg/ecpglib/Makefile.orig	Fri Aug  1 12:46:18 2003
 > --- src/interfaces/ecpg/ecpglib/Makefile	Tue Sep 16 01:29:43 2003
 > ***************
 > *** 21,27 ****
 >   OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o 
memory.o \
 >   	connect.o misc.o
 >
 > ! SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) $(THREAD_LIBS)
 >
 >   all: all-lib
 >
 > --- 21,27 ----
 >   OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o 
memory.o \
 >   	connect.o misc.o
 >
 > ! SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) $(filter -lssl, 
$(LIBS)) $(THREAD_LIBS)
 >
 >   all: all-lib
 >
 > and based on your report I guess it actually needs to be "filter 
-lssl -lm".
 > Please try it?
 >
 > 			regards, tom lane




i have applied the patch below.
i have added -lm to ecpglib/Makefile
in addition to that i had to add

-lm -L../../libpq -lpq

to compatlib/Makefile

now it seems to compile properly.
can anybody verify that?


regression test on RS/6000 (2 x 375 Mhz), AIX 5.1; GCC 2.95:

gmake[3]: Leaving directory 
`/usr/src/shopnet/postgresql-7.4beta3/contrib/spi'
/bin/sh ./pg_regress --temp-install --top-builddir=../../.. 
--schedule=./parallel_schedule --multibyte=SQL_ASCII
============== removing existing temp installation    ==============
============== creating temporary installation        ==============
============== initializing database system           ==============
============== starting postmaster                    ==============
running on port 65432 with pid 17596
============== creating database "regression"         ==============
CREATE DATABASE
ALTER DATABASE
============== dropping regression test user accounts ==============
============== installing PL/pgSQL                    ==============
============== running regression test queries        ==============
parallel group (13 tests):  int2 int4 text name int8 boolean float4 oid 
char float8 varchar bit numeric
      boolean              ... ok
      char                 ... ok
      name                 ... ok
      varchar              ... ok
      text                 ... ok
      int2                 ... ok
      int4                 ... ok
      int8                 ... ok
      oid                  ... ok
      float4               ... ok
      float8               ... ok
      bit                  ... ok
      numeric              ... ok
test strings              ... ok
test numerology           ... ok
parallel group (20 tests):  point comments path reltime date interval 
lseg abstime time tinterval polygon circle timetz box inet timestamptz 
timestamp type_sanity oidjoins opr_sanity
      point                ... ok
      lseg                 ... ok
      box                  ... ok
      path                 ... ok
      polygon              ... ok
      circle               ... ok
      date                 ... ok
      time                 ... ok
      timetz               ... ok
      timestamp            ... ok
      timestamptz          ... ok
      interval             ... ok
      abstime              ... ok
      reltime              ... ok
      tinterval            ... ok
      inet                 ... ok
      comments             ... ok
      oidjoins             ... ok
      type_sanity          ... ok
      opr_sanity           ... ok
test geometry             ... ok
test horology             ... ok
test insert               ... ok
test create_function_1    ... ok
test create_type          ... ok
test create_table         ... ok
test create_function_2    ... ok
test copy                 ... ok
parallel group (7 tests):  create_aggregate create_operator vacuum 
triggers inherit constraints create_misc
      constraints          ... ok
      triggers             ... ok
      create_misc          ... ok
      create_aggregate     ... ok
      create_operator      ... ok
      inherit              ... ok
      vacuum               ... ok
parallel group (2 tests):  create_view create_index
      create_index         ... ok
      create_view          ... ok
test sanity_check         ... ok
test errors               ... ok
test select               ... ok
parallel group (17 tests):  select_distinct_on select_into 
select_distinct transactions update aggregates select_having case random 
subselect union select_implicit hash_index btree_index arrays portals join
      select_into          ... ok
      select_distinct      ... ok
      select_distinct_on   ... ok
      select_implicit      ... ok
      select_having        ... ok
      subselect            ... ok
      union                ... ok
      case                 ... ok
      join                 ... ok
      aggregates           ... ok
      transactions         ... ok
      random               ... failed (ignored)
      portals              ... ok
      arrays               ... ok
      btree_index          ... ok
      hash_index           ... ok
      update               ... ok
test privileges           ... ok
test misc                 ... ok
parallel group (5 tests):  portals_p2 select_views cluster rules foreign_key
      select_views         ... ok
      portals_p2           ... ok
      rules                ... ok
      foreign_key          ... ok
      cluster              ... ok
parallel group (14 tests):  limit copy2 sequence temp polymorphism 
truncate prepare conversion stats rangefuncs without_oid domain plpgsql 
alter_table
      limit                ... ok
      plpgsql              ... ok
      copy2                ... ok
      temp                 ... ok
      domain               ... ok
      rangefuncs           ... ok
      prepare              ... ok
      without_oid          ... ok
      conversion           ... ok
      truncate             ... ok
      alter_table          ... ok
      sequence             ... ok
      polymorphism         ... ok
      stats                ... ok
============== shutting down postmaster               ==============

==================================================
  92 of 93 tests passed, 1 failed test(s) ignored.
==================================================

The differences that caused some tests to fail can be viewed in the
file `./regression.diffs'.  A copy of the test summary that you see
above is saved in the file `./regression.out'.

gmake[2]: Leaving directory 
`/usr/src/shopnet/postgresql-7.4beta3/src/test/regress'
gmake[1]: Leaving directory `/usr/src/shopnet/postgresql-7.4beta3/src/test'




-- 
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706; +43/660/816 40 77
www.cybertec.at, www.postgresql.at, kernel.cybertec.at



Sun, 21 Sep 2003 22:09:07 +0200
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <hs@cybertec.at>
Re: PostgreSQL 7.4beta3 does not compile on AIX 5 ...
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <hs@cybertec.at> writes:
> i have added -lm to ecpglib/Makefile
> in addition to that i had to add
> -lm -L../../libpq -lpq
> to compatlib/Makefile
> now it seems to compile properly.

Okay, I have added these things as part of the Darwin makefile fixes
I just applied.  -lm doesn't seem to be needed on Darwin, which is odd
since its linker is strict otherwise.

			regards, tom lane

Sat, 27 Sep 2003 15:41:35 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: PostgreSQL 7.4beta3 does not compile on AIX 5 ... 
Tom Lane writes:

> =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <hs@cybertec.at> writes:
> > i have added -lm to ecpglib/Makefile
> > in addition to that i had to add
> > -lm -L../../libpq -lpq
> > to compatlib/Makefile
> > now it seems to compile properly.
>
> Okay, I have added these things as part of the Darwin makefile fixes
> I just applied.  -lm doesn't seem to be needed on Darwin, which is odd
> since its linker is strict otherwise.

The compatlib doesn't appear to use libpq though.  What is the error if
you leave it off?

-- 
Peter Eisentraut   peter_e@gmx.net


Sat, 27 Sep 2003 22:12:47 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: PostgreSQL 7.4beta3 does not compile on AIX 5 ... 
Peter Eisentraut <peter_e@gmx.net> writes:
> The compatlib doesn't appear to use libpq though.  What is the error if
> you leave it off?

gcc -no-cpp-precomp -g -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations  -bundle informix.o -L../../../../src/port -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes -lssl -lcrypto -lm   -o libecpg_compat.so.1.0
ld: Undefined symbols:
_PQclear
_PQexec
_PQerrorMessage
_PQresultErrorField
_PQfinish
_PQsetNoticeReceiver
_PQsetdbLogin
_PQstatus
_last_path_separator
make: *** [libecpg_compat.so.1.0] Error 1

compatlib doesn't require libpq directly --- but it requires libecpg,
which in turn requires libpq, and apparently this platform makes you
mention the indirect dependencies as well as the direct ones.
(But not, evidently, for -lm or -lc; there may be some other "magically
included" libs as well?)

			regards, tom lane

Sat, 27 Sep 2003 16:49:29 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: PostgreSQL 7.4beta3 does not compile on AIX 5 ... 