RE: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head

From: "Regina Obe" <lr(at)pcorp(dot)us>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head
Date: 2021-03-11 16:45:47
Message-ID: 000201d71695$fdd14ed0$f973ec70$@pcorp.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> Our usual recommendation is to include postgres.h before all else; is
there a
> really good reason to be pulling in libxml headers before that?
>
> Having seen this, I now guess that your issue is happening because one of
> those headers has already included <sys/stat.h> before win32_port.h tries
to
> do so. That makes our attempt to relabel the system's "struct stat" as
"struct
> microsoft_native_stat" not work.
> In general, the portability hacks that postgres.h does for some platforms
> aren't reliable if any system headers have already been pulled in.
>
> regards, tom lane

I don't think there is a reason to include libxml first. Thanks for the
help. I'll revise those to see if it fixes the issue without messing with
the Postgres include files.

Thanks,
Regina

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Regina Obe 2021-03-11 17:58:18 RE: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head
Previous Message Tom Lane 2021-03-11 16:37:11 Re: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head