Accepting request 1231640 from devel:tools:building

OBS-URL: https://build.opensuse.org/request/show/1231640
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/meson?expand=0&rev=119
This commit is contained in:
Ana Guerrero 2024-12-18 19:09:14 +00:00 committed by Git OBS Bridge
commit 62ce7501c0
7 changed files with 31 additions and 89 deletions

View File

@ -1,66 +0,0 @@
From d082aec6ce0a3dc8ec7b3748a5130634d1f1c098 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Wed, 20 Nov 2024 16:19:49 +0100
Subject: [PATCH] rust: fix computation of library directory
Using a rustup-based toolchain fails the "rust/2 sharedlib" test for me:
./prog: error while loading shared libraries: libstd-211931512faabf29.so: cannot open shared object file: No such file or directory
This happens because recent rustup places the standard library under
SYSROOT/lib/rustlib/TARGET/lib. Retrieve the right directory using
"--print target-libdir". This also provides a more accurate version
for rustc installed in /usr.
Before:
$ echo $(/usr/bin/rustc --print sysroot)/lib
/usr/lib
After:
$ /usr/bin/rustc --print target-libdir
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib
While at it, cache the value to avoid repeated process invocation.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
mesonbuild/backend/ninjabackend.py | 2 +-
mesonbuild/compilers/rust.py | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 05d5320798fd..5716ea29e351 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2125,7 +2125,7 @@ def _link_library(libname: str, static: bool, bundle: bool = False):
# ... but then add rustc's sysroot to account for rustup
# installations
for rpath_arg in rpath_args:
- args += ['-C', 'link-arg=' + rpath_arg + ':' + os.path.join(rustc.get_sysroot(), 'lib')]
+ args += ['-C', 'link-arg=' + rpath_arg + ':' + rustc.get_target_libdir()]
proc_macro_dylib_path = None
if getattr(target, 'rust_crate_type', '') == 'proc-macro':
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py
index f09911db642c..02ac593842ad 100644
--- a/mesonbuild/compilers/rust.py
+++ b/mesonbuild/compilers/rust.py
@@ -142,11 +142,18 @@ def _native_static_libs(self, work_dir: str, source_name: str) -> None:
def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
return ['--dep-info', outfile]
+ @functools.lru_cache(maxsize=None)
def get_sysroot(self) -> str:
cmd = self.get_exelist(ccache=False) + ['--print', 'sysroot']
p, stdo, stde = Popen_safe_logged(cmd)
return stdo.split('\n', maxsplit=1)[0]
+ @functools.lru_cache(maxsize=None)
+ def get_target_libdir(self) -> str:
+ cmd = self.get_exelist(ccache=False) + ['--print', 'target-libdir']
+ p, stdo, stde = Popen_safe_logged(cmd)
+ return stdo.split('\n', maxsplit=1)[0]
+
@functools.lru_cache(maxsize=None)
def get_crt_static(self) -> bool:
cmd = self.get_exelist(ccache=False) + ['--print', 'cfg']

BIN
meson-1.6.0.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEGeLW2bRtjapiiPh3wk5jG6ux/nAFAmcVUvAACgkQwk5jG6ux
/nAxlw/9FujH49x68WLJb/vjBBQrA5GOGBy9Qt2iet559auLySqlWNr5PGWDNlRo
2rvdCC0NfJOQkqgHqDpGE8+f0MxL670AHyDYxfwXb3NxR+bCzxSbr/isYeei0Ejq
0GlbpuViZH3gC/pWWrkbcdgBbewk8g3CfdWcywUkrSPh5LGv+NFE7thMd5K/+w2h
ePDS87s2NUxOProX+kTav6yMcS8vnRFUpg6AY/UIODVNbAs/fqy4a53m+kF4C1+1
z70UGug3x4tRnmPNiUZ9yV0S/HWrrPNWifq/4neB8PNjrRWbzkgsYyuIQkS6sPD2
z0ZnccTb3l0le/6r+sCJqA/LGPK/hji6uP3YUxPy+FrdCm2Lhq7zVsT0By0VsmcO
heJeNx83rZDZjY+aTL3KHKTU5H83xK3MCwgbv9rzFytY+AzNrLpKQ9Iv5eUo4jgN
HMabygqyKY2FQEVCmHPAKyA5PyW/qWNkft2fRuxvEl1f7sf51jqaYlvNyIwolnGB
eN3uaY99X/FWGgkl4zIIMQDZ6UUlrfYZJwpZ6m9m/0euT7auSBTcxJE+IQz+LTMC
ysfBpsMblYR0gu5epwBQTY10N6DpfEXEs8SKalWhM5zu0TDfwgmJ4Yrd5sxA0ri4
wcyy1mjc5n/mHZL91uJKOmXknQzDms6ohWhVYD0ZOPXLvZj56/A=
=Ga7S
-----END PGP SIGNATURE-----

3
meson-1.6.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1eca49eb6c26d58bbee67fd3337d8ef557c0804e30a6d16bfdf269db997464de
size 2276144

16
meson-1.6.1.tar.gz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEGeLW2bRtjapiiPh3wk5jG6ux/nAFAmdgl8IACgkQwk5jG6ux
/nDxlg/7BnKdVZkD5yV/7FWvLlndEN81X4gHscJ7U7sChs4lJw2L/pRceD5PJn3n
AGacyubY2yYlbPms6sB/mBe2psG9EebAUrxJ5MKKjW/RPGy+YbIs/VxeSIxfB6dG
FoOWng5bbVrrgZ/h7hiqaaFEMmZhf7xlfHWRC391VX9gyVMi7cgp5tHiGXrDSQ+K
vf6Avq/nBdlMQYahc6sBiQGQl1wDaWeE4lW7Wu4kF0dEYci7eVuaVxmq90Br/ZMV
Je+xYkKbPZuRBUc1RZyBodIb7xqUh+MFk5C5VmfUH0doxKmQLm2A0a3jrUa3E7CG
JXjRw9yJF9Nx4R5KIs73townKR+QirriuVjcd0dkgrjPcwEpH74ILc29eReuo8JI
R5/duPUZwiCeEwV/cnIz8hlgGggAiAIwJg4mW8uMJggVe2jG9aajzSTDQi2ssv+r
57DRDvUE7f0c25//CNX3AvJ9yxT+68WwYaM4nR/Td/oVapDab7beENgF5pOZnhyR
hbWYb0RFLJiB39QIZXXa+Sz2ZwC5M3zZ17FMBtOnISPguYKVKK8Jrt6uVXg1uJ0O
ndfrMJqP0hhZ5k+aR/18xBs657KU3jCj97JLdIWdjKHG/QU3lEQLhcWBUEhukZIS
XsoHvpTNTlDGMNfYmOFZ7V7XMHhNacHTA9gdT49HMtKuz1ol4qk=
=NKmm
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Dec 17 07:21:30 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.6.1:
+ Handle top level options set in subprojects.
+ modernize Rust template.
+ CMakeToolchain: Log output on compiler state failure.
+ rust: fix computation of library directory.
+ modules/rust: Add support for autolib field in the Cargo.toml.
- Drop 13935.patch: fixed upstream.
-------------------------------------------------------------------
Tue Dec 10 14:17:35 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -36,7 +36,7 @@
%bcond_with setuptools
%bcond_without mono
Name: meson%{name_ext}
Version: 1.6.0
Version: 1.6.1
Release: 0
Summary: Python-based build system
License: Apache-2.0
@ -51,8 +51,6 @@ Patch0: meson-test-installed-bin.patch
Patch1: extend-test-timeout-on-qemu-builds.patch
# PATCH-FIX-OPENSUSE meson-distutils.patch -- meson is ring0 and therefor setuptools is not available
Patch2: meson-distutils.patch
# PATCH-FIX-UPSTREAM -- Fix test suite with rust 1.83
Patch3: https://patch-diff.githubusercontent.com/raw/mesonbuild/meson/pull/13935.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: fdupes
@ -190,7 +188,6 @@ Vim/NeoVim.
%if !%{with setuptools}
%patch -P 2 -p1
%endif
%patch -P 3 -p1
%if 0%{?sle_version} >= 150400 && 0%{?sle_version} < 160000
# AddressSanitizer fails here because of ulimit.