WIN32 Build?

Started by DEVover 19 years ago15 messages
#1DEV
dev@umpa-us.com

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

#2Shoaib Mir
shoaibmir@gmail.com
In reply to: DEV (#1)
Re: 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)

Show quoted text

On 8/9/06, DEV <dev@umpa-us.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

#3Bruce Momjian
bruce@momjian.us
In reply to: Shoaib Mir (#2)
Re: WIN32 Build?

Shoaib Mir wrote:

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.

Interesting. It seem the key line is here:

cl : Command line warning D4029 : optimization is not available in the
standard edition compiler

So the "standard" version doesn't support inline functions. To fix
that, I think we need some compiler define test to tell us if it is a
"standard" edition compiler.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

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

#4DEV
dev@umpa-us.com
In reply to: Bruce Momjian (#3)
Re: WIN32 Build?

Shoaib,
That looks like it worked thank you!

Bruce,
I am using the following compliler:
C:\Dev\postgresql-8.1.4\src\interfaces\libpq\Release>nmake --help

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Which came with
Microsoft Visual C++ .NET Version 7.1.3088

Don't know if that helps or not!

-----Original Message-----
From: Bruce Momjian [mailto:bruce@momjian.us]
Sent: Wednesday, August 09, 2006 3:41 PM
To: Shoaib Mir
Cc: DEV; pgsql-general@postgresql.org
Subject: Re: [GENERAL] WIN32 Build?

Shoaib Mir wrote:

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.

Interesting. It seem the key line is here:

cl : Command line warning D4029 : optimization is not available in the
standard edition compiler

So the "standard" version doesn't support inline functions. To fix
that, I think we need some compiler define test to tell us if it is a
"standard" edition compiler.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

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

#5Bruce Momjian
bruce@momjian.us
In reply to: DEV (#4)
Re: WIN32 Build?

DEV wrote:

Shoaib,
That looks like it worked thank you!

Bruce,
I am using the following compliler:
C:\Dev\postgresql-8.1.4\src\interfaces\libpq\Release>nmake --help

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Which came with
Microsoft Visual C++ .NET Version 7.1.3088

Don't know if that helps or not!

Not really. I need to see all the defines predefined by the compiler.
Anyone know how to do that on MSVC?

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

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

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: WIN32 Build?

Bruce Momjian <bruce@momjian.us> writes:

Interesting. It seem the key line is here:

cl : Command line warning D4029 : optimization is not available in the
standard edition compiler

So the "standard" version doesn't support inline functions.

Doesn't it simply ignore the inline keyword then? Count on Microsoft
for poorly designed tools, I suppose.

regards, tom lane

#7Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#6)
Re: WIN32 Build?

Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Interesting. It seem the key line is here:

cl : Command line warning D4029 : optimization is not available in the
standard edition compiler

So the "standard" version doesn't support inline functions.

Doesn't it simply ignore the inline keyword then? Count on Microsoft
for poorly designed tools, I suppose.

You would think so. Can someone confirm that the warning generates
errors later on?

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

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

#8DEV
dev@umpa-us.com
In reply to: Shoaib Mir (#2)
Re: WIN32 Build?

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@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Shoaib Mir
Sent: Wednesday, August 09, 2006 3:30 PM
To: DEV
Cc: pgsql-general@postgresql.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@umpa-us.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

#9Shoaib Mir
shoaibmir@gmail.com
In reply to: DEV (#8)
Re: WIN32 Build?

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.

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@umpa-us.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@postgresql.org [mailto:
pgsql-general-owner@postgresql.org] *On Behalf Of *Shoaib Mir
*Sent:* Wednesday, August 09, 2006 3:30 PM
*To:* DEV
*Cc:* pgsql-general@postgresql.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@umpa-us.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)

#10Bruce Momjian
bruce@momjian.us
In reply to: Shoaib Mir (#9)
Re: WIN32 Build?

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@umpa-us.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@postgresql.org [mailto:
pgsql-general-owner@postgresql.org] *On Behalf Of *Shoaib Mir
*Sent:* Wednesday, August 09, 2006 3:30 PM
*To:* DEV
*Cc:* pgsql-general@postgresql.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@umpa-us.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@momjian.us
EnterpriseDB http://www.enterprisedb.com

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

#11Shoaib Mir
shoaibmir@gmail.com
In reply to: Bruce Momjian (#10)
Re: WIN32 Build?

As a workaround if you dont want to make the change and delete "inline" from
wchar.c then you can do the following change in the win32.mak file for
libpq:

You can see at line 121 in win32.mak file as:

"WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" /YX\

Change it to

"WIN32" /D "_WINDOWS" /D "inline=__inline" /Fp"$(INTDIR)\libpq.pch" /YX\

This will help get rid of the libpq build problem without needing to remove
"inline" from wchar.c file.

Thanks,
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

Show quoted text

On 8/10/06, Bruce Momjian <bruce@momjian.us> wrote:

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@umpa-us.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@postgresql.org [mailto:
pgsql-general-owner@postgresql.org] *On Behalf Of *Shoaib Mir
*Sent:* Wednesday, August 09, 2006 3:30 PM
*To:* DEV
*Cc:* pgsql-general@postgresql.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@umpa-us.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.makand
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@momjian.us
EnterpriseDB http://www.enterprisedb.com

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

#12Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#10)
Re: [GENERAL] WIN32 Build?

[ redirecting to -hackers, as this seems utterly off-topic for -general ]

Bruce Momjian <bruce@momjian.us> writes:

Shoaib Mir wrote:

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.

If we were running the actual configure script, presumably it would
figure out that "inline" doesn't work on this compiler. I suppose the
problem here is that there's 0 chance of that in a pure-Microsoft
build environment. Should we just dumb pg_config.h.win32 down to the
lowest common denominator, and make it #define inline as empty for any
Windows build environment that can't run configure? I don't think we
care that much about inline-ing on the client side anyway.

regards, tom lane

#13Tom Lane
tgl@sss.pgh.pa.us
In reply to: Shoaib Mir (#11)
Re: [GENERAL] WIN32 Build?

"Shoaib Mir" <shoaibmir@gmail.com> writes:

As a workaround if you dont want to make the change and delete "inline" from
wchar.c then you can do the following change in the win32.mak file for
libpq:

"WIN32" /D "_WINDOWS" /D "inline=__inline" /Fp"$(INTDIR)\libpq.pch" /YX\

That's even stranger: it will accept __inline but not inline?

But anyway, if that works I suggest we make pg_config.h.win32 #define
inline as __inline and see if that works on all Windows compilers.

regards, tom lane

#14Hiroshi Saito
z-saito@guitar.ocn.ne.jp
In reply to: Shoaib Mir (#9)
Re: [GENERAL] WIN32 Build?

Hi.

Probably, the problem is happened in 8.1.4 of an official archive.
http://archives.postgresql.org/pgsql-patches/2006-05/msg00232.php

It is already clear at include/port/win32.h.
And it is used as pg_config_os.h.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>

Show quoted text

"Shoaib Mir" <shoaibmir@gmail.com> writes:

As a workaround if you dont want to make the change and delete "inline" from
wchar.c then you can do the following change in the win32.mak file for
libpq:

"WIN32" /D "_WINDOWS" /D "inline=__inline" /Fp"$(INTDIR)\libpq.pch" /YX\

That's even stranger: it will accept __inline but not inline?

But anyway, if that works I suggest we make pg_config.h.win32 #define
inline as __inline and see if that works on all Windows compilers.

regards, tom lane

#15Bruce Momjian
bruce@momjian.us
In reply to: Hiroshi Saito (#14)
Re: [GENERAL] WIN32 Build?

Hiroshi Saito wrote:

Hi.

Probably, the problem is happened in 8.1.4 of an official archive.
http://archives.postgresql.org/pgsql-patches/2006-05/msg00232.php

It is already clear at include/port/win32.h.
And it is used as pg_config_os.h.

Actually, the patch you referenced was placed in port/win32.h in CVS
HEAD, but not in 8.1.X becuase I thought it was only for MSVC compiles
of the backend. 8.1.X fixed, and comment added.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

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