Lists: | pgsql-hackers-win32pgsql-patches |
---|
From: | Michiel Ephraim <ephraim(at)euph1(dot)xs4all(dot)nl> |
---|---|
To: | pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | build annoyences |
Date: | 2004-04-11 19:26:20 |
Message-ID: | 200404112126.20701.ephraim@euph1.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
dear hackers-win32 list,
When building today's CVS version for win32, i found a few little things which
stopped a clean "gmake && gmake install". Most of them are missing .exe
extensions in the makefiles.
A diff is attached to this mail. Changes to "src/makefiles/Makefile.win32"
were only necessary for cross-compilation.
My setup is
compiler: mingw32-gcc (GCC) 3.3.1 (mingw special 20030804-1)
host: FreeBSD euph4 5.2-RELEASE
configure options used: --host=mingw32 --prefix=/opt/postgres-mingw32
--without-readline --without-zlib
The gcc is setup as a cross-compiler for mingw32, and is simply installed from
ports.
Hope this is useful for anyone,
Michiel
Attachment | Content-Type | Size |
---|---|---|
ME-DIFFs | text/x-diff | 6.8 KB |
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Michiel Ephraim <ephraim(at)euph1(dot)xs4all(dot)nl> |
Cc: | pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: build annoyences |
Date: | 2004-04-19 22:32:39 |
Message-ID: | 200404192232.i3JMWdH27814@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
Michiel Ephraim wrote:
>
> dear hackers-win32 list,
>
> When building today's CVS version for win32, i found a few little things which
> stopped a clean "gmake && gmake install". Most of them are missing .exe
> extensions in the makefiles.
>
> A diff is attached to this mail. Changes to "src/makefiles/Makefile.win32"
> were only necessary for cross-compilation.
>
> My setup is
> compiler: mingw32-gcc (GCC) 3.3.1 (mingw special 20030804-1)
> host: FreeBSD euph4 5.2-RELEASE
> configure options used: --host=mingw32 --prefix=/opt/postgres-mingw32
> --without-readline --without-zlib
>
> The gcc is setup as a cross-compiler for mingw32, and is simply installed from
> ports.
Interesting. I am confused why others didn't need these changes. In
psql's Makefile I see:
psql: $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
...
install: all installdirs
$(INSTALL_PROGRAM) psql$(X) $(DESTDIR)$(bindir)/psql$(X)
Why do other compilers output .exe from CC? Is it because you are
cross-compiling? Also, why did you need to change the #include in
snprintf?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Michiel Ephraim <ephraim(at)euph1(dot)xs4all(dot)nl> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Michiel Ephraim <ephraim(at)euph1(dot)xs4all(dot)nl>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: build annoyences |
Date: | 2004-04-20 21:57:14 |
Message-ID: | 200404202357.14872.ephraim@euph1.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
On Tuesday 20 April 2004 00:32, Bruce Momjian wrote:
> Michiel Ephraim wrote:
> > dear hackers-win32 list,
> >
> > When building today's CVS version for win32, i found a few little things
> > which stopped a clean "gmake && gmake install". Most of them are missing
> > .exe extensions in the makefiles.
> >
> > A diff is attached to this mail. Changes to
> > "src/makefiles/Makefile.win32" were only necessary for cross-compilation.
> >
> > My setup is
> > compiler: mingw32-gcc (GCC) 3.3.1 (mingw special 20030804-1)
> > host: FreeBSD euph4 5.2-RELEASE
> > configure options used: --host=mingw32 --prefix=/opt/postgres-mingw32
> > --without-readline --without-zlib
> >
> > The gcc is setup as a cross-compiler for mingw32, and is simply installed
> > from ports.
>
> Interesting. I am confused why others didn't need these changes. In
> psql's Makefile I see:
>
> psql: $(OBJS) $(libpq_builddir)/libpq.a
> $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
> ...
>
> install: all installdirs
> $(INSTALL_PROGRAM) psql$(X) $(DESTDIR)$(bindir)/psql$(X)
>
> Why do other compilers output .exe from CC? Is it because you are
> cross-compiling? Also, why did you need to change the #include in
> snprintf?
Hi Bruce,
Thanks for the response.
Most likely you are right about the cross-compiling. In that case the compiler
doesn't add the .exe by itself. Actually in one case, there was already a
$(X) in the link line. So, I guess, it doesn't hurt.
I removed the #include because it isn't available in my compiler setup. The
freebsd port is used here.
For your information, let me list the versions:
as reported with "--version":
mingw32-gcc (GCC) 3.3.1 (mingw special 20030804-1)
GNU ld version 2.15.90 20040222
as reported with "pkg_info | grep mingw32"
mingw32-bin-msvcrt-r3.2.a2.5 Headers and Libraries for Windows
cross-development
mingw32-binutils-2.15.90.20040222.1,1 FSF binutils-2.14 for Windows
cross-development
mingw32-gcc-3.3.1.20030804.1_3,1 FSF gcc-3.3 for Windows cross-development
I can try to install a newer cross-compiler by hand, instead of the port, and
try again.
Interesting, I am confused no one else uses a cross-compiler ;)
If you want me to do more tests, i can do those tomorrow morning,
Michiel
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Michiel Ephraim <ephraim(at)euph1(dot)xs4all(dot)nl> |
Cc: | pgsql-hackers-win32(at)postgresql(dot)org, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: build annoyences |
Date: | 2004-04-26 17:42:24 |
Message-ID: | 200404261742.i3QHgOe15855@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
Michiel Ephraim wrote:
> On Tuesday 20 April 2004 00:32, Bruce Momjian wrote:
> > Michiel Ephraim wrote:
> > > dear hackers-win32 list,
> > >
> > > When building today's CVS version for win32, i found a few little things
> > > which stopped a clean "gmake && gmake install". Most of them are missing
> > > .exe extensions in the makefiles.
> > >
> > > A diff is attached to this mail. Changes to
> > > "src/makefiles/Makefile.win32" were only necessary for cross-compilation.
> > >
> > > My setup is
> > > compiler: mingw32-gcc (GCC) 3.3.1 (mingw special 20030804-1)
> > > host: FreeBSD euph4 5.2-RELEASE
> > > configure options used: --host=mingw32 --prefix=/opt/postgres-mingw32
> > > --without-readline --without-zlib
> > >
> > > The gcc is setup as a cross-compiler for mingw32, and is simply installed
> > > from ports.
> >
> > Interesting. I am confused why others didn't need these changes. In
> > psql's Makefile I see:
> >
> > psql: $(OBJS) $(libpq_builddir)/libpq.a
> > $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
> > ...
> >
> > install: all installdirs
> > $(INSTALL_PROGRAM) psql$(X) $(DESTDIR)$(bindir)/psql$(X)
> >
> > Why do other compilers output .exe from CC? Is it because you are
> > cross-compiling? Also, why did you need to change the #include in
> > snprintf?
>
> Hi Bruce,
>
> Thanks for the response.
>
> Most likely you are right about the cross-compiling. In that case the compiler
> doesn't add the .exe by itself. Actually in one case, there was already a
> $(X) in the link line. So, I guess, it doesn't hurt.
Yes, I see that backend/Makefile already had the $(X) for link lines so
it seems it is necessary. I applied the attached patch that adds $(X)
to the other links.
I don't think we have a lot of folks using a mingw compiler on Unix
systems, yet. :-)
Thanks.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 6.4 KB |