error compiling postgresql with fedora mingw

Ralf Corsepius rc040203 at freenet.de
Wed Nov 26 12:15:51 UTC 2008


On Wed, 2008-11-26 at 11:05 +0000, Daniel P. Berrange wrote:
> On Tue, Nov 25, 2008 at 02:19:27PM -0500, Tom Lane wrote:
> > Jon Burgess <jburgess777 at googlemail.com> writes:
> > > I think the problem with the .a above is due to the default 'ar' failing
> > > to process the Windows style object symbols.
> > 
> > > I managed to build PostgreSQL a couple of weeks back with MinGW on F9. I
> > > had to override a few of the default tools, e.g.
> > 
> > > $ make AR=i686-pc-mingw32-ar DLLTOOL=/usr/i686-pc-mingw32/bin/dlltool
> > > DLLWRAP=i686-pc-mingw32-dllwrap
> > 
> > That makes sense.  Could you have simplified matters by just prepending
> > /usr/i686-pc-mingw32/bin to your PATH?
> 
> That is a possibility, but we recommend against doing that where posible
> in Mingw RPM builds
More important: /usr/i686-pc-mingw32/bin in $PATH breaks building
packages which contain both native and "to be cross-compiled" packages
(e.g. two or tripple leaf Canadian Cross built packages).

That said, I also recommend against this habit - In case of properly
packaged autoconf/automake-based packages it definitely wrong.

>  and cannot do it by default, because a number of
> programs need to be able to use both the native & mingw versions of 'ar'
> in their configure script. eg, they use native toolchain to build a
> helper program, that they then use in their build process. So we can't
> simply point 'ar' to the mingw version. In autotool'd apps configure
> will generally do the right thing & find i6868-pc-mingw32-ae, for other
> apps, having a makefile variable AR=ar

Only for "single target" packages. For packages with multiple targets,
this won't work, at least not without very careful analysis of the a
package's configury.

>  will at least allow for easy
> override when doing a mingw build by adding AR=i686-pc-mingw32-ar to
> the make flags.

Ralf





More information about the fedora-devel-list mailing list