Opened 3 hours ago

Last modified 82 minutes ago

#71355 new defect

postgresql16 @16.4_1 does not build on PPC Tiger, Mac OS X 10.4.11, because of "Extraneous text after `else' directive"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.4
Keywords: tiger ppc Cc: dgilman (David Gilman), barracuda156
Port: postgresql16

Description

--->  Building postgresql16
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_databases_postgresql16/postgresql16/work/postgresql-16.4" && /usr/bin/gnumake -w world 
gnumake: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_databases_postgresql16/postgresql16/work/postgresql-16.4'
src/Makefile.global:600: Extraneous text after `else' directive
src/Makefile.global:602: *** only one `else' per conditional.  Stop.
gnumake: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_databases_postgresql16/postgresql16/work/postgresql-16.4'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_databases_postgresql16/postgresql16/work/postgresql-16.4" && /usr/bin/gnumake -w world 

Attachments (2)

main.log (141.3 KB) - added by ballapete (Peter "Pete" Dyballa) 3 hours ago.
Main.log from PPC Tiger, Mac OS X 10.4.11
main.2.log (779.9 KB) - added by ballapete (Peter "Pete" Dyballa) 108 minutes ago.
Main.log from PPC Tiger, Mac OS X 10.4.11, building with gmake, but failure due to 'O_DSYNC'

Download all attachments as: .zip

Change History (8)

Changed 3 hours ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger, Mac OS X 10.4.11

comment:1 Changed 3 hours ago by barracuda156

Try using gmake to build it. I think I saw a very similar error with mlton on 10.4, and it was due to its archaic make.

comment:2 Changed 3 hours ago by ballapete (Peter "Pete" Dyballa)

Visiting postgresql-16.4 and invoking (/opt/local/libexec/gnubin/)make made a build started, which I killed after some time. I then invoked make clean to start again with gmake -w world. Again, a build started that I'll stop (kill) to let port perform the task. build.cmd=gmake is presumingly the addition that port install … needs…

comment:3 Changed 3 hours ago by ballapete (Peter "Pete" Dyballa)

Build started with port…

comment:4 Changed 110 minutes ago by ballapete (Peter "Pete" Dyballa)

But it fails:

gmake[4]: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_databases_postgresql16/postgresql16/work/postgresql-16.4/src/backend/storage/file'
/opt/local/bin/gcc-apple-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  -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/include/libxml2  -I/opt/local/include  -c -o buffile.o buffile.c
/opt/local/bin/gcc-apple-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  -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/include/libxml2  -I/opt/local/include  -c -o copydir.o copydir.c
/opt/local/bin/gcc-apple-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  -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/include/libxml2  -I/opt/local/include  -c -o fd.o fd.c
fd.c: In function 'BasicOpenFilePerm':
fd.c:1074: error: 'O_DSYNC' undeclared (first use in this function)
fd.c:1074: error: (Each undeclared identifier is reported only once
fd.c:1074: error: for each function it appears in.)
fd.c:1074: error: bit-field 'static_assert_failure' width not an integer constant
gmake[4]: *** [<builtin>: fd.o] Error 1
gmake[4]: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_databases_postgresql16/postgresql16/work/postgresql-16.4/src/backend/storage/file'

'O_DSYNC' is unknown to Tiger not yet implemented in legacy…

Changed 108 minutes ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.2.log added

Main.log from PPC Tiger, Mac OS X 10.4.11, building with gmake, but failure due to 'O_DSYNC'

comment:5 Changed 100 minutes ago by barracuda156

Maybe https://lists.endsoftwarepatents.org/archive/html/qemu-devel/2009-06/msg02004.html

(Sorry, I don’t have 10.4 at hand so can’t test anything.)

comment:6 Changed 82 minutes ago by ballapete (Peter "Pete" Dyballa)

Found in:

./src/backend/access/transam/xlog.c:183:#ifdef O_DSYNC
./src/backend/access/transam/xlog.c:184:	{"open_datasync", SYNC_METHOD_OPEN_DSYNC, false},
./src/backend/access/transam/xlog.c:2312:			sync_method != SYNC_METHOD_OPEN_DSYNC)
./src/backend/access/transam/xlog.c:2988:		 * O_DSYNC will be sufficient to sync future writes to the log file.
./src/backend/access/transam/xlog.c:8117:#ifdef O_DSYNC
./src/backend/access/transam/xlog.c:8118:		case SYNC_METHOD_OPEN_DSYNC:
./src/backend/access/transam/xlog.c:8119:			return O_DSYNC | o_direct_flag;
./src/backend/access/transam/xlog.c:8187:		sync_method == SYNC_METHOD_OPEN_DSYNC)
./src/backend/access/transam/xlog.c:8214:		case SYNC_METHOD_OPEN_DSYNC:
./src/backend/storage/file/fd.c:1078:					   O_DSYNC |
./src/bin/pg_test_fsync/pg_test_fsync.c:303:#ifdef O_DSYNC
./src/bin/pg_test_fsync/pg_test_fsync.c:304:	if ((tmpfile = open_direct(filename, O_RDWR | O_DSYNC | PG_BINARY, 0)) == -1)
./src/include/access/xlog.h:26:#define SYNC_METHOD_OPEN_DSYNC	4	/* for O_DSYNC */
./src/include/access/xlogdefs.h:72: * Note that we define our own O_DSYNC on Windows, but not O_SYNC.
./src/include/access/xlogdefs.h:76:#elif defined(O_DSYNC) && (!defined(O_SYNC) || O_DSYNC != O_SYNC)
./src/include/access/xlogdefs.h:77:#define DEFAULT_SYNC_METHOD		SYNC_METHOD_OPEN_DSYNC
./src/include/port/win32_port.h:360:#define O_DSYNC 0x0080
./src/port/open.c:77:						 _O_SHORT_LIVED | O_DSYNC | O_DIRECT |
./src/port/open.c:99:						   ((fileFlags & O_DSYNC) ? FILE_FLAG_WRITE_THROUGH : 0),

Two C header files – but src/include/access/xlogdefs.h might be the origin or root…

Note: See TracTickets for help on using tickets.