Обсуждение: Patches for AIX builds..

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

Patches for AIX builds..

От
Rick Flower
Дата:

Hi.. (hopefully this didn't get MIME'ized/HTML'ized by Outlook 2k!)

I picked up the latest CVS snapshot this afternoon and have made some changes
that were necessary for building PostgreSQL on AIX 4.33 using the VisualAge C++
compiler (version 5).  I'm not sure if my format for diff's is proper, but I'll
do it in what I *think* is correct.. These are the output from using "cvs diff"
All of the changes are very short :

-- Rick

Index: src/Makefile.shlib
===================================================================
RCS file: /projects/cvsroot/pgsql/src/Makefile.shlib,v
retrieving revision 1.56
diff -r1.56 Makefile.shlib
323c323
<       $(COMPILER) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:lib$(NAME)$(EXPSUFF) -o $@ $< $(LDFLAGS) $(SHLIB_LINK) $(LDFLAGS_SL)

---
>       $(COMPILER) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:lib$(NAME)$(EXPSUFF) -o $@ $< $(LDFLAGS) $(SHLIB_LINK) -brtl $(LDFLAGS_SL)

Index: src/interfaces/odbc/misc.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/interfaces/odbc/misc.c,v
retrieving revision 1.26
diff -r1.26 misc.c
19a20
> #include <stdlib.h>

Index: src/interfaces/odbc/statement.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/interfaces/odbc/statement.h,v
retrieving revision 1.33
diff -r1.33 statement.h
105c105
<       STMT_PARSE_FATAL,
---
>       STMT_PARSE_FATAL
113c113
<       STMT_FETCH_EXTENDED,
---
>       STMT_FETCH_EXTENDED

Index: src/template/aix
===================================================================
RCS file: /projects/cvsroot/pgsql/src/template/aix,v
retrieving revision 1.9
diff -r1.9 aix
4c4
<   CFLAGS='-O2 -qmaxmem=16384 -qsrcmsg -qlonglong'
---
>   CFLAGS='-O2 -qchars=signed -qmaxmem=16384 -qsrcmsg -qlonglong'

Re: Patches for AIX builds..

От
Bruce Momjian
Дата:
Rick Flower wrote:
> Hi.. (hopefully this didn't get MIME'ized/HTML'ized by Outlook 2k!)
>
> I picked up the latest CVS snapshot this afternoon and have made some
> changes
> that were necessary for building PostgreSQL on AIX 4.33 using the VisualAge
> C++
> compiler (version 5).  I'm not sure if my format for diff's is proper, but
> I'll
> do it in what I *think* is correct.. These are the output from using "cvs
> diff"
> All of the changes are very short :

OK, we are very close to final so I can only make the most modest
changes unless another AIX person can comment:

FYI, we usually need context diffs (diff -c), but these are OK for this
purpose.

> Index: src/Makefile.shlib
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/Makefile.shlib,v
> retrieving revision 1.56
> diff -r1.56 Makefile.shlib
> 323c323
> <       $(COMPILER) -Wl,-H512 -Wl,-bM:SRE
> -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
> -Wl,-bE:lib$(NAME)$(EXPSUFF) -o $@ $< $(LDFLAGS) $(SHLIB_LINK) $(LDFLAGS_SL)
> ---
> >       $(COMPILER) -Wl,-H512 -Wl,-bM:SRE
> -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
> -Wl,-bE:lib$(NAME)$(EXPSUFF) -o $@ $< $(LDFLAGS) $(SHLIB_LINK) -brtl
> $(LDFLAGS_SL)

Sorry, can't apply this one without AIX comment from someone else.

> Index: src/interfaces/odbc/misc.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/interfaces/odbc/misc.c,v
> retrieving revision 1.26
> diff -r1.26 misc.c
> 19a20
> > #include <stdlib.h>

This one is safe; added.


> Index: src/interfaces/odbc/statement.h
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/interfaces/odbc/statement.h,v
> retrieving revision 1.33
> diff -r1.33 statement.h
> 105c105
> <       STMT_PARSE_FATAL,
> ---
> >       STMT_PARSE_FATAL
> 113c113
> <       STMT_FETCH_EXTENDED,
> ---
> >       STMT_FETCH_EXTENDED
>

This one is also safe, trailing comma in structure removed; done.

> Index: src/template/aix
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/template/aix,v
> retrieving revision 1.9
> diff -r1.9 aix
> 4c4
> <   CFLAGS='-O2 -qmaxmem=16384 -qsrcmsg -qlonglong'
> ---
> >   CFLAGS='-O2 -qchars=signed -qmaxmem=16384 -qsrcmsg -qlonglong'

Need AIX comment.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: Patches for AIX builds..

От
Tom Lane
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK, we are very close to final so I can only make the most modest
> changes unless another AIX person can comment:

Considering we have at least two frontline beta testers who use AIX,
I'm fairly dubious of claims that things don't build there.  ODBC
maybe (do either Tatsuo or Andreas use ODBC?) but these other changes
I'm wary of.

>> <   CFLAGS='-O2 -qmaxmem=16384 -qsrcmsg -qlonglong'
>> ---
>> > CFLAGS='-O2 -qchars=signed -qmaxmem=16384 -qsrcmsg -qlonglong'

> Need AIX comment.

We should *not* care whether chars are signed or not.

            regards, tom lane

Re: Patches for AIX builds..

От
Tom Lane
Дата:
Rick Flower <Richard.Flower@quest.com> writes:
> Actually, that's what I thought.. I originally toyed with the idea of
> fixing the underlying code to be more compliant and therefore kill off
> the complaint messages -- however, I quickly realized that it would take
> a fair effort to do so, hence my "easy" change..

Yeah, that's why no one's got round to it yet.  But it should be done
someday.

            regards, tom lane

Re: Patches for AIX builds..

От
Tom Lane
Дата:
Rick Flower <Richard.Flower@quest.com> writes:
> As for the signed vs. unsigned chars, I only enabled that option as a
> way to cut down on the massive amount of warnings about type
> mismatches that occur in some of the build directories (odbc as a
> minimum) -- most directories are fine, but some of them elicit many
> warnings on this compiler/platform combination.

Hmm, I should think that -qchars=signed would make it *worse*.  What I
see, in certain files, is lots of complaints that the code is implicitly
casting between "char *" and "unsigned char *".  I don't recall any
places where we make use of "signed char".

            regards, tom lane

Re: Patches for AIX builds..

От
Rick Flower
Дата:

Thanks for the replies.. I also would like to hear from other AIX users to
ensure that I'm not holucinating that these changes are needed.. As for the
signed vs. unsigned chars, I only enabled that option as a way to cut down on
the massive amount of warnings about type mismatches that occur in some of the
build directories (odbc as a minimum) -- most directories are fine, but some
of them elicit many warnings on this compiler/platform combination..  I only
thought I would send out these patches, since I didn't really have any problems
building PostgreSQL on either Solaris 8, or HP-UX 11..

-- Rick

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, January 14, 2002 9:40 AM
To: Bruce Momjian
Cc: Rick Flower; 'pgsql-patches@postgresql.org'
Subject: Re: [PATCHES] Patches for AIX builds..

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK, we are very close to final so I can only make the most modest
> changes unless another AIX person can comment:

Considering we have at least two frontline beta testers who use AIX,
I'm fairly dubious of claims that things don't build there.  ODBC
maybe (do either Tatsuo or Andreas use ODBC?) but these other changes
I'm wary of.

>> <   CFLAGS='-O2 -qmaxmem=16384 -qsrcmsg -qlonglong'
>> ---
>> > CFLAGS='-O2 -qchars=signed -qmaxmem=16384 -qsrcmsg -qlonglong'

> Need AIX comment.

We should *not* care whether chars are signed or not.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Re: Patches for AIX builds..

От
Rick Flower
Дата:

Tom writes:

>Hmm, I should think that -qchars=signed would make it *worse*.  What I
>see, in certain files, is lots of complaints that the code is implicitly
>casting between "char *" and "unsigned char *".  I don't recall any
>places where we make use of "signed char".

Actually, that's what I thought.. I originally toyed with the idea of
fixing the underlying code to be more compliant and therefore kill off
the complaint messages -- however, I quickly realized that it would take
a fair effort to do so, hence my "easy" change.. This change does not fix
ALL of the messages, but it does appear to kill off about 10%.. However,
of the two fixes that you all are targetting for the bit-bucket, this one
is much less important to me than the change to the link args.. I will
be patient however and wait for someone else that uses AIX.. Perhaps my
development environment is a bit different then theirs is.. Currently,
our compiler (VisualAge C++ v5), is unpatched and approx. 2 years old.  We
will be probably applying a bunch of patches shortly and perhaps that will
help things..

-- Rick