I've successfully compiled PostgreSQL 6.0 in following environment:
AIX 4.1.4
GCC 2.7.2
GNU Bison version 1.25
flex version 2.5.2

As statet in an earlier mail, I have no access to a newer PostgreSQL
version this time. I've made the changes in the original Makefile.global
and I will describe these minimal changes here.

I don't know what the aix-port specific code does, (of cource Darren King
<aixssd!darrenk@abs.net> knows a lot about it), and I don't know if it is
required for the gcc port - I just know, that the compiled version works
on my RS/6000-Mod 320H.

If some one wants to include this in the official port or include a
special port option, please feel free to do it. I don't think that it is
worth enough, a comment in the make files or readme files should do it
well.

Further more I've only compiled the C-stuff and NOT the C++ code. From my
knowledge the Gnu C++ compiler has problems with AIX yet.

One problem I ran into, was that the libld.a was not installed on my
machine, which can be found in the package bos.adt.lib of the AIX
Installation CD (thanks to Jens-Uwe Mager <jum@anubis.han.de> for his
info).

Now for the changes in the Makefile.global in the aix-port section:
Replace the option
CFLAGS_BE= -qchars=signed -qmaxmem=4000
with
CFLAGS_BE= -fsigned-char
and add
LEX= flex
YACC= bison -y

In addition the shell script ./backend/port/aix/mkldexport.sh the path for
the 'nm' command had to be corrected from
NM=/usr/ucb/nm
to
NM=/usr/bin/nm

Warning: the following diff is for PostgreSQL 6.0 only and makes the AIX
version of PostgreSQL uncompilable with the IBM compiler!
- ------------------------------ CUT -------------------------------
diff -b -r ./Makefile.global ../../postgres.old/src/Makefile.global
362,365c362
< #### CFLAGS_BE= -qchars=signed -qmaxmem=4000
< CFLAGS_BE= -fsigned-char
< LEX= flex
< YACC= bison -y
- ---
CFLAGS_BE= -qchars=signed -qmaxmem=4000
366a364
>
446a445
>
diff -b -r ./backend/port/aix/mkldexport.sh
../../postgres.old/src/backend/port/aix/mkldexport.sh
20c20
< NM=/usr/bin/nm
- ---
NM=/usr/ucb/nm
$ diff -b -r . ../../postgres.old/src
- ------------------------------ CUT -------------------------------

Thanks to all, which invested time to get my configuration running,
Gerhard

+---------------------- T.B.Reithofer ---------------+-----------+
Gerhard Reithofer Technical Sofware Developement | Developer |
Registered Autodesk Developer | A N D |
Mechanical Design & Construction | Poweruser |
+-----------------------+---------------------+------------------+
/ Email tbr_laa@aon.at / Phone +43-2522/8726 / PAN 912516323 /
/ Mobile +43-663/089747 / Fax +43-2522/87268 / Austria /
+-----------------------+---------------------+------------------+

------------------------------

Search Discussions

  • Darren King at Apr 16, 1997 at 5:28 pm

    I don't know what the aix-port specific code does, (of cource Darren King
    <aixssd!darrenk@abs.net> knows a lot about it), and I don't know if it is
    required for the gcc port - I just know, that the compiled version works
    on my RS/6000-Mod 320H.
    Does the regression test run? Does the shared lib part of it work? This
    would be great if it did...not deadly if it didn't. Just wouldn't have the
    extensibility, but as long as it was otherwise functional.

    All of the hocus-pocus needed to generate the import/export symbol files
    is for the IBM compiler/linker. If gcc can make postgres so that it can
    use the shared libs, then hurrah for gcc! The stuff in the port dir is
    still needed, it's the symbol files that would be unnecessary. In the
    aix section, the define of MAKE_EXPORTS could then be put in with defining
    the CFLAGS_BE for the IBM compiler only.

    I finally got gcc built/installed, I'll give it a shot in the next couple
    of days and get these patches melded together.
    One problem I ran into, was that the libld.a was not installed on my
    machine, which can be found in the package bos.adt.lib of the AIX
    Installation CD (thanks to Jens-Uwe Mager <jum@anubis.han.de> for his
    info).
    The libld.a is needed for the functions in the c module in the port
    directory for loading in the shared libs.
    Now for the changes in the Makefile.global in the aix-port section:
    Replace the option
    CFLAGS_BE= -qchars=signed -qmaxmem=4000
    with
    CFLAGS_BE= -fsigned-char
    and add
    LEX= flex
    YACC= bison -y
    Correct. The -q flags are for the IBM compiler series. Maybe wrap these
    in an 'ifeq($CC,gcc)'. For 6.1, the LEX and YACC flags would be taken care
    of by configure, would they not? Marc? Could a different CFLAGS be defined
    depending on what compiler is found or specified? This would eliminate
    having a separated "port" for the two compilers on the same platform.

    Good job Gerhard...glad to hear another AIX voice on the list. :)


    Darren darrenk@insightdist.com

    ------------------------------
  • The Hermit Hacker at Apr 16, 1997 at 6:13 pm

    On Wed, 16 Apr 1997, Darren King wrote:

    Correct. The -q flags are for the IBM compiler series. Maybe wrap these
    in an 'ifeq($CC,gcc)'. For 6.1, the LEX and YACC flags would be taken care
    of by configure, would they not? Marc? Could a different CFLAGS be defined
    depending on what compiler is found or specified? This would eliminate
    having a separated "port" for the two compilers on the same platform.
    Before i make any changes, see the template directory/files...submit
    to me a 'aix-gcc' vs 'aix-cc' template file, which will cover YACC, YFLAGS
    and CFLAGS...

    Marc G. Fournier
    Systems Administrator @ hub.org
    primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org

    ------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedApr 13, '97 at 6:27p
activeApr 16, '97 at 6:13p
posts3
users3
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase