Opened 19 months ago
Closed 18 months ago
#67365 closed defect (fixed)
postgresql15 fails to build on 10.6.8 (rosetta/ppc): error: conflicting types for ‘DefineCollation’
Reported by: | barracuda156 | Owned by: | barracuda156 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | snowleopard, powerpc, rosetta | Cc: | |
Port: | postgresql15 |
Description
:info:build ( echo src/backend/lib/binaryheap.o src/backend/lib/bipartite_match.o src/backend/lib/bloomfilter.o src/backend/lib/dshash.o src/backend/lib/hyperloglog.o src/backend/lib/ilist.o src/backend/lib/integerset.o src/backend/lib/knapsack.o src/backend/lib/pairingheap.o src/backend/lib/rbtree.o ) >objfiles.txt :info:build gnumake[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgresql15/postgresql15/work/postgresql-15.1/src/backend/lib' :info:build /usr/bin/gcc-4.2 -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -pipe -Os -arch ppc -I. -I. -I../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o parse_agg.o parse_agg.c :info:build /usr/bin/gcc-4.2 -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -pipe -Os -arch ppc -I../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o collationcmds.o collationcmds.c :info:build collationcmds.c:54: error: conflicting types for ‘DefineCollation’ :info:build ../../../src/include/commands/collationcmds.h:21: error: previous declaration of ‘DefineCollation’ was here :info:build collationcmds.c: In function ‘AlterCollation’: :info:build collationcmds.c:406: warning: passing argument 4 of ‘heap_modify_tuple’ from incompatible pointer type :info:build collationcmds.c:406: warning: passing argument 5 of ‘heap_modify_tuple’ from incompatible pointer type :info:build gnumake[3]: *** [collationcmds.o] Error 1 :info:build gnumake[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgresql15/postgresql15/work/postgresql-15.1/src/backend/commands' :info:build gnumake[2]: *** [commands-recursive] Error 2
Attachments (2)
Change History (14)
Changed 19 months ago by barracuda156
Attachment: | main_log.txt added |
---|
comment:1 Changed 19 months ago by kencu (Ken)
Summary: | postgresql15 fails to build on 10.6.8: error: conflicting types for ‘DefineCollation’ → postgresql15 fails to build on 10.6.8 when building with gcc-4.2 (rosetta/ppc): error: conflicting types for ‘DefineCollation’ |
---|
comment:2 follow-ups: 3 4 Changed 19 months ago by kencu (Ken)
comment:3 Changed 19 months ago by barracuda156
Replying to kencu:
builds fine x86_64 and i386 using MacPorts default clang version and libc++, however, so this is likely to be a specific failure due to the older gcc-4.2 compiler being used.
I will try with a new gcc.
comment:4 Changed 19 months ago by barracuda156
Replying to kencu:
builds fine x86_64 and i386 using MacPorts default clang version and libc++, however, so this is likely to be a specific failure due to the older gcc-4.2 compiler being used.
Still fails, unfortunately:
:info:build /opt/local/bin/gcc-mp-12 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -pipe -Os -arch ppc -I../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o pg_collation.o pg_collation.c :info:build /opt/local/bin/gcc-mp-12 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -pipe -Os -arch ppc -I../../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o ginxlog.o ginxlog.c :info:build pg_collation.c:46:1: error: conflicting types for 'CollationCreate'; have 'Oid(const char *, Oid, Oid, char, _Bool, int32, const char *, const char *, const char *, const char *, _Bool, _Bool)' {aka 'unsigned int(const char *, unsigned int, unsigned int, char, _Bool, int, const char *, const char *, const char *, const char *, _Bool, _Bool)'} :info:build 46 | CollationCreate(const char *collname, Oid collnamespace, :info:build | ^~~~~~~~~~~~~~~ :info:build In file included from pg_collation.c:25: :info:build ../../../src/include/catalog/pg_collation.h:87:17: note: previous declaration of 'CollationCreate' with type 'Oid(const char *, Oid, Oid, char, bool, int32, const char *, const char *, const char *, const char *, bool, bool)' {aka 'unsigned int(const char *, unsigned int, unsigned int, char, unsigned char, int, const char *, const char *, const char *, const char *, unsigned char, unsigned char)'} :info:build 87 | extern Oid CollationCreate(const char *collname, Oid collnamespace, :info:build | ^~~~~~~~~~~~~~~ :info:build pg_collation.c: In function 'CollationCreate': :info:build pg_collation.c:202:48: warning: passing argument 3 of 'heap_form_tuple' from incompatible pointer type [-Wincompatible-pointer-types] :info:build 202 | tup = heap_form_tuple(tupDesc, values, nulls); :info:build | ^~~~~ :info:build | | :info:build | _Bool * :info:build In file included from pg_collation.c:18: :info:build ../../../src/include/access/htup_details.h:711:87: note: expected 'bool *' {aka 'unsigned char *'} but argument is of type '_Bool *' :info:build 711 | Datum *values, bool *isnull); :info:build | ~~~~~~^~~~~~ :info:build gnumake[3]: *** [pg_collation.o] Error 1
Changed 19 months ago by barracuda156
Attachment: | postgresql15_gcc12.txt added |
---|
comment:5 Changed 19 months ago by barracuda156
Summary: | postgresql15 fails to build on 10.6.8 when building with gcc-4.2 (rosetta/ppc): error: conflicting types for ‘DefineCollation’ → postgresql15 fails to build on 10.6.8 (rosetta/ppc): error: conflicting types for ‘DefineCollation’ |
---|
comment:6 Changed 19 months ago by barracuda156
Perhaps _Bool
should be defined as identical to bool
?
comment:7 Changed 19 months ago by barracuda156
Adding stdbool.h
to the pg_collation.h
fixes the error, but then the build fails a bit further:
:info:build pg_parameter_acl.c:37:1: error: conflicting types for 'ParameterAclLookup'; have 'Oid(const char *, _Bool)' {aka 'unsigned int(const char *, _Bool)'} :info:build 37 | ParameterAclLookup(const char *parameter, bool missing_ok) :info:build | ^~~~~~~~~~~~~~~~~~ :info:build In file included from pg_parameter_acl.c:22: :info:build ../../../src/include/catalog/pg_parameter_acl.h:57:17: note: previous declaration of 'ParameterAclLookup' with type 'Oid(const char *, bool)' {aka 'unsigned int(const char *, unsigned char)'} :info:build 57 | extern Oid ParameterAclLookup(const char *parameter, bool missing_ok); :info:build | ^~~~~~~~~~~~~~~~~~ :info:build gnumake[3]: *** [pg_parameter_acl.o] Error 1 :info:build gnumake[3]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_postgresql15/postgresql15/work/postgresql-15.1/src/backend/catalog' :info:build gnumake[2]: *** [catalog-recursive] Error 2 :info:build gnumake[2]: *** Waiting for unfinished jobs.... :info:build In file included from ../../../src/include/storage/bufmgr.h:22, :info:build from tablecmds.c:87: :info:build ../../../src/include/utils/snapmgr.h:165:13: error: conflicting types for 'XidInMVCCSnapshot'; have '_Bool(TransactionId, struct SnapshotData *)' {aka '_Bool(unsigned int, struct SnapshotData *)'} :info:build 165 | extern bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot); :info:build | ^~~~~~~~~~~~~~~~~ :info:build In file included from tablecmds.c:19: :info:build ../../../src/include/access/heapam.h:216:13: note: previous declaration of 'XidInMVCCSnapshot' with type 'bool(TransactionId, struct SnapshotData *)' {aka 'unsigned char(unsigned int, struct SnapshotData *)'} :info:build 216 | extern bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot); :info:build | ^~~~~~~~~~~~~~~~~ :info:build /opt/local/bin/gcc-mp-12 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -pipe -Os -Wno-incompatible-pointer-types -arch ppc -I../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o tablespace.o tablespace.c :info:build /opt/local/bin/gcc-mp-12 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -pipe -Os -Wno-incompatible-pointer-types -arch ppc -I../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o trigger.o trigger.c :info:build /opt/local/bin/gcc-mp-12 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -pipe -Os -Wno-incompatible-pointer-types -arch ppc -I../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o tsearchcmds.o tsearchcmds.c :info:build gnumake[3]: *** [tablecmds.o] Error 1
comment:8 Changed 19 months ago by barracuda156
Removing -Werror flags from configure does not help:
/opt/local/bin/gcc-mp-12 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -pipe -Os -arch ppc -I../../../src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -c -o pg_collation.o pg_collation.c pg_collation.c:46:1: error: conflicting types for 'CollationCreate'; have 'Oid(const char *, Oid, Oid, char, _Bool, int32, const char *, const char *, const char *, const char *, _Bool, _Bool)' {aka 'unsigned int(const char *, unsigned int, unsigned int, char, _Bool, int, const char *, const char *, const char *, const char *, _Bool, _Bool)'} 46 | CollationCreate(const char *collname, Oid collnamespace, | ^~~~~~~~~~~~~~~ In file included from pg_collation.c:25: ../../../src/include/catalog/pg_collation.h:87:17: note: previous declaration of 'CollationCreate' with type 'Oid(const char *, Oid, Oid, char, bool, int32, const char *, const char *, const char *, const char *, bool, bool)' {aka 'unsigned int(const char *, unsigned int, unsigned int, char, unsigned char, int, const char *, const char *, const char *, const char *, unsigned char, unsigned char)'} 87 | extern Oid CollationCreate(const char *collname, Oid collnamespace, | ^~~~~~~~~~~~~~~ pg_collation.c: In function 'CollationCreate': pg_collation.c:202:48: warning: passing argument 3 of 'heap_form_tuple' from incompatible pointer type [-Wincompatible-pointer-types] 202 | tup = heap_form_tuple(tupDesc, values, nulls); | ^~~~~ | | | _Bool * In file included from pg_collation.c:18: ../../../src/include/access/htup_details.h:711:87: note: expected 'bool *' {aka 'unsigned char *'} but argument is of type '_Bool *' 711 | Datum *values, bool *isnull); | ~~~~~~^~~~~~ gnumake[3]: *** [pg_collation.o] Error 1
comment:9 follow-up: 10 Changed 19 months ago by kencu (Ken)
you’re running into a “bool” vs “_Bool” thingy.
see this, for example:
https://www.quora.com/In-C-programming-what-is-the-difference-between-bool-and-_Bool
comment:10 Changed 19 months ago by barracuda156
Replying to kencu:
you’re running into a “bool” vs “_Bool” thingy.
see this, for example:
https://www.quora.com/In-C-programming-what-is-the-difference-between-bool-and-_Bool
So just add stdbool.h
whereever bool is broken?
- S. Wonder why upstream does not care – postgresql13–14 also failed similarly.
comment:11 Changed 18 months ago by barracuda156
So it was reported to upstream, and they could not care less. Every postgresql
from 11 up is broken with this.
https://www.postgresql.org/message-id/16791-f0b801625fc78400%40postgresql.org https://www.postgresql.org/message-id/1159815.1608914156%40sss.pgh.pa.us
comment:12 Changed 18 months ago by barracuda156
Owner: | set to barracuda156 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
builds fine x86_64 and i386 using MacPorts default clang version and libc++, however, so this is likely to be a specific failure due to the older gcc-4.2 compiler being used.
https://ports.macports.org/port/postgresql15/details/