Обсуждение: Follow Up: How to properly build postgresql version 7.2 on Unix Platforms?

Поиск
Список
Период
Сортировка

Follow Up: How to properly build postgresql version 7.2 on Unix Platforms?

От
"Andre' Blanchard"
Дата:
Greetings:

This an update to the following request:

Curiously enough, a lot of other people manage to do it; and our
platform FAQs for those platforms do enumerate the known pitfalls.

Perhaps you could be specific about exactly what problems you're having.

            regards, tom lane

I have reviewed the FAQ files in the doc hierarchy, and in each instance
there is nothing to reference the problems which follow.

Our resources:

Ant
Java
tcl 8.3.3

Problem 1:

Solaris Platform - If we build with 1). the Solaris C
compiler(/opt/SUNWspro/SC4.0/bin/cc) and 2). the with-obdc option in
configure, you will encounter a multiply defined symbol error during the
compilation.  Bug # 584 has been submitted for this.

Problem 2: HP UX 11.0 Platform - If we build with 1). the HP ansi C
compiler, debug builds will cause compiler to generate a segmentation
violation when building /src/backend/access/heap/heapam.c

Bug #587:  Postgresql will not build on HP-UX 11.0 in debugmode has been
submitted for this

Another problem exists on HP when selecting version 2.95.3 of the gcc
compiler : compiler warnings will be generated for the following section of
configure

2511: checking how to run the C++ preprocessor which causes this check to
fail

In file included from /usr/include/pwd.h:79,
                 from
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:352,
                 from configure:2525:
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30:
warning: `__va__list' redefined
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:28:
warning: this is the location of the previous definition

This in turn forces the configure script to choose the default /lib/cpp,
which on HP will not work.  This check should provide a means to ignore
warnings which do not impact the choice of g++ as a valid C++ preprocessor.

Problem 3: AIX 4.3.3 with VisualAge 5.0 - Whether we build with gcc or xlc,
the build will fail when it cannot locate our tcl 8.3.3 shared library
resources (which in our build environment are not located in /usr/local)

Bug #588 Postgresql will not build on AIX; cannot locate tcl library has
been filed for this.

Regarding my original query: I would speculate that the majority of the
users of postgresql probably employ the gcc compiler, and when built with
tcl resources, these tend to be located in /usr/local (as opposed to another
location)



Re: Follow Up: How to properly build postgresql version 7.2 on Unix Platforms?

От
Tom Lane
Дата:
"Andre' Blanchard" <amblan57@bellatlantic.net> writes:
> Solaris Platform - If we build with 1). the Solaris C
> compiler(/opt/SUNWspro/SC4.0/bin/cc) and 2). the with-obdc option in
> configure, you will encounter a multiply defined symbol error during the
> compilation.  Bug # 584 has been submitted for this.

AFAIK the ball is in your court on this one: Nishad Prakash pointed out
a possible solution
http://archives.postgresql.org/pgsql-bugs/2002-02/msg00072.php
but whether it actually works on Solaris needs to be tested.

> Problem 2: HP UX 11.0 Platform - If we build with 1). the HP ansi C
> compiler, debug builds will cause compiler to generate a segmentation
> violation when building /src/backend/access/heap/heapam.c
> Bug #587:  Postgresql will not build on HP-UX 11.0 in debugmode has been
> submitted for this

As you were already told, this is HP's bug not ours.

> Another problem exists on HP when selecting version 2.95.3 of the gcc
> compiler : compiler warnings will be generated for the following section of
> configure

> 2511: checking how to run the C++ preprocessor which causes this check to
> fail

> In file included from /usr/include/pwd.h:79,
>                  from
> /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:352,
>                  from configure:2525:
> /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30:
> warning: `__va__list' redefined
> /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:28:
> warning: this is the location of the previous definition

> This in turn forces the configure script to choose the default /lib/cpp,
> which on HP will not work.  This check should provide a means to ignore
> warnings which do not impact the choice of g++ as a valid C++ preprocessor.

This looks to me like a gcc installation problem.  If the installation
hasn't managed to munge the system headers correctly then there's not a
lot of prospect that things will actually work; so I'm not convinced
that the correct solution is to poke a hole in Autoconf's standard C++
cpp test.  Suggest you take this up with the gcc people.  (FWIW, gcc
2.95.3 works fine on HPUX 10.20.  Perhaps more recent releases have
been updated to get things right on HPUX 11.)

> Problem 3: AIX 4.3.3 with VisualAge 5.0 - Whether we build with gcc or xlc,
> the build will fail when it cannot locate our tcl 8.3.3 shared library
> resources (which in our build environment are not located in /usr/local)

This might or might not be resolved by the patch that Andreas proposed,
http://archives.postgresql.org/pgsql-patches/2002-01/msg00047.php
which was deemed too late to include in the 7.2 release.  Would you like
to try it and see?

BTW, your bug report does not look like it's "failing to locate" the
shared library; those are duplicate-symbol errors, not unresolved-symbol
errors.  I speculate that some adjustment is needed in the switches
being passed to the linker, but I dunno what.

            regards, tom lane