Thread: mingw compile error

mingw compile error

From
Bob Rossi
Date:
Hi,

I noticed that if I build postgresql-8.3.1 on mingw with
--disable-shared --without-zlib, I get a compiler error when it goes to
build the regress test in src/test/regress.

The problem is here,
  $(NAME)$(DLSUFFIX): $(shlib)
          rm -f $(NAME)$(DLSUFFIX)
          $(LN_S) $(shlib) $(NAME)$(DLSUFFIX)
It uses the variable $(shlib) which is only defined if the build is
configured with a shared library. Therefor, the ln -s command comes out
like 'ln -s  regress.dll', and the build fails.

Bob Rossi

Re: mingw compile error

From
Tom Lane
Date:
Bob Rossi <bob_rossi@cox.net> writes:
> I noticed that if I build postgresql-8.3.1 on mingw with
> --disable-shared --without-zlib, I get a compiler error when it goes to
> build the regress test in src/test/regress.

That's the least of your problems --- the regression tests wouldn't work
anyway, since they depend on four or five different shared libraries
such as plpgsql.

I'm not sure why we still pretend to support --disable-shared at all...

            regards, tom lane

Re: mingw compile error

From
Bob Rossi
Date:
On Thu, May 15, 2008 at 12:37:42PM -0400, Tom Lane wrote:
> Bob Rossi <bob_rossi@cox.net> writes:
> > I noticed that if I build postgresql-8.3.1 on mingw with
> > --disable-shared --without-zlib, I get a compiler error when it goes to
> > build the regress test in src/test/regress.
>
> That's the least of your problems --- the regression tests wouldn't work
> anyway, since they depend on four or five different shared libraries
> such as plpgsql.
>
> I'm not sure why we still pretend to support --disable-shared at all...

Umm, I don't know what you are talking about.

After disabling the building of that directory, everything appeard to
work just fine. Do you think I'll have runtime errors because of the
--disable-shared option?

Bob Rossi

Re: mingw compile error

From
Bob Rossi
Date:
On Thu, May 15, 2008 at 11:18:18AM -0400, Bob Rossi wrote:
> Hi,
>
> I noticed that if I build postgresql-8.3.1 on mingw with
> --disable-shared --without-zlib, I get a compiler error when it goes to
> build the regress test in src/test/regress.
>
> The problem is here,
>   $(NAME)$(DLSUFFIX): $(shlib)
>           rm -f $(NAME)$(DLSUFFIX)
>           $(LN_S) $(shlib) $(NAME)$(DLSUFFIX)
> It uses the variable $(shlib) which is only defined if the build is
> configured with a shared library. Therefor, the ln -s command comes out
> like 'ln -s  regress.dll', and the build fails.

Ping. Anyone care?

Bob Rossi

Re: mingw compile error

From
Tom Lane
Date:
Bob Rossi <bob_rossi@cox.net> writes:
>> I noticed that if I build postgresql-8.3.1 on mingw with
>> --disable-shared --without-zlib, I get a compiler error when it goes to
>> build the regress test in src/test/regress.

> Ping. Anyone care?

Well, no, not a lot --- you haven't explained why it's necessary for
you to build with --disable-shared.  Mingw certainly supports shared
libraries, and it's hard to deny that that's the wave of the future,
and as I already mentioned to you there are large areas of Postgres
functionality that never have and never will work without shared
library support.

For the record, so far as I can tell the src/test/regress makefile has
never supported --disable-shared build.  If it worked for you before,
it was because the upper-level makefiles didn't propagate the "make all"
request down to src/test/regress.  But that started to happen in 8.2,
and yours is the first complaint we've gotten, so it doesn't seem to be
of wide interest.

FWIW, I notice that CVS HEAD doesn't try to build the shlib in
src/test/regress, as a result of unrelated cleanups by Peter E.
It does still try to build the two contrib/spi .so files that the
regression tests want ... I have no idea if that would fail on
your tool chain or not.

            regards, tom lane