Re: make installcheck is broken in HEAD on mingw

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: make installcheck is broken in HEAD on mingw
Date: 2009-09-02 05:42:47
Message-ID: 20090902132003.F488.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> > "make installcheck" seems to be broken in HEAD on mingw for a few days,
> > though it ran sucessfully on Linux.
>
> The mingw buildfarm machines seem to be happy. Are you sure you
> have a clean build?

Yes, but distclean and deleting auto-generated files won't work.

Here is a result of printf-debug for process_postgres_switches() in postgres.c.

WARNING: postgres: pid=3360
WARNING: startup packet[0] = postgres
WARNING: startup packet[1] = postgres

WARNING: postgres: pid=3360
WARNING: startup packet[0] = postgres
WARNING: startup packet[1] = -c
WARNING: startup packet[2] = intervalstyle=postgres_verbose
WARNING: getopt(p) = ostgres
FATAL: attempted change of parameter "port" ignored

The first argument 'postgres' was interpreted as "-p ostgres" by getopt().

We might need to re-initilaize variables for getopt() because we call
process_postgres_switches twice(). So getopt() is also called twice.
But optind=1 has no effect in my environment and optind=0 crashes
backend with stack-overflow...
(Are there any known bugs in mingw's getopt?)

BTW, the following code seems to be a bit storange.
The part of { argv++; argc--; } removes the first arugment,
but '--single' argument (argv[1]) is not removed, no?

if (secure)
{
gucsource = PGC_S_ARGV; /* switches came from command line */

/* Ignore the initial --single argument, if present */
if (argc > 1 && strcmp(argv[1], "--single") == 0)
{
argv++;
argc--;
}
}

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2009-09-02 07:25:14 Re: community decision-making & 8.5
Previous Message Gokulakannan Somasundaram 2009-09-02 05:37:17 Re: A bug in scan.l