From 6f2f7b680c881335f3172f50e3491f25f64cfa76 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Aug 22 2020 23:14:14 +0000 Subject: Disable hidden symbols by default to work around run-time errors (rhbz#1871291) Explicitly build tests, and only run one test at a time in ctest --- diff --git a/gazebo-10.1.0-automoc.patch b/gazebo-10.1.0-automoc.patch index f734a8f..741a164 100644 --- a/gazebo-10.1.0-automoc.patch +++ b/gazebo-10.1.0-automoc.patch @@ -1,6 +1,6 @@ diff -up ./CMakeLists.txt.automoc ./CMakeLists.txt ---- ./CMakeLists.txt.automoc 2020-02-23 13:14:37.253626733 -0500 -+++ ./CMakeLists.txt 2020-02-23 13:14:52.629672833 -0500 +--- ./CMakeLists.txt.automoc 2019-03-28 20:58:30.000000000 -0400 ++++ ./CMakeLists.txt 2020-08-22 18:22:13.315277325 -0400 @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8.6 FAT if(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) @@ -9,3 +9,24 @@ diff -up ./CMakeLists.txt.automoc ./CMakeLists.txt endif(COMMAND CMAKE_POLICY) project (Gazebo) +@@ -250,7 +251,7 @@ filter_valid_compiler_flags(${WARN_LEVEL + # Check and add visibility hidden by default. Only in UNIX + # Windows and MacosX does not handled properly the hidden compilation + if (UNIX AND NOT APPLE) +- filter_valid_compiler_flags(-fvisibility=hidden -fvisibility-inlines-hidden) ++ filter_valid_compiler_flags(-fvisibility-inlines-hidden) + endif() + + if (MSVC) +@@ -260,9 +261,8 @@ if (MSVC) + endif() + + # Visual Studio enables c++11 support by default +-if (NOT MSVC) +- set(UNFILTERED_FLAGS "-std=c++11") +-endif() ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_EXTENSIONS OFF) + + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VALID_CXX_FLAGS} ${UNFILTERED_FLAGS}") + diff --git a/gazebo.spec b/gazebo.spec index c9d3a7f..701b0e1 100644 --- a/gazebo.spec +++ b/gazebo.spec @@ -3,7 +3,7 @@ Name: gazebo Version: 10.1.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: 3D multi-robot simulator with dynamics # gazebo/gui/qgv is LGPLv3+ @@ -28,6 +28,8 @@ Patch3: %{name}-2.2.2-connection.patch Patch5: %{name}-7.4.0-fixtest.patch Patch6: %{name}-gaussian-noise-model-with-0-bias-stddev.patch Patch9: %{name}-9.5.0-python3.patch +# Set a default CMake policy to disable warnings about the automoc behavior +# Disable default hidden symbol visibility (rhbz#1871291) Patch10: %{name}-10.1.0-automoc.patch Patch11: %{name}-10.1.0-singleton.patch Patch12: %{name}-9.5.0-wayland.patch @@ -201,13 +203,12 @@ rm -rf deps/libccd -DSSE4_2_FOUND=OFF \ -Dogre_library_dirs=%{_libdir} \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$CXXFLAGS -std=c++11" \ -DUSE_UPSTREAM_CFLAGS=OFF \ -DUSE_HOST_CFLAGS=ON \ - -DCMAKE_INSTALL_DATAROOTDIR=share \ - -DBUILD_TESTING=ON + -DCMAKE_INSTALL_DATAROOTDIR=share %cmake_build +%cmake_build --target tests %cmake_build --target doc || exit 0; %cmake_build --target man || exit 0; mv %{_vpath_builddir}/doxygen_msgs/html{,_msgs} @@ -257,7 +258,7 @@ rm -f %{buildroot}/%{_libdir}/*.a #export GAZEBO_RESOURCE_PATH=%{buildroot}%{_datadir}/gazebo-%{abiversion} #export LD_LIBRARY_PATH=%{buildroot}%{_libdir} #export PATH=$PATH:%{buildroot}%{_bindir} -%ctest --verbose --exclude-regex ".*OpenAL.*" || exit 0 +%ctest --verbose --parallel 1 --exclude-regex ".*OpenAL.*" || exit 0 %files %license COPYING LICENSE @@ -315,6 +316,10 @@ rm -f %{buildroot}/%{_libdir}/*.a %{_libdir}/cmake/* %changelog +* Sat Aug 22 2020 Rich Mattes - 10.1.0-10 +- Disable hidden symbols by default to work around run-time errors (rhbz#1871291) +- Explicitly build tests, and only run one test at a time in ctest + * Sat Aug 01 2020 Fedora Release Engineering - 10.1.0-9 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild