Hello community, here is the log from the commit of package meson for openSUSE:Factory checked in at 2020-02-14 16:24:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/meson (Old) and /work/SRC/openSUSE:Factory/.meson.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "meson" Fri Feb 14 16:24:26 2020 rev:52 rq:773995 version:0.53.1 Changes: -------- --- /work/SRC/openSUSE:Factory/meson/meson.changes 2020-01-29 13:10:32.541929403 +0100 +++ /work/SRC/openSUSE:Factory/.meson.new.26092/meson.changes 2020-02-14 16:24:38.411166736 +0100 @@ -1,0 +2,11 @@ +Wed Feb 12 19:08:54 UTC 2020 - Dominique Leuenberger <dims...@opensuse.org> + +- Add meson-6614.patch: cmake: Fix crash when no C++ compiler is + not installed (gh#mesonbuild/meson#6559). + +------------------------------------------------------------------- +Tue Feb 11 08:50:47 UTC 2020 - Frederic Crozat <fcro...@suse.com> + +- Add python2-PyYAML as BuildRequires for meson:test for SLE15. + +------------------------------------------------------------------- New: ---- meson-6614.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ meson.spec ++++++ --- /var/tmp/diff_new_pack.afglfh/_old 2020-02-14 16:24:39.563167361 +0100 +++ /var/tmp/diff_new_pack.afglfh/_new 2020-02-14 16:24:39.563167361 +0100 @@ -51,6 +51,8 @@ Patch5: meson-distutils.patch # PATCH-FIX-UPSREAM meson-testsuite-boost.patch dims...@opensuse.org -- https://github.com/mesonbuild/meson/issues/4788 Patch6: meson-testsuite-boost.patch +# PATCH-FIX-UPSTREAM meson-6614.patch dims...@opensuse.org -- cmake: Fix crash when no C++ compiler is not installed +Patch7: meson-6614.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-base @@ -88,6 +90,9 @@ BuildRequires: meson = %{version} BuildRequires: ninja BuildRequires: pkgconfig +%if 0%{?suse_version} <= 1500 +BuildRequires: python2-PyYAML +%endif BuildRequires: python2-devel BuildRequires: python3-gobject BuildRequires: python3-setuptools @@ -171,6 +176,7 @@ (cd "test cases/frameworks/1 boost" %patch6 -p0 ) +%patch7 -p1 # Remove static boost tests from "test cases/frameworks/1 boost/". sed -i "/static/d" test\ cases/frameworks/1\ boost/meson.build ++++++ meson-6614.patch ++++++ >From c6684f3eee34888759171dd790f332cc57f00f60 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger <dan...@mensinger-ka.de> Date: Wed, 12 Feb 2020 19:23:25 +0100 Subject: [PATCH] cmake: Fix crash when no C++ compiler is not installed (fixes #6559) --- mesonbuild/cmake/executor.py | 96 +++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py index c3303ebd6c..7b9edf7b0c 100644 --- a/mesonbuild/cmake/executor.py +++ b/mesonbuild/cmake/executor.py @@ -23,6 +23,7 @@ import os import shutil import ctypes +import textwrap from .. import mlog, mesonlib from ..mesonlib import PerMachine, Popen_safe, version_compare, MachineChoice @@ -264,9 +265,12 @@ def choose_compiler(lang: str) -> T.Tuple[str, str]: if lang in compilers: exe_list = compilers[lang].get_exelist() else: - comp_obj = self.environment.compiler_from_language(lang, MachineChoice.BUILD) - if comp_obj is not None: - exe_list = comp_obj.get_exelist() + try: + comp_obj = self.environment.compiler_from_language(lang, MachineChoice.BUILD) + if comp_obj is not None: + exe_list = comp_obj.get_exelist() + except Exception: + pass if len(exe_list) == 1: return make_abs(exe_list[0], lang), '' @@ -278,10 +282,7 @@ def choose_compiler(lang: str) -> T.Tuple[str, str]: c_comp, c_launcher = choose_compiler('c') cxx_comp, cxx_launcher = choose_compiler('cpp') - try: - fortran_comp, fortran_launcher = choose_compiler('fortran') - except Exception: - fortran_comp = fortran_launcher = '' + fortran_comp, fortran_launcher = choose_compiler('fortran') # on Windows, choose_compiler returns path with \ as separator - replace by / before writing to CMAKE file c_comp = c_comp.replace('\\', '/') @@ -302,47 +303,50 @@ def choose_compiler(lang: str) -> T.Tuple[str, str]: cxx_comp_file = comp_dir / 'CMakeCXXCompiler.cmake' fortran_comp_file = comp_dir / 'CMakeFortranCompiler.cmake' - if not c_comp_file.is_file(): - c_comp_file.write_text('''# Fake CMake file to skip the boring and slow stuff -set(CMAKE_C_COMPILER "{}") # Should be a valid compiler for try_compile, etc. -set(CMAKE_C_COMPILER_LAUNCHER "{}") # The compiler launcher (if presentt) -set(CMAKE_C_COMPILER_ID "GNU") # Pretend we have found GCC -set(CMAKE_COMPILER_IS_GNUCC 1) -set(CMAKE_C_COMPILER_LOADED 1) -set(CMAKE_C_COMPILER_WORKS TRUE) -set(CMAKE_C_ABI_COMPILED TRUE) -set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) -set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_SIZEOF_VOID_P "{}") -'''.format(c_comp, c_launcher, ctypes.sizeof(ctypes.c_voidp))) - - if not cxx_comp_file.is_file(): - cxx_comp_file.write_text('''# Fake CMake file to skip the boring and slow stuff -set(CMAKE_CXX_COMPILER "{}") # Should be a valid compiler for try_compile, etc. -set(CMAKE_CXX_COMPILER_LAUNCHER "{}") # The compiler launcher (if presentt) -set(CMAKE_CXX_COMPILER_ID "GNU") # Pretend we have found GCC -set(CMAKE_COMPILER_IS_GNUCXX 1) -set(CMAKE_CXX_COMPILER_LOADED 1) -set(CMAKE_CXX_COMPILER_WORKS TRUE) -set(CMAKE_CXX_ABI_COMPILED TRUE) -set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) -set(CMAKE_SIZEOF_VOID_P "{}") -'''.format(cxx_comp, cxx_launcher, ctypes.sizeof(ctypes.c_voidp))) + if c_comp and not c_comp_file.is_file(): + c_comp_file.write_text(textwrap.dedent('''\ + # Fake CMake file to skip the boring and slow stuff + set(CMAKE_C_COMPILER "{}") # Should be a valid compiler for try_compile, etc. + set(CMAKE_C_COMPILER_LAUNCHER "{}") # The compiler launcher (if presentt) + set(CMAKE_C_COMPILER_ID "GNU") # Pretend we have found GCC + set(CMAKE_COMPILER_IS_GNUCC 1) + set(CMAKE_C_COMPILER_LOADED 1) + set(CMAKE_C_COMPILER_WORKS TRUE) + set(CMAKE_C_ABI_COMPILED TRUE) + set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) + set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) + set(CMAKE_SIZEOF_VOID_P "{}") + '''.format(c_comp, c_launcher, ctypes.sizeof(ctypes.c_voidp)))) + + if cxx_comp and not cxx_comp_file.is_file(): + cxx_comp_file.write_text(textwrap.dedent('''\ + # Fake CMake file to skip the boring and slow stuff + set(CMAKE_CXX_COMPILER "{}") # Should be a valid compiler for try_compile, etc. + set(CMAKE_CXX_COMPILER_LAUNCHER "{}") # The compiler launcher (if presentt) + set(CMAKE_CXX_COMPILER_ID "GNU") # Pretend we have found GCC + set(CMAKE_COMPILER_IS_GNUCXX 1) + set(CMAKE_CXX_COMPILER_LOADED 1) + set(CMAKE_CXX_COMPILER_WORKS TRUE) + set(CMAKE_CXX_ABI_COMPILED TRUE) + set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) + set(CMAKE_SIZEOF_VOID_P "{}") + '''.format(cxx_comp, cxx_launcher, ctypes.sizeof(ctypes.c_voidp)))) if fortran_comp and not fortran_comp_file.is_file(): - fortran_comp_file.write_text('''# Fake CMake file to skip the boring and slow stuff -set(CMAKE_Fortran_COMPILER "{}") # Should be a valid compiler for try_compile, etc. -set(CMAKE_Fortran_COMPILER_LAUNCHER "{}") # The compiler launcher (if presentt) -set(CMAKE_Fortran_COMPILER_ID "GNU") # Pretend we have found GCC -set(CMAKE_COMPILER_IS_GNUG77 1) -set(CMAKE_Fortran_COMPILER_LOADED 1) -set(CMAKE_Fortran_COMPILER_WORKS TRUE) -set(CMAKE_Fortran_ABI_COMPILED TRUE) -set(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;fpp;FPP;f77;F77;f90;F90;for;For;FOR;f95;F95) -set(CMAKE_SIZEOF_VOID_P "{}") -'''.format(fortran_comp, fortran_launcher, ctypes.sizeof(ctypes.c_voidp))) + fortran_comp_file.write_text(textwrap.dedent('''\ + # Fake CMake file to skip the boring and slow stuff + set(CMAKE_Fortran_COMPILER "{}") # Should be a valid compiler for try_compile, etc. + set(CMAKE_Fortran_COMPILER_LAUNCHER "{}") # The compiler launcher (if presentt) + set(CMAKE_Fortran_COMPILER_ID "GNU") # Pretend we have found GCC + set(CMAKE_COMPILER_IS_GNUG77 1) + set(CMAKE_Fortran_COMPILER_LOADED 1) + set(CMAKE_Fortran_COMPILER_WORKS TRUE) + set(CMAKE_Fortran_ABI_COMPILED TRUE) + set(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) + set(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;fpp;FPP;f77;F77;f90;F90;for;For;FOR;f95;F95) + set(CMAKE_SIZEOF_VOID_P "{}") + '''.format(fortran_comp, fortran_launcher, ctypes.sizeof(ctypes.c_voidp)))) return self.call(args, build_dir, env)