Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fxktN-0004eU-Ni for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Sep 2018 03:23:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fxktJ-0007lP-Hp for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Sep 2018 03:23:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fxktJ-0007lI-BK for pgsql-bugs@lists.postgresql.org; Thu, 06 Sep 2018 03:23:33 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fxktA-0006wu-A9 for pgsql-bugs@postgresql.org; Thu, 06 Sep 2018 03:23:32 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 774E3EF91083 for ; Wed, 5 Sep 2018 20:23:20 -0700 (MST) Date: Wed, 5 Sep 2018 20:23:20 -0700 (MST) From: Andre_Mikulec To: pgsql-bugs@postgresql.org Message-ID: <1536204200450-0.post@n3.nabble.com> In-Reply-To: <13118.1536175426@sss.pgh.pa.us> References: <943.1536170035@sss.pgh.pa.us> <1536174739741-0.post@n3.nabble.com> <13118.1536175426@sss.pgh.pa.us> Subject: Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 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