From 697fab746ea6299c9ffc7fe8d22041c3b551aae9 Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Mon, 25 Sep 2023 13:39:24 -0700 Subject: [PATCH 1/2] In doctesting, ignore two ld warnings from recent OS X: ld: warning: duplicate -rpath '/path/to/SAGE_ROOT/local/lib' ignored ld: warning: ignoring duplicate libraries: '-lflint', '-lgmp', '-lmpfr' --- src/sage/doctest/parsing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index 5c37ea1422b..c8c5aa30968 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -1651,6 +1651,15 @@ def do_fixup(self, want, got): pythran_numpy_warning_regex = re.compile(r'WARNING: Overriding pythran description with argspec information for: numpy\.random\.[a-z_]+') got = pythran_numpy_warning_regex.sub('', got) did_fixup = True + + if "duplicate" in got: + # New warnings as of Sept '23, OS X 13.6, new command-line tools. + dup_rpath_regex = re.compile("ld: warning: duplicate -rpath .* ignored") + dup_lib_regex = re.compile("ld: warning: ignoring duplicate libraries: .*") + got = dup_rpath_regex.sub('', got) + got = dup_lib_regex.sub('', got) + did_fixup = True + return did_fixup, want, got def output_difference(self, example, got, optionflags): From 8f5ee786d72013aff2413a63d788cf2c68c9768a Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Thu, 28 Sep 2023 15:41:17 -0700 Subject: [PATCH 2/2] Doctesting ignore warnings: mention that they come from Xcode 15's "ld". --- src/sage/doctest/parsing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index c8c5aa30968..506d3208d47 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -1653,7 +1653,9 @@ def do_fixup(self, want, got): did_fixup = True if "duplicate" in got: - # New warnings as of Sept '23, OS X 13.6, new command-line tools. + # New warnings as of Sept '23, OS X 13.6, new command-line + # tools. In particular, these seem to come from ld in + # Xcode 15. dup_rpath_regex = re.compile("ld: warning: duplicate -rpath .* ignored") dup_lib_regex = re.compile("ld: warning: ignoring duplicate libraries: .*") got = dup_rpath_regex.sub('', got)