Lists: | pgsql-hackers |
---|
From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-13 12:40:13 |
Message-ID: | 21134154.20110113144013@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello, Pgsql-hackers.
I'm getting such warnings:
pg_dump.c: In function 'dumpSequence':
pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
pg_dump.c:11449:2: warning: too many arguments for format
pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
pg_dump.c:11450:2: warning: too many arguments for format
Line numbers my not be the same in the official sources, because I've
made some changes. But the lines are:
snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);
In my oppinion configure failed for MinGw+Windows in this case. Am I
right? Can someone give me a hint how to avoid this?
Thanks in advance
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 02:22:53 |
Message-ID: | AANLkTimfi2jujkEEv+HcWRSy4vkP--ZDLr9wA=taDrBs@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2011/1/13 Pavel Golub <pavel(at)microolap(dot)com>:
> Hello, Pgsql-hackers.
>
> I'm getting such warnings:
>
> pg_dump.c: In function 'dumpSequence':
> pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
> pg_dump.c:11449:2: warning: too many arguments for format
> pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
> pg_dump.c:11450:2: warning: too many arguments for format
>
> Line numbers my not be the same in the official sources, because I've
> made some changes. But the lines are:
>
> snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
> snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);
>
> In my oppinion configure failed for MinGw+Windows in this case. Am I
> right? Can someone give me a hint how to avoid this?
It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
wrong answer on your machine, though I'm not sure why. The easiest
workaround is probably to run configure and then edit
src/include/pg_config.h before compiling.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 10:54:52 |
Message-ID: | 192529203.20110117125452@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello, Robert.
You wrote:
RH> 2011/1/13 Pavel Golub <pavel(at)microolap(dot)com>:
>> Hello, Pgsql-hackers.
>>
>> I'm getting such warnings:
>>
>> pg_dump.c: In function 'dumpSequence':
>> pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
>> pg_dump.c:11449:2: warning: too many arguments for format
>> pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
>> pg_dump.c:11450:2: warning: too many arguments for format
>>
>> Line numbers my not be the same in the official sources, because I've
>> made some changes. But the lines are:
>>
>> snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
>> snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);
>>
>> In my oppinion configure failed for MinGw+Windows in this case. Am I
>> right? Can someone give me a hint how to avoid this?
RH> It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
RH> wrong answer on your machine, though I'm not sure why. The easiest
RH> workaround is probably to run configure and then edit
RH> src/include/pg_config.h before compiling.
Thanks Robert. What value should I enter for this option?
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 11:26:59 |
Message-ID: | 4D342783.8060202@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/17/2011 05:54 AM, Pavel Golub wrote:
> Hello, Robert.
>
> You wrote:
>
> RH> 2011/1/13 Pavel Golub<pavel(at)microolap(dot)com>:
>>> Hello, Pgsql-hackers.
>>>
>>> I'm getting such warnings:
>>>
>>> pg_dump.c: In function 'dumpSequence':
>>> pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
>>> pg_dump.c:11449:2: warning: too many arguments for format
>>> pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
>>> pg_dump.c:11450:2: warning: too many arguments for format
>>>
>>> Line numbers my not be the same in the official sources, because I've
>>> made some changes. But the lines are:
>>>
>>> snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
>>> snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);
>>>
>>> In my oppinion configure failed for MinGw+Windows in this case. Am I
>>> right? Can someone give me a hint how to avoid this?
> RH> It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
> RH> wrong answer on your machine, though I'm not sure why. The easiest
> RH> workaround is probably to run configure and then edit
> RH> src/include/pg_config.h before compiling.
>
> Thanks Robert. What value should I enter for this option?
Mingw has always had a huge number of format warnings. See for example
<http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouth&dt=2011-01-17%2007%3A30%3A00&stg=make>
If someone wants to fix them that would be good, but I'm not sure it's a
simple task. There's probably some discussion of it in the archives back
when we first did the Windows port.
cheers
andrew
From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 12:18:11 |
Message-ID: | 1116726723.20110117141811@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello, Andrew.
You wrote:
AD> On 01/17/2011 05:54 AM, Pavel Golub wrote:
>> Hello, Robert.
>>
>> You wrote:
>>
>> RH> 2011/1/13 Pavel Golub<pavel(at)microolap(dot)com>:
>>>> Hello, Pgsql-hackers.
>>>>
>>>> I'm getting such warnings:
>>>>
>>>> pg_dump.c: In function 'dumpSequence':
>>>> pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
>>>> pg_dump.c:11449:2: warning: too many arguments for format
>>>> pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
>>>> pg_dump.c:11450:2: warning: too many arguments for format
>>>>
>>>> Line numbers my not be the same in the official sources, because I've
>>>> made some changes. But the lines are:
>>>>
>>>> snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
>>>> snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);
>>>>
>>>> In my oppinion configure failed for MinGw+Windows in this case. Am I
>>>> right? Can someone give me a hint how to avoid this?
>> RH> It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
>> RH> wrong answer on your machine, though I'm not sure why. The easiest
>> RH> workaround is probably to run configure and then edit
>> RH> src/include/pg_config.h before compiling.
>>
>> Thanks Robert. What value should I enter for this option?
AD> Mingw has always had a huge number of format warnings. See for example
AD> <http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouth&dt=2011-01-17%2007%3A30%3A00&stg=make>
So you think I should just ignore these warnings? Because I can't
remember the same behaviour on 8.x branches...
AD> If someone wants to fix them that would be good, but I'm not sure it's a
AD> simple task. There's probably some discussion of it in the archives back
AD> when we first did the Windows port.
AD> cheers
AD> andrew
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 12:52:14 |
Message-ID: | AANLkTikbdk19jaeqzBwfUKACJnq4qqm00zSu8fy97rqZ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Jan 17, 2011 at 5:54 AM, Pavel Golub <pavel(at)microolap(dot)com> wrote:
> RH> It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
> RH> wrong answer on your machine, though I'm not sure why. The easiest
> RH> workaround is probably to run configure and then edit
> RH> src/include/pg_config.h before compiling.
>
> Thanks Robert. What value should I enter for this option?
Not sure. I notice that the configure test has this comment:
# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT
# ---------------------------------------
# Determine which format snprintf uses for long long int. We handle
# %lld, %qd, %I64d. The result is in shell variable
# LONG_LONG_INT_FORMAT.
#
# MinGW uses '%I64d', though gcc throws an warning with -Wall,
# while '%lld' doesn't generate a warning, but doesn't work.
#
...and the values the test actually tries are:
%lld
%qd
%I64d
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 14:18:52 |
Message-ID: | 4D344FCC.6030808@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/17/2011 07:18 AM, Pavel Golub wrote:
>
> AD> Mingw has always had a huge number of format warnings. See for example
> AD> <http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouth&dt=2011-01-17%2007%3A30%3A00&stg=make>
>
> So you think I should just ignore these warnings? Because I can't
> remember the same behaviour on 8.x branches...
>
>
We've had them all along, as I said. See
<http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouth&dt=2011-01-04%2023%3A54%3A16&stg=make>
for the same thing in an 8.2 build.
cheers
andre
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 20:11:46 |
Message-ID: | 19867.1295295106@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> 2011/1/13 Pavel Golub <pavel(at)microolap(dot)com>:
>> pg_dump.c: In function 'dumpSequence':
>> pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
>> pg_dump.c:11449:2: warning: too many arguments for format
> It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
> wrong answer on your machine, though I'm not sure why.
That configure check tests whether snprintf produces the right result at
runtime. It doesn't check whether the compiler will generate a warning
about it. It looks to me like Pavel has a compiler that is out of sync
with his libc; which is a platform configuration mistake that he needs
to fix.
Another possibility is that configure chose to not use the system
snprintf at all, in which case %lld is the correct syntax to use but gcc
might well have some different expectation. Without seeing the
config.log results it's hard to be sure about that one; but in any case
it's hard to credit that there are any modern machines where snprintf
can't handle long long int, so this still suggests a platform problem.
regards, tom lane
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 20:51:57 |
Message-ID: | 20604.1295297517@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 01/17/2011 07:18 AM, Pavel Golub wrote:
>> So you think I should just ignore these warnings? Because I can't
>> remember the same behaviour on 8.x branches...
> We've had them all along, as I said. See
> <http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouth&dt=2011-01-04%2023%3A54%3A16&stg=make>
> for the same thing in an 8.2 build.
I wonder why mingw's gcc is complaining about %m when other versions of
gcc do not? If you can't get it to shut up about that, there's not
going to be much percentage in silencing warnings about %lld.
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-17 21:37:56 |
Message-ID: | 4D34B6B4.3040307@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/17/2011 03:51 PM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>> On 01/17/2011 07:18 AM, Pavel Golub wrote:
>>> So you think I should just ignore these warnings? Because I can't
>>> remember the same behaviour on 8.x branches...
>> We've had them all along, as I said. See
>> <http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouth&dt=2011-01-04%2023%3A54%3A16&stg=make>
>> for the same thing in an 8.2 build.
> I wonder why mingw's gcc is complaining about %m when other versions of
> gcc do not? If you can't get it to shut up about that, there's not
> going to be much percentage in silencing warnings about %lld.
>
>
We could add -Wno-format to the flags. That makes it shut up, but maybe
we don't want to use such a sledgehammer.
cheers
andrew
From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-18 09:37:55 |
Message-ID: | 198322025.20110118113755@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello, Tom.
You wrote:
TL> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> 2011/1/13 Pavel Golub <pavel(at)microolap(dot)com>:
>>> pg_dump.c: In function 'dumpSequence':
>>> pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
>>> pg_dump.c:11449:2: warning: too many arguments for format
>> It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
>> wrong answer on your machine, though I'm not sure why.
TL> That configure check tests whether snprintf produces the right result at
TL> runtime. It doesn't check whether the compiler will generate a warning
TL> about it. It looks to me like Pavel has a compiler that is out of sync
TL> with his libc; which is a platform configuration mistake that he needs
TL> to fix.
The thing is that for this test I used a clean virtual machine under
WinXP with only one MinGW + MSYS installed.
TL> Another possibility is that configure chose to not use the system
TL> snprintf at all, in which case %lld is the correct syntax to use but gcc
TL> might well have some different expectation. Without seeing the
TL> config.log results it's hard to be sure about that one; but in any case
TL> it's hard to credit that there are any modern machines where snprintf
TL> can't handle long long int, so this still suggests a platform problem.
config.log attached
TL> regards, tom lane
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
Attachment | Content-Type | Size |
---|---|---|
config.zip | application/x-zip-compressed | 22.7 KB |
From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-18 09:40:26 |
Message-ID: | 462853531.20110118114026@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello, Andrew.
You wrote:
AD> On 01/17/2011 03:51 PM, Tom Lane wrote:
>> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>>> On 01/17/2011 07:18 AM, Pavel Golub wrote:
>>>> So you think I should just ignore these warnings? Because I can't
>>>> remember the same behaviour on 8.x branches...
>>> We've had them all along, as I said. See
>>> <http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouth&dt=2011-01-04%2023%3A54%3A16&stg=make>
>>> for the same thing in an 8.2 build.
>> I wonder why mingw's gcc is complaining about %m when other versions of
>> gcc do not? If you can't get it to shut up about that, there's not
>> going to be much percentage in silencing warnings about %lld.
>>
>>
AD> We could add -Wno-format to the flags. That makes it shut up, but maybe
AD> we don't want to use such a sledgehammer.
I want to understand the only thing. Are these warnings really
dangerous? Or I should just ignore them?
AD> cheers
AD> andrew
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Warning compiling pg_dump (MinGW, Windows XP) |
Date: | 2011-01-18 12:09:27 |
Message-ID: | 4D3582F7.4020904@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/18/2011 04:40 AM, Pavel Golub wrote:
>
> AD> We could add -Wno-format to the flags. That makes it shut up, but maybe
> AD> we don't want to use such a sledgehammer.
>
> I want to understand the only thing. Are these warnings really
> dangerous? Or I should just ignore them?
>
>
As I pointed out previously, we have had these warnings for years and
years. I am not aware of a single issue that has been reported as
arising from them.
cheers
andrew