Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error

From: Andre_Mikulec <Andre_Mikulec(at)Hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error
Date: 2018-09-06 03:23:20
Message-ID: 1536204200450-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

How would I 'go about' isolating this problem?

I rerun like this.

AnonymousUser(at)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(at)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(at)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(at)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(at)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-09-06 13:56:35 BUG #15364: PgAdmin 4 crash
Previous Message Tom Lane 2018-09-05 19:23:46 Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error