Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1938650 Details for
Bug 2160996
Review Request: draco - A library for compressing and decompressing 3D geometric meshes and point clouds
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh109 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
Migrated Products
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Patch to fix GCC 13 and enable tests
0001-Fix-GCC-13-compatibility-and-enable-tests.patch (text/plain), 5.01 KB, created by
Ben Beasley
on 2023-01-17 16:41:25 UTC
(
hide
)
Description:
Patch to fix GCC 13 and enable tests
Filename:
MIME Type:
Creator:
Ben Beasley
Created:
2023-01-17 16:41:25 UTC
Size:
5.01 KB
patch
obsolete
>From a9027f9ebeaa8bea212cf3b3795bc3784b19c37b Mon Sep 17 00:00:00 2001 >From: "Benjamin A. Beasley" <code@musicinmybrain.net> >Date: Tue, 17 Jan 2023 11:37:42 -0500 >Subject: [PATCH] Fix GCC 13 compatibility and enable tests > >--- > 0001-Use-system-gtest.patch | 64 +++++++++++++++++++++++++++++++++++++ > 964.patch | 22 +++++++++++++ > draco.spec | 14 ++++++-- > 3 files changed, 98 insertions(+), 2 deletions(-) > create mode 100644 0001-Use-system-gtest.patch > create mode 100644 964.patch > >diff --git a/0001-Use-system-gtest.patch b/0001-Use-system-gtest.patch >new file mode 100644 >index 0000000..46bf43d >--- /dev/null >+++ b/0001-Use-system-gtest.patch >@@ -0,0 +1,64 @@ >+From 887cea73f798ab4b8947ed55f600fdfddc263915 Mon Sep 17 00:00:00 2001 >+From: "Benjamin A. Beasley" <code@musicinmybrain.net> >+Date: Mon, 16 Jan 2023 21:48:15 -0500 >+Subject: [PATCH] Use system gtest >+ >+--- >+ cmake/draco_tests.cmake | 29 ++++------------------------- >+ 1 file changed, 4 insertions(+), 25 deletions(-) >+ >+diff --git a/cmake/draco_tests.cmake b/cmake/draco_tests.cmake >+index 2d7f05e..b0a2977 100644 >+--- a/cmake/draco_tests.cmake >++++ b/cmake/draco_tests.cmake >+@@ -102,29 +102,8 @@ endif() >+ >+ macro(draco_setup_test_targets) >+ if(DRACO_TESTS) >+- draco_setup_googletest() >+- >+- if(NOT (EXISTS ${draco_gtest_all} AND EXISTS ${draco_gtest_main})) >+- message(FATAL_ERROR "googletest missing, run git submodule update --init") >+- endif() >+- >+- list(APPEND draco_test_defines GTEST_HAS_PTHREAD=0) >+- >+- draco_add_library( >+- TEST >+- NAME draco_gtest >+- TYPE STATIC >+- SOURCES ${draco_gtest_all} >+- DEFINES ${draco_defines} ${draco_test_defines} >+- INCLUDES ${draco_test_include_paths}) >+- >+- draco_add_library( >+- TEST >+- NAME draco_gtest_main >+- TYPE STATIC >+- SOURCES ${draco_gtest_main} >+- DEFINES ${draco_defines} ${draco_test_defines} >+- INCLUDES ${draco_test_include_paths}) >++ find_package(GTest REQUIRED) >++ list(APPEND draco_test_include_paths ${draco_include_paths}) >+ >+ set(DRACO_TEST_DATA_DIR "${draco_root}/testdata") >+ set(DRACO_TEST_TEMP_DIR "${draco_build}/draco_test_temp") >+@@ -140,13 +119,13 @@ macro(draco_setup_test_targets) >+ SOURCES ${draco_test_sources} >+ DEFINES ${draco_defines} ${draco_test_defines} >+ INCLUDES ${draco_test_include_paths} >+- LIB_DEPS ${draco_dependency} draco_gtest draco_gtest_main) >++ LIB_DEPS ${draco_dependency} GTest::gtest GTest::gtest_main) >+ >+ draco_add_executable( >+ NAME draco_factory_tests >+ SOURCES ${draco_factory_test_sources} >+ DEFINES ${draco_defines} ${draco_test_defines} >+ INCLUDES ${draco_test_include_paths} >+- LIB_DEPS ${draco_dependency} draco_gtest draco_gtest_main) >++ LIB_DEPS ${draco_dependency} GTest::gtest GTest::gtest_main) >+ endif() >+ endmacro() >+-- >+2.38.1 >+ >diff --git a/964.patch b/964.patch >new file mode 100644 >index 0000000..7ec06bd >--- /dev/null >+++ b/964.patch >@@ -0,0 +1,22 @@ >+From b81a4c1e34d6c2f1fac6d186d2d5b1388141182f Mon Sep 17 00:00:00 2001 >+From: "Benjamin A. Beasley" <code@musicinmybrain.net> >+Date: Tue, 17 Jan 2023 11:33:36 -0500 >+Subject: [PATCH] Add a missing include >+ >+This was causing failure to compile on GCC 13. >+--- >+ src/draco/io/file_utils.h | 1 + >+ 1 file changed, 1 insertion(+) >+ >+diff --git a/src/draco/io/file_utils.h b/src/draco/io/file_utils.h >+index c928fdfd..d153c99b 100644 >+--- a/src/draco/io/file_utils.h >++++ b/src/draco/io/file_utils.h >+@@ -15,6 +15,7 @@ >+ #ifndef DRACO_IO_FILE_UTILS_H_ >+ #define DRACO_IO_FILE_UTILS_H_ >+ >++#include <cstdint> >+ #include <string> >+ #include <vector> >+ >diff --git a/draco.spec b/draco.spec >index 46cc053..4114d61 100644 >--- a/draco.spec >+++ b/draco.spec >@@ -9,12 +9,21 @@ License: Apache-2.0 > URL: https://github.com/google/%{name} > Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz > >+# Downstream-only patch that unconditionally links a system copy of gtest, >+# rather than expecting a git submodule as upstream prefers (and gtest upstream >+# would recommend). >+Patch: 0001-Use-system-gtest.patch >+# Add a missing include >+# https://github.com/google/draco/pull/964 >+Patch: %{url}/pull/964.patch >+ > BuildRequires: cmake > BuildRequires: gcc > BuildRequires: gcc-c++ > #BuildRequires: help2man > BuildRequires: ninja-build > BuildRequires: pkgconfig(python3) >+BuildRequires: cmake(gtest) > > %description > A library for compressing and decompressing 3D geometric meshes and point clouds >@@ -27,7 +36,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} > %{summary}. > > %prep >-%autosetup -n %{name}-%{version} >+%autosetup -n %{name}-%{version} -p1 > > # Remove precompiled Javascript and binaries > rm -fr {javascript,maya} >@@ -35,6 +44,7 @@ rm -fr {javascript,maya} > > %build > %cmake -GNinja \ >+ -DDRACO_TESTS=ON \ > -DCMAKE_BUILD_TYPE=Release \ > -DBUILD_SHARED_LIBS=ON > >@@ -47,7 +57,7 @@ rm -fr {javascript,maya} > rm -f %{buildroot}/%{_libdir}/libdraco.a > > %check >-%ctest >+%{_vpath_builddir}/draco_tests > > %files > %license LICENSE AUTHORS >-- >2.38.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2160996
:
1938649
| 1938650 |
1939112
|
1939320
|
1939783
|
1939785
|
1940011