pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tristan Partin <tristan@neon.tech>
To: pgsql-hackers@postgresql.org
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Silence Meson warning on HEAD
Date: Mon, 01 Apr 2024 18:46:01 -0500
Message-ID: <D096Q3NFFVH1.1T5RE4MOO9ZFH@neon.tech> (raw)

A warning was recently[0] introduced into the Meson build:

WARNING: Project targets '>=0.54' but uses feature introduced in '0.55.0': Passing executable/found program object to script parameter of add_dist_script

There are 3 way to solve the issue that I have laid out in 3 separate 
patches that you pick at your leisure:

1. version-check.diff

Wrap the offending line in a Meson version check.

2. perl-string.diff

Pass the perl program as a string via its .path() method.

3. meson-bump.diff

Bump the minimum meson version from 0.54 to 0.55, at least.

I chose to do some analysis on option 3. The other 2 options are 
perfectly valid. I looked at all the systems in the buildfarm, and found 
the following results:

First column is the list of systems we test HEAD against in the 
buildfarm. Second column is the Meson version available to those 
systems, based on what I could find. Third column is whether or not we 
test Meson on that system.

System                                       Meson Version  Tested  
AlmaLinux 8                                  0.58.2                 
AlmaLinux 9                                  0.63.3                 
Alpine Linux 3.19.1                          1.3.0                  
Amazon Linux 2                               0.55.1                 
Amazon Linux 2023                            0.62.2                 
ArchLinux                                    1.4.0                  
CentOS 7                                     0.55.1                 
CentOS 7.1                                   0.55.1                 
CentOS 7.4                                   0.55.1                 
CentOS 7.9.2009                              0.55.1                 
CentOS Stream 8                              0.58.2                 
Debian 10                                    0.56.1                 
Debian 11                                    0.56.2                 
Debian 11.5                                  0.56.2                 
Debian 12                                    1.0.1                  
Debian 7.0                                                          
Debian 8.11                                                         
Debian 9                                                            
Debian 9.3                                                          
Debian unstable                              1.4.0          x       
DragonFly BSD 6.2.2                          0.63.2                 
Fedora 38                                    1.0.1                  
Fedora 39                                    1.3.2          x       
Fedora 40                                    1.3.2                  
FreeBSD 12.2                                                        
FreeBSD 13.1                                 0.57.1                 
FreeBSD 14                                   1.4.0                  
Loongnix-Server 8.4.0                                               
macOS 13.6                                                          
macOS 14.0                                                          
macOS 14.0 / MacPorts                        1.4.0                  
macOS 14.3                                   1.4.0          x       
NetBSD 10.0                                  1.2.3                  
NetBSD 9.2                                   1.2.3                  
OmniOS / illumos r151038                                            
OpenBSD 6.8                                                         
OpenBSD 6.9                                                         
OpenBSD 7.3                                                         
OpenBSD 7.4                                  1.2.1                  
OpenIndiana/illumos hipster rolling release  1.4.0                  
openSUSE 15.0                                0.46.0                 
openSUSE 15.3                                0.54.2                 
Oracle Linux 9                               0.63.3                 
Photon 2.0                                                          
Photon 3.0                                                          
Raspbian 7.8                                 0.56.2                 
Raspbian 8.0                                 1.0.1                  
Red Hat Enterprise Linux 7                   0.55.1                 
Red Hat Enterprise Linux 7.1                 0.55.1                 
Red Hat Enterprise Linux 7.9                 0.55.1                 
Red Hat Enterprise Linux 9.2                 0.63.3                 
Solaris 11.4.42 CBE                          0.59.2                 
SUSE Linux Enterprise Server 12 SP5                                 
SUSE Linux Enterprise Server 15 SP2                                 
Ubuntu 16.04                                 0.40.1                 
Ubuntu 16.04.3                               0.40.1                 
Ubuntu 18.04                                 0.45.1                 
Ubuntu 18.04.5                               0.45.1                 
Ubuntu 20.04.6                               0.53.2                 
Ubuntu 22.04.1                               0.61.2                 
Ubuntu 22.04.3                               0.61.2                 
Windows 10 / Cygwin64 3.4.9                  1.2.3                  
Windows / Msys 12.2.0                        1.4.0          x       
Windows Server 2016                          1.3.1          x       
Windows Server 2019                          1.0.1          x       

Some notes:

- The minimum Meson version we test against is 1.0.1, on drongo
- For any  RHEL 7 derivatives, you see, I took the EPEL Meson version
- Debian 10 requires the backports repository to be enabled
- OmniOS / illumos r151038 has Python 3.9, so could fetch Meson over 
  pypi since it isn't packaged
- Missing information on OpenBSD 6.8, 6.9, and 7.3, but they should have 
  at least 0.55.0 available based on release dates
- The missing macOS versions could definitely run 0.55 either through 
  Homebrew, Macports, or PyPI
- Other systems didn't have easily publicly available information

At the top of the root meson.build file, there is this comment:

> # We want < 0.56 for python 3.5 compatibility on old platforms. EPEL for
> # RHEL 7 has 0.55. < 0.54 would require replacing some uses of the fs
> # module, < 0.53 all uses of fs. So far there's no need to go to >=0.56.

Seems like as good an opportunity to bump Meson to 0.56 for Postgres 17, 
which I have found to exist in the EPEL for RHEL 7. I don't know what 
version exists in the base repo. Perhaps it is 0.55, which would still 
get rid of the aforementioned warning.

Committer, please pick your patch :).

[0]: https://www.postgresql.org/message-id/40e80f77-a294-4f29-a16f-e21bc7bc75fc@eisentraut.org

-- 
Tristan Partin
Neon (https://neon.tech)

Attachments: download all (4 files, .tar.gz)

version-check.diff (text/x-patch, 570B) download diff --git a/meson.build b/meson.build index 18b5be842e3..87437960bc3 100644 --- a/meson.build +++ b/meson.build @@ -3419,7 +3419,10 @@ alias_target('pgdist', [tar_gz, tar_bz2]) # But not if we are in a subproject, in case the parent project wants to # create a dist using the standard Meson command. if not meson.is_subproject() - meson.add_dist_script(perl, '-e', 'exit 1') + # We can only pass the identifier perl here when we depend on >= 0.55 + if meson.version().version_compare('>=0.55') + meson.add_dist_script(perl, '-e', 'exit 1') + endif endif
perl-path.diff (text/x-patch, 444B) download diff --git a/meson.build b/meson.build index 18b5be842e3..80b412f741b 100644 --- a/meson.build +++ b/meson.build @@ -3419,7 +3419,7 @@ alias_target('pgdist', [tar_gz, tar_bz2]) # But not if we are in a subproject, in case the parent project wants to # create a dist using the standard Meson command. if not meson.is_subproject() - meson.add_dist_script(perl, '-e', 'exit 1') + meson.add_dist_script(perl.path(), '-e', 'exit 1') endif
meson-bump.diff (text/x-patch, 6.3K) download diff --git a/contrib/basebackup_to_shell/meson.build b/contrib/basebackup_to_shell/meson.build index 8175c9b5c5b..201e69708a7 100644 --- a/contrib/basebackup_to_shell/meson.build +++ b/contrib/basebackup_to_shell/meson.build @@ -24,7 +24,7 @@ tests += { 'tests': [ 't/001_basic.pl', ], - 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '', - 'TAR': tar.found() ? tar.path() : '' }, + 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '', + 'TAR': tar.found() ? tar.full_path() : '' }, }, } diff --git a/meson.build b/meson.build index 18b5be842e3..e11df3ec002 100644 --- a/meson.build +++ b/meson.build @@ -1059,7 +1059,7 @@ pyopt = get_option('plpython') python3_dep = not_found_dep if not pyopt.disabled() pm = import('python') - python3_inst = pm.find_installation(python.path(), required: pyopt) + python3_inst = pm.find_installation(python.full_path(), required: pyopt) if python3_inst.found() python3_dep = python3_inst.dependency(embed: true, required: pyopt) # Remove this check after we depend on Meson >= 1.1.0 @@ -2723,11 +2723,11 @@ if host_system == 'windows' if cc.get_argument_syntax() == 'msvc' rc = find_program('rc', required: true) - rcgen_base_args += ['--rc', rc.path()] + rcgen_base_args += ['--rc', rc.full_path()] rcgen_outputs = ['@BASENAME@.rc', '@BASENAME@.res'] else windres = find_program('windres', required: true) - rcgen_base_args += ['--windres', windres.path()] + rcgen_base_args += ['--windres', windres.full_path()] rcgen_outputs = ['@BASENAME@.rc', '@BASENAME@.obj'] endif @@ -3273,7 +3273,7 @@ foreach test_dir : tests endif test_command = [ - perl.path(), + perl.full_path(), '-I', meson.source_root() / 'src/test/perl', '-I', test_dir['sd'], ] @@ -3398,7 +3398,7 @@ if bzip2.found() build_always_stale: true, command: [git, '-C', '@SOURCE_ROOT@', '-c', 'core.autocrlf=false', - '-c', 'tar.tar.bz2.command="@0@" -c'.format(bzip2.path()), + '-c', 'tar.tar.bz2.command="@0@" -c'.format(bzip2.full_path()), 'archive', '--format', 'tar.bz2', '--prefix', distdir + '/', diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build index 41c759f73c5..8c1bc431ba4 100644 --- a/src/backend/jit/llvm/meson.build +++ b/src/backend/jit/llvm/meson.build @@ -52,7 +52,7 @@ llvm_irgen_args = [ if ccache.found() llvm_irgen_command = ccache - llvm_irgen_args = [clang.path()] + llvm_irgen_args + llvm_irgen_args = [clang.full_path()] + llvm_irgen_args else llvm_irgen_command = clang endif diff --git a/src/bin/pg_basebackup/meson.build b/src/bin/pg_basebackup/meson.build index c00acd5e118..b17496263da 100644 --- a/src/bin/pg_basebackup/meson.build +++ b/src/bin/pg_basebackup/meson.build @@ -98,9 +98,9 @@ tests += { 'sd': meson.current_source_dir(), 'bd': meson.current_build_dir(), 'tap': { - 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '', - 'TAR': tar.found() ? tar.path() : '', - 'LZ4': program_lz4.found() ? program_lz4.path() : '', + 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '', + 'TAR': tar.found() ? tar.full_path() : '', + 'LZ4': program_lz4.found() ? program_lz4.full_path() : '', }, 'tests': [ 't/010_pg_basebackup.pl', diff --git a/src/bin/pg_dump/meson.build b/src/bin/pg_dump/meson.build index ecd0a0a0e12..df5a9b93dba 100644 --- a/src/bin/pg_dump/meson.build +++ b/src/bin/pg_dump/meson.build @@ -90,9 +90,9 @@ tests += { 'bd': meson.current_build_dir(), 'tap': { 'env': { - 'GZIP_PROGRAM': gzip.found() ? gzip.path() : '', - 'LZ4': program_lz4.found() ? program_lz4.path() : '', - 'ZSTD': program_zstd.found() ? program_zstd.path() : '', + 'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '', + 'LZ4': program_lz4.found() ? program_lz4.full_path() : '', + 'ZSTD': program_zstd.found() ? program_zstd.full_path() : '', 'with_icu': icu.found() ? 'yes' : 'no', }, 'tests': [ diff --git a/src/bin/pg_verifybackup/meson.build b/src/bin/pg_verifybackup/meson.build index 7c7d31a0350..3e2d71e2dac 100644 --- a/src/bin/pg_verifybackup/meson.build +++ b/src/bin/pg_verifybackup/meson.build @@ -22,10 +22,10 @@ tests += { 'sd': meson.current_source_dir(), 'bd': meson.current_build_dir(), 'tap': { - 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '', - 'TAR': tar.found() ? tar.path() : '', - 'LZ4': program_lz4.found() ? program_lz4.path() : '', - 'ZSTD': program_zstd.found() ? program_zstd.path() : ''}, + 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '', + 'TAR': tar.found() ? tar.full_path() : '', + 'LZ4': program_lz4.found() ? program_lz4.full_path() : '', + 'ZSTD': program_zstd.found() ? program_zstd.full_path() : ''}, 'tests': [ 't/001_basic.pl', 't/002_algorithm.pl', diff --git a/src/makefiles/meson.build b/src/makefiles/meson.build index b0f4178b3d9..4aba9a14872 100644 --- a/src/makefiles/meson.build +++ b/src/makefiles/meson.build @@ -6,7 +6,7 @@ # Emulation of PGAC_CHECK_STRIP strip_bin = find_program(get_option('STRIP'), required: false, native: true) -strip_cmd = strip_bin.found() ? [strip_bin.path()] : [':'] +strip_cmd = strip_bin.found() ? [strip_bin.full_path()] : [':'] working_strip = false if strip_bin.found() @@ -121,7 +121,7 @@ pgxs_kv = { if llvm.found() pgxs_kv += { - 'CLANG': clang.path(), + 'CLANG': clang.full_path(), 'CXX': ' '.join(cpp.cmd_array()), 'LLVM_BINPATH': llvm_binpath, } @@ -246,7 +246,7 @@ pgxs_deps = { pgxs_cdata = configuration_data(pgxs_kv) foreach b, p : pgxs_bins - pgxs_cdata.set(b, p.found() ? p.path() : '') + pgxs_cdata.set(b, p.found() ? p.full_path() : '') endforeach foreach pe : pgxs_empty diff --git a/src/test/ssl/meson.build b/src/test/ssl/meson.build index b3c5503f792..e7a8997db6b 100644 --- a/src/test/ssl/meson.build +++ b/src/test/ssl/meson.build @@ -7,7 +7,7 @@ tests += { 'tap': { 'env': { 'with_ssl': ssl_library, - 'OPENSSL': openssl.found() ? openssl.path() : '', + 'OPENSSL': openssl.found() ? openssl.full_path() : '', }, 'tests': [ 't/001_ssltests.pl',
meson.csv (text/csv, 1.4K) download System,Meson Version,Tested AlmaLinux 8,0.58.2, AlmaLinux 9,0.63.3, Alpine Linux 3.19.1,1.3.0, Amazon Linux 2,0.55.1, Amazon Linux 2023,0.62.2, ArchLinux,1.4.0, CentOS 7,0.55.1, CentOS 7.1,0.55.1, CentOS 7.4,0.55.1, CentOS 7.9.2009,0.55.1, CentOS Stream 8,0.58.2, Debian 10,0.56.1, Debian 11,0.56.2, Debian 11.5,0.56.2, Debian 12,1.0.1, Debian 7.0,, Debian 8.11,, Debian 9,, Debian 9.3,, Debian unstable,1.4.0,x DragonFly BSD 6.2.2,0.63.2,, Fedora 38,1.0.1,, Fedora 39,1.3.2,x Fedora 40,1.3.2,, FreeBSD 12.2,, FreeBSD 13.1,0.57.1, FreeBSD 14,1.4.0, Loongnix-Server 8.4.0,, macOS 13.6,, macOS 14.0,, macOS 14.0 / MacPorts,1.4.0, macOS 14.3,1.4.0,x NetBSD 10.0,1.2.3, NetBSD 9.2,1.2.3, OmniOS / illumos r151038,, OpenBSD 6.8,, OpenBSD 6.9,, OpenBSD 7.3,, OpenBSD 7.4,1.2.1, OpenIndiana/illumos hipster rolling release,1.4.0, openSUSE 15.0,0.46.0, openSUSE 15.3,0.54.2, Oracle Linux 9,0.63.3, Photon 2.0,, Photon 3.0,, Raspbian 7.8,0.56.2, Raspbian 8.0,1.0.1, Red Hat Enterprise Linux 7,0.55.1, Red Hat Enterprise Linux 7.1,0.55.1, Red Hat Enterprise Linux 7.9,0.55.1, Red Hat Enterprise Linux 9.2,0.63.3, Solaris 11.4.42 CBE,0.59.2, SUSE Linux Enterprise Server 12 SP5, SUSE Linux Enterprise Server 15 SP2, Ubuntu 16.04,0.40.1, Ubuntu 16.04.3,0.40.1, Ubuntu 18.04,0.45.1, Ubuntu 18.04.5,0.45.1, Ubuntu 20.04.6,0.53.2, Ubuntu 22.04.1,0.61.2, Ubuntu 22.04.3,0.61.2, Windows 10 / Cygwin64 3.4.9,1.2.3, Windows / Msys 12.2.0,1.4.0,x Windows Server 2016,1.3.1,x Windows Server 2019,1.0.1,x

view thread (3+ messages)  latest in thread

Message-ID: <D096Q3NFFVH1.1T5RE4MOO9ZFH@neon.tech>
Permalink:  ../D096Q3NFFVH1.1T5RE4MOO9ZFH@neon.tech/
Also on:    postgresql.org/message-id/D096Q3NFFVH1.1T5RE4MOO9ZFH@neon.tech

 ·  · 

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: pgsql-hackers@postgresql.org
  Cc: tristan@neon.tech, peter@eisentraut.org, andres@anarazel.de
  Subject: Re: Silence Meson warning on HEAD
  In-Reply-To: <D096Q3NFFVH1.1T5RE4MOO9ZFH@neon.tech>

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

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