workaround libdl-related FTBFS (#1972535)

This commit is contained in:
Rex Dieter 2021-06-18 15:06:54 -05:00
parent 58d72bbcee
commit f52c15acca
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,28 @@
diff -up cmake-3.20.4/Source/kwsys/testDynamicLoader.cxx.libdl cmake-3.20.4/Source/kwsys/testDynamicLoader.cxx
--- cmake-3.20.4/Source/kwsys/testDynamicLoader.cxx.libdl 2021-06-14 10:05:49.000000000 -0500
+++ cmake-3.20.4/Source/kwsys/testDynamicLoader.cxx 2021-06-18 14:17:50.990852438 -0500
@@ -8,6 +8,13 @@
# include <be/kernel/OS.h> /* disable_debugger() API. */
#endif
+#ifdef __linux__
+#include <gnu/lib-names.h>
+#ifndef LIBDL_SO
+#define LIBDL_SO "libdl.so.2"
+#endif
+#endif
+
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
@@ -107,8 +114,8 @@ int testDynamicLoader(int argc, char* ar
// This one is actually fun to test, since dlopen is by default
// loaded...wonder why :)
res += TestDynamicLoader("foobar.lib", "dlopen", 0, 1, 0);
- res += TestDynamicLoader("libdl.so", "dlopen", 1, 1, 1);
- res += TestDynamicLoader("libdl.so", "TestDynamicLoader", 1, 0, 1);
+ res += TestDynamicLoader(LIBDL_SO, "dlopen", 1, 1, 1);
+ res += TestDynamicLoader(LIBDL_SO, "TestDynamicLoader", 1, 0, 1);
#endif
// Now try on the generated library
std::string libname = GetLibName(KWSYS_NAMESPACE_STRING "TestDynload");

View File

@ -109,6 +109,10 @@ Patch102: %{name}-mingw-dl.patch
# memory-hungry tests when building on koji builders with *lots* of cores
# so limit it to some reasonable number (4)
Patch103: cmake-3.20-CPACK_THREADS.patch
# (upstreamable)
# https://bugzilla.redhat.com/show_bug.cgi?id=1972535
# fix FTBFS
Patch104: cmake-3.20.4-glibc_libdl.patch
# Patch for renaming on EPEL
%if 0%{?name_suffix:1}
@ -521,6 +525,7 @@ popd
%changelog
* Fri Jun 18 2021 Rex Dieter <rdieter@fedoraproject.org> - 3.20.4-1
- cmake-3.20.4 (#1942118)
- workaround libdl-related FTBFS (#1972535)
* Sun May 30 2021 Rex Dieter <rdieter@fedoraproject.org> - 3.20.3-1
- cmake-3.20.3