Re: AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem

Поиск
Список
Период
Сортировка
От Travis W. Pouarz
Тема Re: AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem
Дата
Msg-id Pine.SOL.3.91.1010101192537.19781A-100000@godzilla3.acpub.duke.edu
обсуждение исходный текст
Ответ на Re: AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
On Fri, 29 Dec 2000, Tom Lane wrote:

> pgsql-bugs@postgresql.org writes:
> > AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem
>
> I believe current sources (7.1-to-be) build cleanly on AIX, though I'm
> not sure whether our main AIX beta tester checks ODBC very often.
> Would you be willing to pull current sources and see how it goes there?
> ... otherwise there is a snapshot tarball generated nightly in
> ftp://ftp.postgresql.org/pub/dev/

As you suggested, I grabbed pub/dev/postgresql-snapshot.tar.gz yesterday
(31 Dec 00) and ran with that.

===========
First, without -with-tcl:
  It compiled and installed without any problems.

Here's the configure:

./configure --without-CXX --prefix=/tmp/postgresql-snapshot/install \
--with-odbc \
--with-includes=/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/include \
--with-libraries=/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/lib

===========
Second, with --with-tcl (and --with-tclconfig, --with-includes, and
--with-libraries to my tcl8.0 installation):

Here's the configure:

./configure --without-CXX --prefix=/tmp/postgresql-snapshot/install
--with-odbc --with-tcl \
--with-tclconfig=/.../austin.ibm.com/fs/projects/gsys/lib \

--with-includes=/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/include:/.../austin.ibm.com/fs/projects/gsys/include
\
--with-libraries=/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/lib:/.../austin.ibm.com/fs/projects/gsys/lib

  * I got this error during the build:

...
ar crs libpgtcl.a pgtcl.o pgtclCmds.o pgtclId.o
touch libpgtcl.a
../../../src/backend/port/aix/mkldexport.sh libpgtcl.a > libpgtcl.exp
cc -O -qtune=p2sc -qmaxmem=8192 -Wl,-H512 -Wl,-bM:SRE
-Wl,-bI:../../../src/backend/postgres.imp -Wl,-bE:libpgtcl.exp -o
libpgtcl.so libpgtcl.a
-L/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/lib
-L/.../austin.ibm.com/fs/projects/gsys/lib
-L/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/lib
-L/.../austin.ibm.com/fs/projects/gsys/lib
-L../../../src/interfaces/libpq -lpq  -lc
...
ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar2
ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar
ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendResult
ld: 0711-317 ERROR: Undefined symbol: .Tcl_Preserve
...

  so I added -ltcl8.0 to LDFLAGS in src/Makefile.global:

LDFLAGS = -L/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/lib \
 -L/.../austin.ibm.com/fs/projects/gsys/lib -ltcl8.0

 * Then I got this error during the build:

...
make[3]: Entering directory `/tmp/postgresql-snapshot/src/pl/tcl'
cc   -I/.../austin.ibm.com/fs/projects/gsys/pkg/readline-4.1/include
-I/.../austin.ibm.com/fs/projects/gsys/include -I../../../src/include
-DHAVE_GETCWD=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1
-DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1
-DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1 -DUSE_DELTA_FOR_TZ=1
-DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1
-Dvfork=fork -D__CHAR_UNSIGNED__=1 -DHAVE_SIGNED_CHAR=1
-DHAVE_SYS_IOCTL_H=1   -c pltcl.c -o pltcl.o
/.../austin.ibm.com/fs/projects/gsys/lib/tcl8.0/ldAix /bin/ld -bhalt:4
-bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -o pltcl.so pltcl.o
-L/.../austin.ibm.com/fs/projects/gsys/lib -ltcl8.0 -lld  -lm -lbsd -lc
noDotA="pltcl.so"
ld: 0711-317 ERROR: Undefined symbol: .nocachegetattr
ld: 0711-317 ERROR: Undefined symbol: .heap_getsysattr
ld: 0711-317 ERROR: Undefined symbol: .SearchSysCache
ld: 0711-317 ERROR: Undefined symbol: .elog
ld: 0711-317 ERROR: Undefined symbol: .ReleaseSysCache
ld: 0711-317 ERROR: Undefined symbol: .OidFunctionCall3
ld: 0711-317 ERROR: Undefined symbol: .pfree
ld: 0711-317 ERROR: Undefined symbol: Warn_restart
ld: 0711-317 ERROR: Undefined symbol: .FunctionCall3
ld: 0711-317 ERROR: Undefined symbol: .SPI_execp
ld: 0711-317 ERROR: Undefined symbol: SPI_processed
ld: 0711-317 ERROR: Undefined symbol: SPI_tuptable
...

  so I added -bI:/tmp/postgresql-snapshot/src/backend/postgres.imp to TCL_SHLIB_LD
  in src/pl/tcl/Makefile.tcldefs:

TCL_SHLIB_LD = /.../austin.ibm.com/fs/projects/gsys/lib/tcl8.0/ldAix \
/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry \
-bI:/tmp/postgresql-snapshot/src/backend/postgres.imp

 * The build then completed and installed without further error.

I loaded a pg_dumpall from a small 7.0.3 database into this 7.1 build
and ran a query and didn't observe anything out of the ordinary.

BTW, relative to a lot of stuff I've compiled on AIX, PostgreSQL
is a piece of cake.  Thanks!

-Travis

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Table corruption on drop
Следующее
От: Tom Lane
Дата:
Сообщение: Re: AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem