Hi,

I have tested current snapshot (from CVS) to compile and run on Windows NT.

It compiles mostly OK. The only problem is with linking the libpq++, but it
can be a general problem:

pgcursordb.o: In function `_8PgCursorRC12PgConnectionPCc':
/usr/src/pgsql.test/src/interfaces/libpq++/pgcursordb.cc:37: undefined
reference
 to `PgTransaction::PgTransaction(PgConnection const &)'

and it also need this small patch:
------------- cut here -------------
--- /usr/src/pgsql/src/interfaces/libpq++/Makefile.in	Mon May 24 12:04:49
1999
+++ src/interfaces/libpq++/Makefile.in	Wed May 26 15:29:05 1999
@@ -44,7 +44,11 @@
 
 OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o 
 
+ifeq ($(PORTNAME), win)
+SHLIB_LINK+= --driver-name g++ -L../libpq -lpq
+else
 SHLIB_LINK= -L../libpq -lpq
+endif
 
 # Shared library stuff, also default 'all' target
 include $(SRCDIR)/Makefile.shlib
------------- cut here -------------

Here is current regress.out:
int2 .. failed
int4 .. failed
float8 .. failed
geometry .. failed
-> these are unimportant (libc messages, precision)

datetime .. failed
abstime .. failed
tinterval .. failed
horology .. failed
-> it seems so that there are only differences in strings for timezones
there

random .. failed
*** expected/random.out Wed May 26 13:05:47 1999
--- results/random.out  Wed May 26 15:04:57 1999
***************
*** 19,23 ****
    WHERE random NOT BETWEEN 80 AND 120;
  random
  ------
! (0 rows)

--- 19,24 ----
    WHERE random NOT BETWEEN 80 AND 120;
  random
  ------
!    123
! (1 row)


rules .. failed
-> different order of some lines (unimportant)

The remaining test are OK.

			Dan

PS: Change my name in the doc/src/sgml/ports.sgml from "Horak Daniel" to
"Daniel Horak", please.

----------------------------------------------
Daniel Horak
network and system administrator
e-mail: horak@mmp.plzen-city.cz
privat e-mail: dan.horak@email.cz ICQ:36448176
----------------------------------------------

Wed, 26 May 1999 15:28:00 +0200
Horak Daniel <horak@mmp.plzen-city.cz>
report for Win32 port
On Wed, 26 May 1999, Horak Daniel wrote:

> Hi,
> 
> I have tested current snapshot (from CVS) to compile and run on Windows NT.
> 
> It compiles mostly OK. The only problem is with linking the libpq++, but it
> can be a general problem:
> 
> pgcursordb.o: In function `_8PgCursorRC12PgConnectionPCc':
> /usr/src/pgsql.test/src/interfaces/libpq++/pgcursordb.cc:37: undefined
> reference
>  to `PgTransaction::PgTransaction(PgConnection const &)'

Interesting.  I wonder if any other platforms or compilers are also 
showing this...  I'll submit the patch later today.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Wed, 26 May 1999 11:30:43 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: [HACKERS] report for Win32 port
Applied(the libpq++ part).


[Charset iso-8859-2 unsupported, filtering to ASCII...]
> Hi,
> 
> I have tested current snapshot (from CVS) to compile and run on Windows NT.
> 
> It compiles mostly OK. The only problem is with linking the libpq++, but it
> can be a general problem:
> 
> pgcursordb.o: In function `_8PgCursorRC12PgConnectionPCc':
> /usr/src/pgsql.test/src/interfaces/libpq++/pgcursordb.cc:37: undefined
> reference
>  to `PgTransaction::PgTransaction(PgConnection const &)'
> 
> and it also need this small patch:
> ------------- cut here -------------
> --- /usr/src/pgsql/src/interfaces/libpq++/Makefile.in	Mon May 24 12:04:49
> 1999
> +++ src/interfaces/libpq++/Makefile.in	Wed May 26 15:29:05 1999
> @@ -44,7 +44,11 @@
>  
>  OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o 
>  
> +ifeq ($(PORTNAME), win)
> +SHLIB_LINK+= --driver-name g++ -L../libpq -lpq
> +else
>  SHLIB_LINK= -L../libpq -lpq
> +endif
>  
>  # Shared library stuff, also default 'all' target
>  include $(SRCDIR)/Makefile.shlib
> ------------- cut here -------------
> 
> Here is current regress.out:
> int2 .. failed
> int4 .. failed
> float8 .. failed
> geometry .. failed
> -> these are unimportant (libc messages, precision)
> 
> datetime .. failed
> abstime .. failed
> tinterval .. failed
> horology .. failed
> -> it seems so that there are only differences in strings for timezones
> there
> 
> random .. failed
> *** expected/random.out Wed May 26 13:05:47 1999
> --- results/random.out  Wed May 26 15:04:57 1999
> ***************
> *** 19,23 ****
>     WHERE random NOT BETWEEN 80 AND 120;
>   random
>   ------
> ! (0 rows)
> 
> --- 19,24 ----
>     WHERE random NOT BETWEEN 80 AND 120;
>   random
>   ------
> !    123
> ! (1 row)
> 
> 
> rules .. failed
> -> different order of some lines (unimportant)
> 
> The remaining test are OK.
> 
> 			Dan
> 
> PS: Change my name in the doc/src/sgml/ports.sgml from "Horak Daniel" to
> "Daniel Horak", please.
> 
> ----------------------------------------------
> Daniel Horak
> network and system administrator
> e-mail: horak@mmp.plzen-city.cz
> privat e-mail: dan.horak@email.cz ICQ:36448176
> ----------------------------------------------
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 26 May 1999 12:08:53 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] report for Win32 port
>
> On Wed, 26 May 1999, Horak Daniel wrote:
>
> > Hi,
> >
> > I have tested current snapshot (from CVS) to compile and run on Windows NT.
> >
> > It compiles mostly OK. The only problem is with linking the libpq++, but it
> > can be a general problem:
> >
> > pgcursordb.o: In function `_8PgCursorRC12PgConnectionPCc':
> > /usr/src/pgsql.test/src/interfaces/libpq++/pgcursordb.cc:37: undefined
> > reference
> >  to `PgTransaction::PgTransaction(PgConnection const &)'
>
> Interesting.  I wonder if any other platforms or compilers are also
> showing this...  I'll submit the patch later today.

g++  -Wno-error -Wno-unused -Wl,-Bdynamic -I/usr/local/pgsql/include -o testlibpq0 testlibpq0.cc -L/usr/local/pgsql/lib -lpq++
/tmp/cca280301.o: In function `main':
/tmp/cca280301.o(.text+0x14f): undefined reference to `getline__H2ZcZt18string_char_traits1Zc_R7istreamRt12basic_string2ZX01ZX11X01_R7istream'
/tmp/cca280301.o(.text+0x162): undefined reference to `__ne__H2ZcZt18string_char_traits1Zc_RCt12basic_string2ZX01ZX11PCX01_b'
/usr/local/pgsql/lib/libpq++.so: undefined reference to `crypt'
/usr/local/pgsql/lib/libpq++.so: undefined reference to `PgTransaction::PgTransaction(PgConnection const &)'
make: *** [testlibpq0] Error 1
[pgsql@orion] ~/devel/src/interfaces/libpq++/examples >

    Linux 2.1.88, glibc-2, gcc 2.8.1

    Whatever  these  errors  mean and whatever they might be good
    for.

    Up to now I thought it's due to a self made upgrade of shared
    libs.   That  one  was  a little hairy and didn't worked as I
    wanted it. BTW: since glibc-2 crypt() is in it's own library.

    Another  interesting  detail is that I have a Makefile.custom
    telling "COPT=-g",  but  I  don't  see  -g  in  the  compiler
    switches in the examples section.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #



Wed, 26 May 1999 19:34:05 +0200 (MET DST)
wieck@debis.com (Jan Wieck)
Re: [HACKERS] report for Win32 port

On 26-May-99 Jan Wieck wrote:
>>
>> On Wed, 26 May 1999, Horak Daniel wrote:
>>
>> > Hi,
>> >
>> > I have tested current snapshot (from CVS) to compile and run on Windows NT.
>> >
>> > It compiles mostly OK. The only problem is with linking the libpq++, but it
>> > can be a general problem:
>> >
>> > pgcursordb.o: In function `_8PgCursorRC12PgConnectionPCc':
>> > /usr/src/pgsql.test/src/interfaces/libpq++/pgcursordb.cc:37: undefined
>> > reference
>> >  to `PgTransaction::PgTransaction(PgConnection const &)'
>>
>> Interesting.  I wonder if any other platforms or compilers are also
>> showing this...  I'll submit the patch later today.
> 
> g++  -Wno-error -Wno-unused -Wl,-Bdynamic -I/usr/local/pgsql/include -o
> testlibpq0 testlibpq0.cc -L/usr/local/pgsql/lib -lpq++
> /tmp/cca280301.o: In function `main':
> /tmp/cca280301.o(.text+0x14f): undefined reference to
> `getline__H2ZcZt18string_char_traits1Zc_R7istreamRt12basic_string2ZX01ZX11X01_R7is
> tream'
> /tmp/cca280301.o(.text+0x162): undefined reference to
> `__ne__H2ZcZt18string_char_traits1Zc_RCt12basic_string2ZX01ZX11PCX01_b'
> /usr/local/pgsql/lib/libpq++.so: undefined reference to `crypt'
> /usr/local/pgsql/lib/libpq++.so: undefined reference to
> `PgTransaction::PgTransaction(PgConnection const &)'
> make: *** [testlibpq0] Error 1
> [pgsql@orion] ~/devel/src/interfaces/libpq++/examples >
> 
>     Linux 2.1.88, glibc-2, gcc 2.8.1
> 
>     Whatever  these  errors  mean and whatever they might be good
>     for.
> 
>     Up to now I thought it's due to a self made upgrade of shared
>     libs.   That  one  was  a little hairy and didn't worked as I
>     wanted it. BTW: since glibc-2 crypt() is in it's own library.
> 
>     Another  interesting  detail is that I have a Makefile.custom
>     telling "COPT=-g",  but  I  don't  see  -g  in  the  compiler
>     switches in the examples section.

I've just discovered that libpq++'s makefile uses whatever is defined as
CXX for the compiler.  It's defined as c++, which is ver 2.7.2.1 here.
When I force it to use g++28 (ver 2.8.1), it misses /usr/include/g++.
Adding that to the list of CXXFLAGS fixes that.  Now then..  Will it
break something on another platform if I were to leave that in the
list?  Anyone know?

Also with g++ 2.7.2.1 and 2.8.1 I can't duplicate the problem that Dan
mentions above.  Dan, what compiler/compiler version are you using???

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================



Wed, 26 May 1999 19:55:29 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: [HACKERS] report for Win32 port
Vince Vielhaber <vev@michvhf.com> writes:
> I've just discovered that libpq++'s makefile uses whatever is defined as
> CXX for the compiler.

As it should ...

> When I force it to use g++28 (ver 2.8.1), it misses /usr/include/g++.
> Adding that to the list of CXXFLAGS fixes that.  Now then..  Will it
> break something on another platform if I were to leave that in the
> list?

Absolutely.  For example: if someone has both g++ and a vendor C++
compiler installed, and tries to compile with the vendor C++, that
would fail because you'd be forcing the vendor C++ to try to eat
g++-specific include files.

The right place to fix any problem along this line is in configure,
*not* by hardwiring platform-dependent assumptions into libpq++'s
makefile.

If it's actually necessary to do what you suggest, then the way to
do it would be for configure to add -I/usr/include/g++ to CXXFLAGS
after checking that CXX is g++.  However, I misdoubt that you have
diagnosed the problem correctly, because the versions of gcc/g++
that I've used automatically include their private include areas into
the -I list.  This smells more like an incorrect installation of
g++ than a problem that Postgres ought to be solving.

			regards, tom lane

Wed, 26 May 1999 20:40:58 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] report for Win32 port 

On 27-May-99 Tom Lane wrote:
> Vince Vielhaber <vev@michvhf.com> writes:
>> I've just discovered that libpq++'s makefile uses whatever is defined as
>> CXX for the compiler.
> 
> As it should ...
> 
>> When I force it to use g++28 (ver 2.8.1), it misses /usr/include/g++.
>> Adding that to the list of CXXFLAGS fixes that.  Now then..  Will it
>> break something on another platform if I were to leave that in the
>> list?
> 
> Absolutely.  For example: if someone has both g++ and a vendor C++
> compiler installed, and tries to compile with the vendor C++, that
> would fail because you'd be forcing the vendor C++ to try to eat
> g++-specific include files.
> 
> The right place to fix any problem along this line is in configure,
> *not* by hardwiring platform-dependent assumptions into libpq++'s
> makefile.
> 
> If it's actually necessary to do what you suggest, then the way to
> do it would be for configure to add -I/usr/include/g++ to CXXFLAGS
> after checking that CXX is g++.  However, I misdoubt that you have
> diagnosed the problem correctly, because the versions of gcc/g++
> that I've used automatically include their private include areas into
> the -I list.  This smells more like an incorrect installation of
> g++ than a problem that Postgres ought to be solving.
> 
>                       regards, tom lane

More than likely this is the case.  FreeBSD comes with a version of gcc
and g++ installed.  In this case it's 2.7.2.1.   In ports/packages it has
gcc-2.8.1, but being pressed for time I installed the package (20 mins
before trying to build with it).  I was a bit surprised to see that it
installed in /usr/local/bin and didn't even put a link in /usr/local/include
or /usr/local/lib, so I probably need to look into the installation more.
The makefile *is* doing a test for g++ tho (it was already there, I didn't
do it :)

Fortunately xemacs saves a backup of the file you're working on with a ~
tacked onto the end.  That saved me some work (I have a tape backup but
didn't really want to have to restore from it).  I'm referring to libpq++.sgml
that I'm about to send to TommyG before I wipe it out again.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================



Wed, 26 May 1999 20:57:12 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: [HACKERS] report for Win32 port