pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andre_Mikulec <Andre_Mikulec@Hotmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error
Date: Wed, 5 Sep 2018 20:23:20 -0700 (MST)
Message-ID: <1536204200450-0.post@n3.nabble.com> (raw)
In-Reply-To: <13118.1536175426@sss.pgh.pa.us>
References: <BYAPR15MB22160A7A3E99229734CB97BA9C020@BYAPR15MB2216.namprd15.prod.outlook.com>
	<943.1536170035@sss.pgh.pa.us>
	<1536174739741-0.post@n3.nabble.com>
	<13118.1536175426@sss.pgh.pa.us>

How would I 'go about' isolating this problem?

I rerun like this.

AnonymousUser@ANONYMOUST MINGW64 /w/R-3.5._/postgres/build
$ make -C src/backend/commands

x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wno-format-truncation -Wno-stringop-truncation -g -O
-fno-omit-frame-pointer -I../../../src/include
-I/w/R-3.5._/postgres/src/include -I/w/icu-61.1/icu4c/dist/include
-I/w/R-3.5._/postgres/src/include/port/win32 -DEXEC_BACKEND 
-I/w/zlib-1.2.8-win32-x86_64/include
-I/w/openssl-1.0.2e-win32-x86_64/include
-I/w/libxml2-2.9.3-win32-x86_64/include/libxml2
-I/w/libxslt-1.1.28-win32-x86_64/include
"-I/w/R-3.5._/postgres/src/include/port/win32" -DBUILDING_DLL  -c -o
statscmds.o /w/R-3.5._/postgres/src/backend/commands/statscmds.c -MMD -MP
-MF .deps/statscmds.Po
during RTL pass: final
W:/R-3.5._/postgres/src/backend/commands/statscmds.c: In function
'UpdateStatisticsForTypeChange':
W:/R-3.5._/postgres/src/backend/commands/statscmds.c:435:1: internal
compiler error: in based_loc_descr, at dwarf2out.c:14272
 }
 ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2; for instructions.
make: *** [../../../src/Makefile.global:878: statscmds.o] Error 1
make: Leaving directory '/w/R-3.5._/postgres/build/src/backend/commands'

Below, I try to create something reproducible using the same gcc arguments.

AnonymousUser@ANONYMOUST MINGW64 /w/R-3.5._/postgres/build
$ cat example.c


void myfunct(int something);

void myfunct (int something)
{
  /* comment */
}
int main() {
  myfunct(0);
}

I compile without a problem (below).

AnonymousUser@ANONYMOUST MINGW64 /w/R-3.5._/postgres/build
$ x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-forma-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wno-format-truncation -Wno-stringop-trunction -g -O -fno-omit-frame-pointer
example.c -save-temps

When I try to extract from what I have in my shell and replace commands.c
with example.c, then I get the following error.
I get the response (below)
"
fatal error: opening dependency file .deps/statscmds.Po: No such file or
directory
"

AnonymousUser@ANONYMOUST MINGW64 /w/R-3.5._/postgres/build
$ x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wno-format-truncation -Wno-stringop-truncation -g -O
-fno-omit-frame-pointer example.c -MMD -MP -MF .deps/statscmds.Po
-save-temps
example.c:1: fatal error: opening dependency file .deps/statscmds.Po: No
such file or directory

compilation terminated.

I try to break down the problem in example2.c ( below )

-- begin example2.c --

#include "postgres.h"

#include "access/relscan.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_statistic_ext.h"
#include "commands/comment.h"
#include "commands/defrem.h"
#include "miscadmin.h"
#include "statistics/statistics.h"
#include "utils/builtins.h"
#include "utils/inval.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/syscache.h"
#include "utils/typcache.h"

/* defrem.h */
extern void UpdateStatisticsForTypeChange(Oid statsOid,
							  Oid relationOid, int attnum,
							  Oid oldColumnType, Oid newColumnType);

void
UpdateStatisticsForTypeChange(Oid statsOid, Oid relationOid, int attnum,
                                                          Oid oldColumnType,
Oid newColumnType)
{
        /*
         * Currently, we don't actually need to do anything here.  For both
         * ndistinct and functional-dependencies stats, the on-disk
representation
         * is independent of the source column data types, and it is
plausible to
         * assume that the old statistic values will still be good for the
new
         * column contents.  (Obviously, if the ALTER COLUMN TYPE has a
USING
         * expression that substantially alters the semantic meaning of the
column
         * values, this assumption could fail.  But that seems like a corner
case
         * that doesn't justify zapping the stats in common cases.)
         *
         * Future types of extended stats will likely require us to work
harder.
         */
}

-- end example2.c --

But when I try again. ( note: -save-temps is a requirement to submit a 'gcc'
bug )

AnonymousUser@ANONYMOUST MINGW64 /w/R-3.5._/postgres/build
$ x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wno-format-truncation -Wno-stringop-truncation -g -O
-fno-omit-frame-pointer -I../../../src/include
-I/w/R-3.5._/postgres/src/include -I/w/icu-61.1/icu4c/dist/include
-I/w/R-3.5._/postgres/src/include/port/win32 -DEXEC_BACKEND 
-I/w/zlib-1.2.8-win32-x86_64/include
-I/w/openssl-1.0.2e-win32-x86_64/include
-I/w/libxml2-2.9.3-win32-x86_64/include/libxml2
-I/w/libxslt-1.1.28-win32-x86_64/include
"-I/w/R-3.5._/postgres/src/include/port/win32" -DBUILDING_DLL  -c -o
example2.o example2.c -MMD -MP -MF .deps/statscmds.Po -save-temps


Below, I get this error

In file included from W:/R-3.5._/postgres/src/include/c.h:49,
                 from W:/R-3.5._/postgres/src/include/postgres.h:46,
                 from example2.c:2:
W:/R-3.5._/postgres/src/include/postgres_ext.h:26:10: fatal error:
pg_config_ext.h: No such file or directory
 #include "pg_config_ext.h"
          ^~~~~~~~~~~~~~~~~
compilation terminated.

What is a good next step?

Please help. 
Thanks.
Andre Mikulec







--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html




view thread (8+ messages)  latest in thread

Message-ID: <1536204200450-0.post@n3.nabble.com>
Permalink:  ../1536204200450-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1536204200450-0.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Andre_Mikulec@Hotmail.com
  Subject: Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error
  In-Reply-To: <1536204200450-0.post@n3.nabble.com>
  References: <BYAPR15MB22160A7A3E99229734CB97BA9C020@BYAPR15MB2216.namprd15.prod.outlook.com> <943.1536170035@sss.pgh.pa.us> <1536174739741-0.post@n3.nabble.com> <13118.1536175426@sss.pgh.pa.us> <1536204200450-0.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox