FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 11-25-2008, 04:52 PM
Tom Lane
 
Default error compiling postgresql with fedora mingw

Itamar - IspBrasil <itamar@ispbrasil.com.br> writes:
> any help ?

What version of fedora/mingw exactly?

> i686-pc-mingw32-gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -Wall
> -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -fwrapv zic.o ialloc.o scheck.o localtime.o -L../../src/port
> -Wl,--allow-multiple-definition -lpgport -lz -lm -lws2_32 -lshfolder
> -o zic.exe
> ../../src/port/libpgport.a: could not read symbols: Archive has no
> index; run ranlib to add one

Hmm, anything interesting in the part of the build log where libpgport.a
gets made?

Postgres is known to build on mingw
http://www.pgbuildfarm.org/cgi-bin/show_status.pl
so one way to attack the problem is to figure out what's different
between your installation and the ones on those mingw buildfarm machines.

regards, tom lane

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-25-2008, 05:34 PM
Itamar - IspBrasil
 
Default error compiling postgresql with fedora mingw

I am using lasted version from

http://www.annexia.org/tmp/mingw/fedora-10/x86_64/

I need only client library's (mysql and postgresql), to rebuild Qt using
mingw with mysql and postgresql support



On 11/25/2008 3:52 PM, Tom Lane wrote:

Itamar - IspBrasil<itamar@ispbrasil.com.br> writes:


any help ?



What version of fedora/mingw exactly?



i686-pc-mingw32-gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions --param=ssp-buffer-size=4 -mms-bitfields -Wall
-Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv zic.o ialloc.o scheck.o localtime.o -L../../src/port
-Wl,--allow-multiple-definition -lpgport -lz -lm -lws2_32 -lshfolder
-o zic.exe
../../src/port/libpgport.a: could not read symbols: Archive has no
index; run ranlib to add one



Hmm, anything interesting in the part of the build log where libpgport.a
gets made?

Postgres is known to build on mingw
http://www.pgbuildfarm.org/cgi-bin/show_status.pl
so one way to attack the problem is to figure out what's different
between your installation and the ones on those mingw buildfarm machines.

regards, tom lane





--
------------

Itamar Reis Peixoto

e-mail/msn: itamar@ispbrasil.com.br
sip: itamar@ispbrasil.com.br
skype: itamarjp
icq: 81053601
+55 11 4063 5033
+55 34 3221 8599


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-25-2008, 06:05 PM
Jon Burgess
 
Default error compiling postgresql with fedora mingw

On Tue, 2008-11-25 at 16:34 -0200, Itamar - IspBrasil wrote:
> I am using lasted version from
>
> http://www.annexia.org/tmp/mingw/fedora-10/x86_64/
>
> I need only client library's (mysql and postgresql), to rebuild Qt using
> mingw with mysql and postgresql support
>
>
> On 11/25/2008 3:52 PM, Tom Lane wrote:
> > Itamar - IspBrasil<itamar@ispbrasil.com.br> writes:
> >
> >> any help ?
> >>
> >
> > What version of fedora/mingw exactly?
> >
> >
> >> i686-pc-mingw32-gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> >> -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -Wall
> >> -Wmissing-prototypes -Wpointer-arith -Winline
> >> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> >> -fwrapv zic.o ialloc.o scheck.o localtime.o -L../../src/port
> >> -Wl,--allow-multiple-definition -lpgport -lz -lm -lws2_32 -lshfolder
> >> -o zic.exe
> >> ../../src/port/libpgport.a: could not read symbols: Archive has no
> >> index; run ranlib to add one
> >>
> >
> > Hmm, anything interesting in the part of the build log where libpgport.a
> > gets made?
> >
> > Postgres is known to build on mingw
> > http://www.pgbuildfarm.org/cgi-bin/show_status.pl
> > so one way to attack the problem is to figure out what's different
> > between your installation and the ones on those mingw buildfarm machines.
> >
> > regards, tom lane
> >
> >
>

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

I also needed some tweaks to make it use i686-pc-mingw32-windres
and to execute the compiled "zic.exe" instead of just "./zic" (though in
the end I just skipped the whole timezone installation). I also ran into
a problem with a missing definition of UNICODE_STRING. Let me know if
you run into any more problems and I'll see if I can help.

Jon




--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-25-2008, 06:19 PM
Tom Lane
 
Default error compiling postgresql with fedora mingw

Jon Burgess <jburgess777@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?

> I also needed some tweaks to make it use i686-pc-mingw32-windres
> and to execute the compiled "zic.exe" instead of just "./zic" (though in
> the end I just skipped the whole timezone installation).

Agreed on skipping the timezone installation --- if you have
/usr/share/zoneinfo that's being kept reasonably up2date then it's
better to use that.

> I also ran into
> a problem with a missing definition of UNICODE_STRING.

UNICODE_STRING? I don't see anything like that in the Postgres sources.

regards, tom lane

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-25-2008, 06:42 PM
Jon Burgess
 
Default error compiling postgresql with fedora mingw

On Tue, 2008-11-25 at 14:19 -0500, Tom Lane wrote:
> Jon Burgess <jburgess777@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 seems to work OK but you still need the
DLLTOOL=/usr/i686-pc-mingw32/bin/dlltool

I forgot to mention that some of the Makefiles have hard coded
references to windres which need replacing
with /usr/bin/i686-pc-mingw32-windres

> > I also needed some tweaks to make it use i686-pc-mingw32-windres
> > and to execute the compiled "zic.exe" instead of just "./zic" (though in
> > the end I just skipped the whole timezone installation).
>
> Agreed on skipping the timezone installation --- if you have
> /usr/share/zoneinfo that's being kept reasonably up2date then it's
> better to use that.
>
> > I also ran into
> > a problem with a missing definition of UNICODE_STRING.
>
> UNICODE_STRING? I don't see anything like that in the Postgres sources.

The problem looked like it was in the MinGW header files. Some PG code
was pulling in sspi.h which includes the line:

typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;

I tweked a few things to #include <ntdef.h> which fixed it but I'm not
sure this is the right fix. The subauth.h headers file addresses this by
having an alternate definition of UNICODE_STRING which with an #ifdef
wrapper.

Jon


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-25-2008, 08:36 PM
Tom Lane
 
Default error compiling postgresql with fedora mingw

Jon Burgess <jburgess777@googlemail.com> writes:
> On Tue, 2008-11-25 at 14:19 -0500, Tom Lane wrote:
>> That makes sense. Could you have simplified matters by just prepending
>> /usr/i686-pc-mingw32/bin to your PATH?

> That seems to work OK but you still need the
> DLLTOOL=/usr/i686-pc-mingw32/bin/dlltool

Hmm ... I see a "dlltool" that should probably be "$(DLLTOOL)" in
src/pl/plpython/Makefile ... are there other omissions?

> I forgot to mention that some of the Makefiles have hard coded
> references to windres which need replacing
> with /usr/bin/i686-pc-mingw32-windres

Again, seems like tweaking the PATH should have taken care of that.

I think that upstream would be willing to take any patches needed to
make this work with just the PATH tweak. I'm not in a position to
test it myself though, so if you'd put together a tested patch I'd
be much obliged.


>> UNICODE_STRING? I don't see anything like that in the Postgres sources.

> The problem looked like it was in the MinGW header files. Some PG code
> was pulling in sspi.h which includes the line:

> typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;

> I tweked a few things to #include <ntdef.h> which fixed it but I'm not
> sure this is the right fix.

Hmm, that sounds familiar all of a sudden. [ digs in archives... ]
Is this proposed patch addressing the same thing?

http://archives.postgresql.org/pgsql-hackers/2008-11/msg00367.php

It hasn't gotten applied, probably because no one else confirmed it
was needed, but if you can confirm it ...

regards, tom lane

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-25-2008, 08:50 PM
Jon Burgess
 
Default error compiling postgresql with fedora mingw

On Tue, 2008-11-25 at 16:36 -0500, Tom Lane wrote:
> Jon Burgess <jburgess777@googlemail.com> writes:
> > On Tue, 2008-11-25 at 14:19 -0500, Tom Lane wrote:
> >> That makes sense. Could you have simplified matters by just prepending
> >> /usr/i686-pc-mingw32/bin to your PATH?
>
> > That seems to work OK but you still need the
> > DLLTOOL=/usr/i686-pc-mingw32/bin/dlltool

Sorry I pasted the wrong one. I meant to say:
DLLWRAP=i686-pc-mingw32-dllwrap

There is no 'dllwrap' executable in the MinGW bin directory.

> Hmm ... I see a "dlltool" that should probably be "$(DLLTOOL)" in
> src/pl/plpython/Makefile ... are there other omissions?

I suspect I didn't build any of the language bindings so I didn't see
that.

> > I forgot to mention that some of the Makefiles have hard coded
> > references to windres which need replacing
> > with /usr/bin/i686-pc-mingw32-windres
>
> Again, seems like tweaking the PATH should have taken care of that.

There is no 'windres' executable, perhaps there should be.


> I think that upstream would be willing to take any patches needed to
> make this work with just the PATH tweak. I'm not in a position to
> test it myself though, so if you'd put together a tested patch I'd
> be much obliged.
>
>
> >> UNICODE_STRING? I don't see anything like that in the Postgres sources.
>
> > The problem looked like it was in the MinGW header files. Some PG code
> > was pulling in sspi.h which includes the line:
>
> > typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
>
> > I tweked a few things to #include <ntdef.h> which fixed it but I'm not
> > sure this is the right fix.
>
> Hmm, that sounds familiar all of a sudden. [ digs in archives... ]
> Is this proposed patch addressing the same thing?
>
> http://archives.postgresql.org/pgsql-hackers/2008-11/msg00367.php
>
> It hasn't gotten applied, probably because no one else confirmed it
> was needed, but if you can confirm it ...

The patches probably would address the issue. OTOH, if they are not
required on Windows then it suggests to me that the problem is with
mingw32-w32api and not PostgreSQL.

Jon


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-26-2008, 10:00 AM
"Richard W.M. Jones"
 
Default error compiling postgresql with fedora mingw

On Tue, Nov 25, 2008 at 08:43:12AM -0200, Itamar - IspBrasil wrote:
> `/home/itamar/fedora/mingw-postgresql/postgresql-8.3.5/src/port'
> i686-pc-mingw32-gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -Wall
> -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -fwrapv zic.o ialloc.o scheck.o localtime.o -L../../src/port
> -Wl,--allow-multiple-definition -lpgport -lz -lm -lws2_32 -lshfolder
> -o zic.exe
> ../../src/port/libpgport.a: could not read symbols: Archive has no
> index; run ranlib to add one

Probably best to ask Fedora MinGW questions on the Fedora MinGW list
next time ...

https://admin.fedoraproject.org/mailman/listinfo/fedora-mingw

In this case the error is that the script uses 'ar' to create a static
library. Either use 'i686-pc-mingw32-ar rcs' to make the library, or
run 'i686-pc-mingw32-ranlib' on the library generated above by 'ar'.

Rich.

--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-26-2008, 10:03 AM
"Richard W.M. Jones"
 
Default error compiling postgresql with fedora mingw

On Tue, Nov 25, 2008 at 04:36:16PM -0500, Tom Lane wrote:
> Jon Burgess <jburgess777@googlemail.com> writes:
> > I forgot to mention that some of the Makefiles have hard coded
> > references to windres which need replacing
> > with /usr/bin/i686-pc-mingw32-windres
>
> Again, seems like tweaking the PATH should have taken care of that.
>
> I think that upstream would be willing to take any patches needed to
> make this work with just the PATH tweak. I'm not in a position to
> test it myself though, so if you'd put together a tested patch I'd
> be much obliged.

Hmm .. Tweaking $PATH hasn't been necessary on any of the other 50+
libraries we've done. The Makefiles should allow you to override key
programs by using ${WINDRES) instead of 'windres' (etc.) In this case
there is no path that contains an executable called 'windres' anyway.

Rich.

--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-26-2008, 10:05 AM
"Daniel P. Berrange"
 
Default error compiling postgresql with fedora mingw

On Tue, Nov 25, 2008 at 02:19:27PM -0500, Tom Lane wrote:
> Jon Burgess <jburgess777@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 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 will at least allow for easy
override when doing a mingw build by adding AR=i686-pc-mingw32-ar to
the make flags.

Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 11:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org