Re: WIN32 Build?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Shoaib Mir <shoaibmir(at)gmail(dot)com>
Cc: DEV <dev(at)umpa-us(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: WIN32 Build?
Date: 2006-08-09 21:19:10
Message-ID: 200608092119.k79LJAJ21965@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Shoaib Mir wrote:
> Dev,
>
> You are doing it a little wrong for Debug version, in order to build the
> Debug version use the following:
>
> nmake /f win32.mak DEBUG=1
>
> Bruce,
>
> If you remove "inline" the build process goes fine and if you dont, it first
> gives a few warning and in the end quits the build process with a fatal
> error.

OK, good to know. If we ever find a symbol that is defined for that
compiler that we can test, we can fix this.

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

>
> Log shows:
>
> ..\..\backend\utils\mb\wchar.c(117) : error C2143: syntax error : missing
> ';' be
> fore '{'
> ..\..\backend\utils\mb\wchar.c(143) : warning C4013: 'pg_euc_mblen'
> undefined; a
> ssuming extern returning int
> ..\..\backend\utils\mb\wchar.c(180) : warning C4013: 'pg_euc_dsplen'
> undefined;
> assuming extern returning int
> NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
> Stop.
>
> Thanks,
> --
> Shoaib Mir
> EnterpriseDB (www.enterprisedb.com)
>
> On 8/10/06, DEV <dev(at)umpa-us(dot)com> wrote:
> >
> > Okay I get a build and I get the release of the libpq built but it does
> > not build the Debug version of that. I have tried going to the directory
> > and running nmake /f win32.mak DEBUG but it errors with:
> >
> > Building the Win32 static library...
> >
> >
> >
> > NMAKE : fatal error U1073: don't know how to make 'DEBUG'
> >
> > Stop.
> >
> >
> >
> > So what am I missing. I see in the mak file for debug but I can not see
> > how to enable that?
> >
> >
> > ------------------------------
> >
> > *From:* pgsql-general-owner(at)postgresql(dot)org [mailto:
> > pgsql-general-owner(at)postgresql(dot)org] *On Behalf Of *Shoaib Mir
> > *Sent:* Wednesday, August 09, 2006 3:30 PM
> > *To:* DEV
> > *Cc:* pgsql-general(at)postgresql(dot)org
> > *Subject:* Re: [GENERAL] WIN32 Build?
> >
> >
> >
> > I too faced same kind of a problem building libpq on Windows and as a
> > solution to it removed "inline" from the file "\backend\utils\mb\wchar.c"
> >
> > Did the following ... changed "static inline int" to "static int" instead
> > at a couple of places in the wchar.c file
> >
> > Run "nmake" after doing this specific change and hopefully it will solve
> > the problem.
> >
> > Thanks,
> > --
> > Shoaib Mir
> > EnterpriseDB ( www.enterprisedb.com)
> >
> > On 8/9/06, *DEV* <dev(at)umpa-us(dot)com> wrote:
> >
> > Hello all.
> >
> > I am trying to build postgres from the source on a WINXP system. I
> > am using MSVC++.Net and I use the link with it to get to the command
> > prompt. After I do that I run vcvars32.bat and the nmake /f win32.mak and
> > I get:
> >
> >
> >
> > C:\Dev\postgresql-8.1.4\src>nmake /f win32.mak
> >
> >
> >
> > Microsoft (R) Program Maintenance Utility Version 7.10.3077
> >
> > Copyright (C) Microsoft Corporation. All rights reserved.
> >
> >
> >
> > cd include
> >
> > if not exist pg_config.h copy pg_config.h.win32 pg_config.h
> >
> > cd ..
> >
> > cd interfaces\libpq
> >
> > nmake /f win32.mak
> >
> >
> >
> > Microsoft (R) Program Maintenance Utility Version 7.10.3077
> >
> > Copyright (C) Microsoft Corporation. All rights reserved.
> >
> >
> >
> > Building the Win32 static library...
> >
> >
> >
> > cl.exe @C:\DOCUME~1\doyleb\LOCALS~1\Temp\nm313.tmp
> >
> > cl : Command line warning D4029 : optimization is not available in the
> > standard
> >
> > edition compiler
> >
> > wchar.c
> >
> > ..\..\backend\utils\mb\wchar.c(100) : error C2054: expected '(' to follow
> > 'inlin
> >
> > e'
> >
> > ..\..\backend\utils\mb\wchar.c(101) : error C2085: 'pg_euc_mblen' : not in
> > forma
> >
> > l parameter list
> >
> > ..\..\backend\utils\mb\wchar.c(101) : error C2143: syntax error : missing
> > ';' be
> >
> > fore '{'
> >
> > ..\..\backend\utils\mb\wchar.c(116) : error C2054: expected '(' to follow
> > 'inlin
> >
> > e'
> >
> > ..\..\backend\utils\mb\wchar.c(117) : error C2085: 'pg_euc_dsplen' : not
> > in form
> >
> > al parameter list
> >
> > ..\..\backend\utils\mb\wchar.c(117) : error C2143: syntax error : missing
> > ';' be
> >
> > fore '{'
> >
> > ..\..\backend\utils\mb\wchar.c(143) : warning C4013: 'pg_euc_mblen'
> > undefined; a
> >
> > ssuming extern returning int
> >
> > ..\..\backend\utils\mb\wchar.c(180) : warning C4013: 'pg_euc_dsplen'
> > undefined;
> >
> > assuming extern returning int
> >
> > NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
> >
> > Stop.
> >
> > NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET
> > 2003\
> >
> > VC7\BIN\nmake.exe"' : return code '0x2'
> >
> > Stop.
> >
> >
> >
> > What do you I need to change to make this work?
> >
> >
> >
> > Brian Doyle
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Shoaib Mir
> EnterpriseDB (www.enterprisedb.com)

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shoaib Mir 2006-08-09 21:31:58 Re: WIN32 Build?
Previous Message Shoaib Mir 2006-08-09 21:15:10 Re: WIN32 Build?

Browse pgsql-hackers by date

  From Date Subject
Next Message korryd@enterprisedb.com 2006-08-09 21:24:28 Re: Plugins redux (was Re: [PATCHES] PL instrumentation plugin
Previous Message Bruce Momjian 2006-08-09 21:18:22 Re: [HACKERS] [PATCHES] BUG #2569: statement_timeout bug on