Resolves: rhbz#1965975 FTBFS

f41
Stephan Bergmann 4 years ago
parent 1e16761a87
commit 71a4281675

@ -0,0 +1,26 @@
From 2382a2f6b4e84e3dc6c3b724b92dae8f991a76be Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Mon, 31 May 2021 13:30:37 +0200
Subject: [PATCH] Adapt to hamcrest-2.2-3.fc35.noarch.rpm
Change-Id: Ibddfc30a5f0828ab77235ec1155f1c2e1eef24ee
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
index 43fb8d877515..07954b2c3262 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13427,6 +13427,8 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" -a "$cross_compiling" != "
HAMCREST_JAR=/usr/share/lib/java/hamcrest.jar
elif test -e /usr/share/java/hamcrest/core.jar; then
HAMCREST_JAR=/usr/share/java/hamcrest/core.jar
+ elif test -e /usr/share/java/hamcrest/hamcrest.jar; then
+ HAMCREST_JAR=/usr/share/java/hamcrest/hamcrest.jar
else
HAMCREST_JAR=/usr/share/java/hamcrest.jar
fi
--
2.31.1

@ -0,0 +1,80 @@
From 4f85b6ec5964e2d9747f6743f9adc6ef1f951e4a Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 5 May 2021 08:20:18 +0200
Subject: [PATCH] Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=aa475c4ac80733f85ba47b109fc1900f05e810e2>
towards GCC 12, so that now "the return type is the original rvalue stream type
not its base class." (And which would thus have caused issues like
> sfx2/source/control/bindings.cxx:1323:19: error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char> &')
> ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : ""));
> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/sal/log.hxx:198:6: note: expanded from macro 'SAL_STREAM'
> (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str())
> ^
> include/sal/log.hxx:341:20: note: expanded from macro 'SAL_INFO'
> SAL_WHERE, stream)
> ~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM'
> SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_'
> ::sal::detail::StreamStart() << stream) == 1) \
> ^~~~~~
now. While the issue with old libstdc++ that originally prompted the
dynamic_cast was
> sfx2/source/control/bindings.cxx:1323:19: error: no member named 'str' in 'std::basic_ostream<char>'
> ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : ""));
> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/sal/log.hxx:194:40: note: expanded from macro 'SAL_STREAM'
> (::std::ostringstream() << stream).str()
> ^
> include/sal/log.hxx:336:20: note: expanded from macro 'SAL_INFO'
> SAL_WHERE, stream)
> ~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM'
> SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_'
> ::sal::detail::StreamStart() << stream) == 1) \
> ^~~~~~
.)
The libstdc++ macro _GLIBCXX_RELEASE is reportedly available since GCC 7.1.
Change-Id: I1ee6eabb66355c1f28b9d305cbd85bac50d6b0e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115121
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 1f3dddd6f21d91c429190ae314dadeec409f35f4, plus
follow-up 95e26d3dce4f5a3b2d010d5ca47b4e450905a100 "tdf#142326: Adapt to
'libstdc++: Implement LWG 1203 for rvalue iostreams'")
Change-Id: I7c8fef25e15fcfa9b83924467dc86dc2957fbd7d
---
include/sal/log.hxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 6bb0d1b43d3d..a0fa902dbce6 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -186,7 +186,10 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
@since LibreOffice 3.5
*/
-#if defined _LIBCPP_VERSION || (defined _MSC_VER && _MSC_VER >= 1915)
+#if defined _LIBCPP_VERSION \
+ || (defined _GLIBCXX_RELEASE \
+ && (_GLIBCXX_RELEASE >= 12 || (_GLIBCXX_RELEASE == 11 && __GLIBCXX__ > 20210428))) \
+ || (defined _MSC_VER && _MSC_VER >= 1915)
#define SAL_STREAM(stream) \
(::std::ostringstream() << stream).str()
#else
--
2.31.1

@ -50,7 +50,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.2
Release: 2%{?libo_prerelease}%{?dist}
Release: 3%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0
URL: http://www.libreoffice.org/
@ -252,6 +252,8 @@ Patch4: 0001-rhbz-1918152-fix-FTBFS.patch
Patch5: 0001-Get-rid-of-apache-commons-logging.patch
Patch6: 0001-rhbz-1956977-crash-on-switch-from-active-comment-to-.patch
Patch7: 0001-Related-tdf-138888-fix-assertion-on-avmedia-MediaCon.patch
Patch8: 0001-Adapt-to-libstdc-Implement-LWG-1203-for-rvalue-iostr.patch
Patch9: 0001-Adapt-to-hamcrest-2.2-3.fc35.noarch.rpm.patch
# not upstreamed
Patch500: 0001-disable-libe-book-support.patch
@ -2237,6 +2239,10 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor &>/dev/null || :
%{_includedir}/LibreOfficeKit
%changelog
* Mon May 31 2021 Stephan Bergmann <sbergman@redhat.com> - 1:7.1.3.2-3
- Resolves: rhbz#1965975 Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"
- Resolves: rhbz#1965975 Adapt to hamcrest-2.2-3.fc35.noarch.rpm
* Thu May 20 2021 Pete Walter <pwalter@fedoraproject.org> - 1:7.1.3.2-2
- Rebuild for ICU 69

Loading…
Cancel
Save