public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: [email protected]
Cc: Greg Burd <[email protected]>
Subject: Meson vs. Solaris
Date: Sat, 07 Feb 2026 16:21:31 -0500
Message-ID: <[email protected]> (raw)

I wondered why Greg Burd's new buildfarm animal "icarus" hasn't
yet managed to complete a successful run.  The symptoms suggest
that getopt() isn't doing what we want:

/scratch/build/HEAD/pgsql.build/tmp_install/scratch/build/HEAD/inst/bin/postgres: illegal option -- cluster-name=node1
Try "postgres --help" for more information.

But we have other BF animals running on OpenIndiana (Solaris)
without trouble.

On investigation, it seems that Greg is the first to try to use
the meson build system on Solaris, and it doesn't work.  Our
Autoconf infrastructure knows that we should use our own getopt()
because Solaris's doesn't do what we want.  meson.build did try
to copy that logic:

always_replace_getopt = host_system in ['windows', 'cygwin', 'openbsd', 'solaris']

However, as seen elsewhere in that file, 'solaris' is not the
value of host_system on this platform!  It's 'sunos'.  So we
are trying to use the system's getopt(), and then the failure is
completely expected.

I've verified on a local OpenIndiana VM that the attached patch
makes it work.  Also, a quick grep doesn't find any other cases
of the same error in our meson.build files.

			regards, tom lane



Attachments:

  [text/x-diff] solaris.patch (663B, ../[email protected]/2-solaris.patch)
  download | inline diff:
diff --git a/meson.build b/meson.build
index df907b62da3..96b3869df86 100644
--- a/meson.build
+++ b/meson.build
@@ -2911,7 +2911,7 @@ gnugetopt_dep = cc.find_library('gnugetopt', required: false)
 #   (i.e., allow '-' as a flag character), so use our version on those platforms
 # - We want to use system's getopt_long() only if the system provides struct
 #   option
-always_replace_getopt = host_system in ['windows', 'cygwin', 'openbsd', 'solaris']
+always_replace_getopt = host_system in ['windows', 'cygwin', 'openbsd', 'sunos']
 always_replace_getopt_long = host_system in ['windows', 'cygwin'] or not cdata.has('HAVE_STRUCT_OPTION')
 
 # Required on BSDs


view thread (3+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Meson vs. Solaris
  In-Reply-To: <[email protected]>

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

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