Thread: Followup to IRIX6.5 installation of PG 7.1.1

Followup to IRIX6.5 installation of PG 7.1.1

From
"G. Anthony Reina"
Date:
I've been talking with SGI tech support about my problem with installing
Postgres 7.1.1 on the SGI (IRIX 6.5.12 using the MIPSPro 7.3 compiler).
Fortunately, one of my SGI's (an octane) built PG without any problem so
this is just academic now (but probably useful for others wanting to
install PG on the SGI). The other SGI (an o2)  seems to lose definitions
of strdup and timeval and some other structures. On the specific
question of strdup, the SGI person told me this:


> Hi Tony,
>
> From my research I came across this:
>
> strdup is not part of ISO C, either C 89, C90, C95, or the
> latest, C99.
>
> As a a result,  there is no strdup() prototype visible, so
> the compiler assumes strdup returns an int.
> An int cannot be transformed to a char * without a cast,
> so the compiler gives a diagnostic.
>
>
> I noticed in your code string.h is not included. The man page for strdup
> specifies the
> inclusion of this header.  Please advise.
>
>

Any comments?

-Tony




Re: Followup to IRIX6.5 installation of PG 7.1.1

From
Tom Lane
Date:
"G. Anthony Reina" <reina@nsi.edu> writes:
>> I noticed in your code string.h is not included. The man page for strdup
>> specifies the inclusion of this header.  Please advise.

> Any comments?

<string.h> is included in every Postgres source file (via c.h).
        regards, tom lane


Re: Followup to IRIX6.5 installation of PG 7.1.1

From
"G. Anthony Reina"
Date:
Tom Lane wrote:

> <string.h> is included in every Postgres source file (via c.h).
>

Yep. That's what I expected.

SGI technical support seems to think that the problem is with the POSIX flag.


" Have you defined any POSIX variables, such as -D_POSIX_SOURCE    or included pthread.h? When you enable POSIX you
willincur a lot of    undefined smbols that are not POSIX compliant.  You can check the symbols
 
    in the POSIX standards. "


I can't say that I understand this at all, but I believe she is saying that
the -D_POSIX_SOURCE flag has caused some function declarations to be hidden
from the compiler (?).

In any case, since I have a working copy of 7.1.1 for IRIX, I'll leave all of
it alone for now as it has gone past my comprehension. SGI has a freeware site
with PostgreSQL 7.0.3. I'm sure that they'll figure this out when they try to
build 7.1.1 for the site.

-Tony