[LTO FTBFS] Responsible upstream code found, switch back to building with LTO
reverting the upstream change for now
This commit is contained in:
parent
e95c4b70f5
commit
c2056a17af
40
lto-type-mismatch.patch
Normal file
40
lto-type-mismatch.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
This code has been introduced by Upstream in the commit:
|
||||||
|
https://github.com/mariadb-corporation/mariadb-connector-c/commit/1acb81e
|
||||||
|
and later modified in the:
|
||||||
|
https://github.com/mariadb-corporation/mariadb-connector-c/commit/5f88f50
|
||||||
|
between the version mariadb-connector-c 3.3.5 and 3.3.7
|
||||||
|
|
||||||
|
It results in a lot of warnings being treated as errors and thus killing the compilation.
|
||||||
|
Specifically lot of occuerences of these:
|
||||||
|
| libmariadb/ma_client_plugin.c:83:39: error: type of ‘mysql_native_password_client_plugin’ does not match original declaration [-Werror=lto-type-mismatch]
|
||||||
|
| libmariadb/ma_client_plugin.c:84:39: error: type of ‘mysql_old_password_client_plugin’ does not match original declaration [-Werror=lto-type-mismatch]
|
||||||
|
| libmariadb/ma_client_plugin.c:85:39: error: type of ‘zlib_client_plugin’ does not match original declaration [-Werror=lto-type-mismatch]
|
||||||
|
| libmariadb/ma_client_plugin.c:86:39: error: type of ‘pvio_socket_client_plugin’ does not match original declaration [-Werror=lto-type-mismatch]
|
||||||
|
|
||||||
|
Note: These warnings were present even before:
|
||||||
|
e.g. this build.log of release 3.3.5:
|
||||||
|
https://koji.fedoraproject.org/koji/buildinfo?buildID=2244099
|
||||||
|
https://kojipkgs.fedoraproject.org//packages/mariadb-connector-c/3.3.5/2.fc39/data/logs/x86_64/build.log
|
||||||
|
search for "[-Wlto-type-mismatch]"
|
||||||
|
|
||||||
|
The difference is that since they started to be treated as errors and thus killing the build.
|
||||||
|
|
||||||
|
--- mariadb-connector-c-3.3.8-src/CMakeLists.txt 2023-11-01 11:28:04.000000000 +0100
|
||||||
|
+++ mariadb-connector-c-3.3.8-src/CMakeLists.txt_patched 2024-01-12 20:57:58.031375024 +0100
|
||||||
|
@@ -395,16 +395,6 @@ ENDIF()
|
||||||
|
MESSAGE1(SYSTEM_LIBS "SYSTEM_LIBS ${SYSTEM_LIBS}")
|
||||||
|
MARK_AS_ADVANCED(SYSTEM_LIBS)
|
||||||
|
|
||||||
|
-IF(NOT IS_SUBPROJECT)
|
||||||
|
-IF ((NOT WIN32) AND (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "GNU"))
|
||||||
|
- SET(WARNING_AS_ERROR "-Werror")
|
||||||
|
-ELSEIF(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||||
|
- SET(WARNING_AS_ERROR "/WX")
|
||||||
|
-ENDIF()
|
||||||
|
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_AS_ERROR}")
|
||||||
|
-ENDIF()
|
||||||
|
-
|
||||||
|
-
|
||||||
|
IF(NOT REMOTEIO_PLUGIN_TYPE MATCHES "OFF")
|
||||||
|
IF(CURL_FOUND)
|
||||||
|
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
|
@ -3,10 +3,6 @@
|
|||||||
# Enable building and packing of the testsuite
|
# Enable building and packing of the testsuite
|
||||||
%bcond_without testsuite
|
%bcond_without testsuite
|
||||||
|
|
||||||
# TEMPORARY WORKAROUND:
|
|
||||||
# Build fails since 3.3.6 with LTO flags enabled
|
|
||||||
# Reported as rhbz#2257198
|
|
||||||
%global _lto_cflags %{nil}
|
|
||||||
|
|
||||||
|
|
||||||
Name: mariadb-connector-c
|
Name: mariadb-connector-c
|
||||||
@ -24,6 +20,8 @@ Url: http://mariadb.org/
|
|||||||
Patch1: testsuite.patch
|
Patch1: testsuite.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Patch2: lto-type-mismatch.patch
|
||||||
|
|
||||||
Requires: %{_sysconfdir}/my.cnf
|
Requires: %{_sysconfdir}/my.cnf
|
||||||
BuildRequires: gcc-c++ cmake openssl-devel zlib-devel libzstd-devel
|
BuildRequires: gcc-c++ cmake openssl-devel zlib-devel libzstd-devel
|
||||||
# Remote-IO plugin
|
# Remote-IO plugin
|
||||||
@ -92,6 +90,7 @@ and require this package, so the /etc/my.cnf file is present.
|
|||||||
%if %{with testsuite}
|
%if %{with testsuite}
|
||||||
%patch -P1 -p1
|
%patch -P1 -p1
|
||||||
%endif
|
%endif
|
||||||
|
%patch -P2 -p1
|
||||||
|
|
||||||
# Remove unsused parts
|
# Remove unsused parts
|
||||||
rm -r win win-iconv external/zlib
|
rm -r win win-iconv external/zlib
|
||||||
|
Loading…
Reference in New Issue
Block a user