Thread: can't build libpq with beta 2

can't build libpq with beta 2

From
"Dann Corbit"
Date:
U:\postgresql-8.0.0beta2\src\interfaces\libpq>nmake /f win32.mak
 
Microsoft (R) Program Maintenance Utility Version 8.00.40607.16
Copyright (C) Microsoft Corporation.  All rights reserved.
 
Building the Win32 static library...
 
        cl.exe @u:\tmp\nm33D2.tmp
cl : Command line warning D9002 : ignoring unknown option '/YX'
cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
getaddrinfo.c
..\..\include\c.h(66) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.

Re: can't build libpq with beta 2

From
Bruce Momjian
Date:
Wow, I have no idea why that is failing.  I just fixed some VC problems
for someone but they were actual bugs related to path.c.  Your failure
looks like a build tools problem.

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

Dann Corbit wrote:
> U:\postgresql-8.0.0beta2\src\interfaces\libpq>nmake /f win32.mak
>
> Microsoft (R) Program Maintenance Utility Version 8.00.40607.16
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> Building the Win32 static library...
>
>         cl.exe @u:\tmp\nm33D2.tmp
> cl : Command line warning D9002 : ignoring unknown option '/YX'
> cl : Command line warning D9035 : option 'GX' has been deprecated and
> will be removed in a future release
> cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
> getaddrinfo.c
> ..\..\include\c.h(66) : fatal error C1083: Cannot open include file:
> 'strings.h': No such file or directory
> NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
> Stop.
>

--
  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

Re: can't build libpq with beta 2

From
reina_ga@hotmail.com (Tony Reina)
Date:
You've probably done this, but I should ask anyway.

Did you run the vcvars.bat to set the environment variables for MS VC?

I know I've run into this is previous versions, but IIRC it was operator error.

-Tony

Re: can't build libpq with beta 2

From
reina_ga@hotmail.com (Tony Reina)
Date:
I think the strings.h problem is because you probably ran the
configure script with mingw prior to your MS Visual Studio build. It
sets up a pg_config.h within $PG/src/include which is defined for
mingw not for MS Visual Studio. If you simply delete that file, then
the win32.mak makefile will correctly overwrite pg_config.h.win32 to
the pg_config.h.

That should get you past the problem.
-Tony