Re: VC++ psql build broken

Started by Dave Pagealmost 22 years ago12 messagespatches
Jump to latest
#1Dave Page
dpage@pgadmin.org

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 10 September 2004 17:41
To: pgman@candle.pha.pa.us
Cc: Dave Page; PgSQL Win32 developers
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

Now that I think of it, flex will not work because there is
no *.mak rule to run it. You would have to run it manually,
or write a *.mak rule for it. If someone does, please do
bcc.make too.

Patch attached. It works find under VC++, but the Borland mod is an
untested copy/paste.

Unfortunately, psql still doesn't build giving the errors below. I
should point out that I have no interest in psql but am happy to keep
testing the build. I do wonder if there is any need to maintain these
makefiles at all now it builds under Mingw - it's not like psql is a
library like libpq that vc++ or bcc needs to link to (which I do need).

Regards, Dave.

cd ..\..\bin\psql
nmake /f win32.mak

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

flex.exe -Cfe -opsqlscan.c psqlscan.l
echo #define PGBINDIR "" >"..\..\port\pg_config_paths.h"
echo #define PGSHAREDIR "" >>"..\..\port\pg_config_paths.h"
echo #define SYSCONFDIR "" >>"..\..\port\pg_config_paths.h"
echo #define INCLUDEDIR "" >>"..\..\port\pg_config_paths.h"
echo #define PKGINCLUDEDIR "" >>"..\..\port\pg_config_paths.h"
echo #define INCLUDEDIRSERVER ""

"..\..\port\pg_config_paths.h"

echo #define LIBDIR "" >>"..\..\port\pg_config_paths.h"
echo #define PKGLIBDIR "" >>"..\..\port\pg_config_paths.h"
echo #define LOCALEDIR "" >>"..\..\port\pg_config_paths.h"
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nma03280.
sprompt.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmb03280.
getopt.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmc03280.
getopt_long.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmd03280.
path.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nme03280.
command.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
common.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
common.c(536) : warning C4018: '<' : signed/unsigned mismatch
help.c
input.c
stringutils.c
mainloop.c
mainloop.c(253) : warning C4018: '==' : signed/unsigned mismatch
copy.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
startup.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
prompt.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
variables.c
large_obj.c
print.c
print.c(1238) : warning C4090: 'function' : different 'const' qualifiers
print.c(1238) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
print.c(1239) : warning C4090: 'function' : different 'const' qualifiers
print.c(1239) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
describe.c
psqlscan.c
tab-complete.c
mbprint.c
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' :
return co
de '0x2'
Stop.

Attachments:

psql_win32_makefiles.diffapplication/octet-stream; name=psql_win32_makefiles.diffDownload+10-2
#2Bruce Momjian
bruce@momjian.us
In reply to: Dave Page (#1)

How does your Win32 system rename prototype differ from what is in
port.h?

extern int pgrename(const char *from, const char *to);
extern int pgunlink(const char *path);

Good question on wether we need to keep this working but it would be
nice to keep it I guess for client-only installs that want to build from
source using non-Mingw.

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

Dave Page wrote:

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 10 September 2004 17:41
To: pgman@candle.pha.pa.us
Cc: Dave Page; PgSQL Win32 developers
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

Now that I think of it, flex will not work because there is
no *.mak rule to run it. You would have to run it manually,
or write a *.mak rule for it. If someone does, please do
bcc.make too.

Patch attached. It works find under VC++, but the Borland mod is an
untested copy/paste.

Unfortunately, psql still doesn't build giving the errors below. I
should point out that I have no interest in psql but am happy to keep
testing the build. I do wonder if there is any need to maintain these
makefiles at all now it builds under Mingw - it's not like psql is a
library like libpq that vc++ or bcc needs to link to (which I do need).

Regards, Dave.

cd ..\..\bin\psql
nmake /f win32.mak

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

flex.exe -Cfe -opsqlscan.c psqlscan.l
echo #define PGBINDIR "" >"..\..\port\pg_config_paths.h"
echo #define PGSHAREDIR "" >>"..\..\port\pg_config_paths.h"
echo #define SYSCONFDIR "" >>"..\..\port\pg_config_paths.h"
echo #define INCLUDEDIR "" >>"..\..\port\pg_config_paths.h"
echo #define PKGINCLUDEDIR "" >>"..\..\port\pg_config_paths.h"
echo #define INCLUDEDIRSERVER ""

"..\..\port\pg_config_paths.h"

echo #define LIBDIR "" >>"..\..\port\pg_config_paths.h"
echo #define PKGLIBDIR "" >>"..\..\port\pg_config_paths.h"
echo #define LOCALEDIR "" >>"..\..\port\pg_config_paths.h"
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nma03280.
sprompt.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmb03280.
getopt.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmc03280.
getopt_long.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmd03280.
path.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nme03280.
command.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
common.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
common.c(536) : warning C4018: '<' : signed/unsigned mismatch
help.c
input.c
stringutils.c
mainloop.c
mainloop.c(253) : warning C4018: '==' : signed/unsigned mismatch
copy.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
startup.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
prompt.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
variables.c
large_obj.c
print.c
print.c(1238) : warning C4090: 'function' : different 'const' qualifiers
print.c(1238) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
print.c(1239) : warning C4090: 'function' : different 'const' qualifiers
print.c(1239) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
describe.c
psqlscan.c
tab-complete.c
mbprint.c
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' :
return co
de '0x2'
Stop.

Content-Description: psql_win32_makefiles.diff

[ Attachment, skipping... ]

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Bruce Momjian (#2)
Re: [PATCHES] VC++ psql build broken

Bruce Momjian wrote:

How does your Win32 system rename prototype differ from what is in
port.h?

What is the need of *any* special file handling functions for client tools?

Regards,
Andreas

#4Bruce Momjian
bruce@momjian.us
In reply to: Andreas Pflug (#3)
Re: [PATCHES] VC++ psql build broken

Andreas Pflug wrote:

Bruce Momjian wrote:

How does your Win32 system rename prototype differ from what is in
port.h?

What is the need of *any* special file handling functions for client tools?

We could avoid it but it does give us Unix semantics so it seemed good
to keep it if we could.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Bruce Momjian (#4)
Re: [PATCHES] VC++ psql build broken

Bruce Momjian wrote:

Andreas Pflug wrote:

Bruce Momjian wrote:

How does your Win32 system rename prototype differ from what is in
port.h?

What is the need of *any* special file handling functions for client tools?

We could avoid it but it does give us Unix semantics so it seemed good
to keep it if we could.

As you can see it creates much pain, without any use. The functions are
for backend concurrent/shared access purposes only.

Regards,
Andreas

#6Bruce Momjian
bruce@momjian.us
In reply to: Andreas Pflug (#5)
Re: [PATCHES] VC++ psql build broken

Andreas Pflug wrote:

Bruce Momjian wrote:

Andreas Pflug wrote:

Bruce Momjian wrote:

How does your Win32 system rename prototype differ from what is in
port.h?

What is the need of *any* special file handling functions for client tools?

We could avoid it but it does give us Unix semantics so it seemed good
to keep it if we could.

As you can see it creates much pain, without any use. The functions are
for backend concurrent/shared access purposes only.

Are we sure of that always? And we don't know what other applications
might be looking at those files.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#7Dave Page
dpage@pgadmin.org
In reply to: Bruce Momjian (#6)

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 September 2004 14:59
To: Dave Page
Cc: PgSQL Win32 developers; PostgreSQL Patches
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

How does your Win32 system rename prototype differ from what
is in port.h?

extern int pgrename(const char *from, const char *to);

_CRTIMP int __cdecl rename(const char *, const char *);

extern int pgunlink(const char *path);

_CRTIMP int __cdecl _unlink(const char *);

Good question on wether we need to keep this working but it
would be nice to keep it I guess for client-only installs
that want to build from source using non-Mingw.

Nice, but not essential. I certainly don't think it's worth spending
excessive amounts of energy on though.

Regards, Dave

#8Bruce Momjian
bruce@momjian.us
In reply to: Dave Page (#1)

I have applied the attached patch. I changed psqlscan to only require
flex when it needs to rebuild the flex output:

psqlscan.c: psqlscan.l
$(FLEX) -Cfe -opsqlscan.c psqlscan.l

Because we normally ship the flex output in the tarball I didn't bother
to document that flex is required for CVS builds. We already require
flex for CVS builds so this isn't anything special.

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

Dave Page wrote:

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 10 September 2004 17:41
To: pgman@candle.pha.pa.us
Cc: Dave Page; PgSQL Win32 developers
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

Now that I think of it, flex will not work because there is
no *.mak rule to run it. You would have to run it manually,
or write a *.mak rule for it. If someone does, please do
bcc.make too.

Patch attached. It works find under VC++, but the Borland mod is an
untested copy/paste.

Unfortunately, psql still doesn't build giving the errors below. I
should point out that I have no interest in psql but am happy to keep
testing the build. I do wonder if there is any need to maintain these
makefiles at all now it builds under Mingw - it's not like psql is a
library like libpq that vc++ or bcc needs to link to (which I do need).

Regards, Dave.

cd ..\..\bin\psql
nmake /f win32.mak

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

flex.exe -Cfe -opsqlscan.c psqlscan.l
echo #define PGBINDIR "" >"..\..\port\pg_config_paths.h"
echo #define PGSHAREDIR "" >>"..\..\port\pg_config_paths.h"
echo #define SYSCONFDIR "" >>"..\..\port\pg_config_paths.h"
echo #define INCLUDEDIR "" >>"..\..\port\pg_config_paths.h"
echo #define PKGINCLUDEDIR "" >>"..\..\port\pg_config_paths.h"
echo #define INCLUDEDIRSERVER ""

"..\..\port\pg_config_paths.h"

echo #define LIBDIR "" >>"..\..\port\pg_config_paths.h"
echo #define PKGLIBDIR "" >>"..\..\port\pg_config_paths.h"
echo #define LOCALEDIR "" >>"..\..\port\pg_config_paths.h"
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nma03280.
sprompt.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmb03280.
getopt.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmc03280.
getopt_long.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmd03280.
path.c
cl.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nme03280.
command.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
common.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
common.c(536) : warning C4018: '<' : signed/unsigned mismatch
help.c
input.c
stringutils.c
mainloop.c
mainloop.c(253) : warning C4018: '==' : signed/unsigned mismatch
copy.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
startup.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
prompt.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(176) : error C2375: 'pgrename' :
redefini
tion; different linkage
..\..\include\port.h(167) : see declaration of 'pgrename'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(244) : error C2375: 'pgunlink' :
redefini
tion; different linkage
..\..\include\port.h(168) : see declaration of 'pgunlink'
variables.c
large_obj.c
print.c
print.c(1238) : warning C4090: 'function' : different 'const' qualifiers
print.c(1238) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
print.c(1239) : warning C4090: 'function' : different 'const' qualifiers
print.c(1239) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
describe.c
psqlscan.c
tab-complete.c
mbprint.c
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' :
return co
de '0x2'
Stop.

Content-Description: psql_win32_makefiles.diff

[ Attachment, skipping... ]

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+14-6
#9Bruce Momjian
bruce@momjian.us
In reply to: Dave Page (#7)

I have fixed this issue with Dave's help.

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

Dave Page wrote:

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 September 2004 14:59
To: Dave Page
Cc: PgSQL Win32 developers; PostgreSQL Patches
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

How does your Win32 system rename prototype differ from what
is in port.h?

extern int pgrename(const char *from, const char *to);

_CRTIMP int __cdecl rename(const char *, const char *);

extern int pgunlink(const char *path);

_CRTIMP int __cdecl _unlink(const char *);

Good question on wether we need to keep this working but it
would be nice to keep it I guess for client-only installs
that want to build from source using non-Mingw.

Nice, but not essential. I certainly don't think it's worth spending
excessive amounts of energy on though.

Regards, Dave

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#10Dave Page
dpage@pgadmin.org
In reply to: Bruce Momjian (#9)

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 27 September 2004 23:58
To: Dave Page
Cc: PgSQL Win32 developers; PostgreSQL Patches
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

I have fixed this issue with Dave's help.

Hmm, not entirely it seems. An include path got missed out of the patch
- see the attached fix. This also adds debug build support to
src/bin/psql/win32.mak.

Also:

- The crash I was seeing last night appears to only occur when using
mingw compiled libpq. Using the ones compiled with the VC++ build works
just fine. The Windows installer puts libpq.dll and a couple of SSL libs
in the Windows\System32 directory, so this potentially could cause some
support emails.

Strangely, pgAdmin works OK with my mingw compiled libpq.dll (with an
import lib created from pq.def using VC++'s lib.exe), even though it is
built with VC++ Windows. It crashes with the VC++ compiled libpq.

- Compiling on a clean tree I now get the warnings below (sorry, I must
have forgotten to try a completely clean build in my weary state last
night :-) ):

command.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\direct.h(132) : warning C4003: not
enough actual parameters for macro 'mkdir'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
common.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
common.c(536) : warning C4018: '<' : signed/unsigned mismatch
copy.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
describe.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
help.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
input.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
large_obj.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
mainloop.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macr
o redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
mainloop.c(253) : warning C4018: '==' : signed/unsigned mismatch
mbprint.c
print.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
print.c(1238) : warning C4090: 'function' : different 'const' qualifiers
print.c(1238) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
print.c(1239) : warning C4090: 'function' : different 'const' qualifiers
print.c(1239) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
prompt.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
psqlscan.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macr
o redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macr
o redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
startup.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
stringutils.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
tab-complete.c
variables.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macr
o redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
link.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmh02044.
cd ..\..
echo All Win32 parts have been built!
All Win32 parts have been built!

Regards, Dave

Attachments:

win32.diffapplication/octet-stream; name=win32.diffDownload+24-9
#11Dave Page
dpage@pgadmin.org
In reply to: Dave Page (#10)

-----Original Message-----
From: pgsql-hackers-win32-owner@postgresql.org
[mailto:pgsql-hackers-win32-owner@postgresql.org] On Behalf
Of Dave Page
Sent: 28 September 2004 12:06
To: Bruce Momjian
Cc: PgSQL Win32 developers; PostgreSQL Patches
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

- The crash I was seeing last night appears to only occur
when using mingw compiled libpq. Using the ones compiled with
the VC++ build works just fine. The Windows installer puts
libpq.dll and a couple of SSL libs in the Windows\System32
directory, so this potentially could cause some support emails.

Following up myself, it appears that the mingw build exports all symbols
into pq.def before linking. The MSVC++/Borland builds uses a much more
limited set of exports which appear to correspond with the published API
(see all the other .def files in src/interfaces/libpq). A quick manual
build using the mingw link steps, but substituting libpqdll.def for
pq.def builds a dll which appears to work. pgAdmin does not however,
though it appears that is because it is trying to use Pqgetssl et al.
which do not appear to be exported by the Win32 .def file.

It seems to me that the correct way to fix this is to add .def files for
SSL enabled builds of libpq, and stop the mingw build exporting every
symbol. I can probably fix the vc/borland builds (if that is the correct
way forward), but I don't know enough about make to fix the mingw build.

Regards, Dave.

#12Bruce Momjian
bruce@momjian.us
In reply to: Dave Page (#10)

Patch applied. Thanks.

I had removed the "/I ..\..\include\port\win32" because I thought it
wasn't needed anymore since I adjusted some include names, but I see it
is needed.

Thanks.

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

Dave Page wrote:

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 27 September 2004 23:58
To: Dave Page
Cc: PgSQL Win32 developers; PostgreSQL Patches
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken

I have fixed this issue with Dave's help.

Hmm, not entirely it seems. An include path got missed out of the patch
- see the attached fix. This also adds debug build support to
src/bin/psql/win32.mak.

Also:

- The crash I was seeing last night appears to only occur when using
mingw compiled libpq. Using the ones compiled with the VC++ build works
just fine. The Windows installer puts libpq.dll and a couple of SSL libs
in the Windows\System32 directory, so this potentially could cause some
support emails.

Strangely, pgAdmin works OK with my mingw compiled libpq.dll (with an
import lib created from pq.def using VC++'s lib.exe), even though it is
built with VC++ Windows. It crashes with the VC++ compiled libpq.

- Compiling on a clean tree I now get the warnings below (sorry, I must
have forgotten to try a completely clean build in my weary state last
night :-) ):

command.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\direct.h(132) : warning C4003: not
enough actual parameters for macro 'mkdir'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
common.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
common.c(536) : warning C4018: '<' : signed/unsigned mismatch
copy.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
describe.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
help.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
input.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
large_obj.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
mainloop.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macr
o redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
mainloop.c(253) : warning C4018: '==' : signed/unsigned mismatch
mbprint.c
print.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
print.c(1238) : warning C4090: 'function' : different 'const' qualifiers
print.c(1238) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
print.c(1239) : warning C4090: 'function' : different 'const' qualifiers
print.c(1239) : warning C4022: 'free' : pointer mismatch for actual
parameter 1
prompt.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
psqlscan.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macr
o redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macr
o redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
startup.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
stringutils.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macro redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
tab-complete.c
variables.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005:
'SIG_DFL' : macro redefinition
..\..\include\port/win32.h(118) : see previous definition of
'SIG_DFL'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005:
'SIG_IGN' : macr
o redefinition
..\..\include\port/win32.h(120) : see previous definition of
'SIG_IGN'
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005:
'SIG_ERR' : macro redefinition
..\..\include\port/win32.h(119) : see previous definition of
'SIG_ERR'
link.exe @C:\DOCUME~1\dpage\LOCALS~1\Temp\nmh02044.
cd ..\..
echo All Win32 parts have been built!
All Win32 parts have been built!

Regards, Dave

Content-Description: win32.diff

[ Attachment, skipping... ]

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073