From 53a6f92e434ce5388c662321fe24072b09b7e7eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Aug 08 2019 16:13:51 +0000 Subject: odb fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675562 --- diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 84ad17f..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/odb-2.2.2.tar.bz2 -/odb-2.3.0.tar.bz2 -/odb-2.4.0.tar.bz2 diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..228d6d0 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +odb fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675562 diff --git a/odb.spec b/odb.spec deleted file mode 100644 index a337c85..0000000 --- a/odb.spec +++ /dev/null @@ -1,223 +0,0 @@ -# The base of the version (just major and minor without point) -%global base_version 2.4 - -Name: odb -Version: %{base_version}.0 -Release: 25%{?dist} -Summary: Object-relational mapping (ORM) system for C++ - -License: GPLv3 -URL: http://www.codesynthesis.com/products/odb/ -Source0: http://www.codesynthesis.com/download/odb/%{base_version}/%{name}-%{version}.tar.bz2 -Patch1: odb_gcc6.patch -# See http://codesynthesis.com/pipermail/odb-users/2016-December/003581.html -Patch2: odb_gcc6_fix.patch - -# Set BuildRoot for compatibility with EPEL <= 5 -# See: http://fedoraproject.org/wiki/EPEL:Packaging#BuildRoot_tag - -%if 0%{?rhel} && 0%{?rhel} <= 7 -# Use devtoolset on RHEL 5/6 because it supports plugins -BuildRequires: devtoolset-2-binutils -BuildRequires: devtoolset-2-gcc-c++ -BuildRequires: devtoolset-2-gcc-plugin-devel -%else -BuildRequires: gcc-c++ >= 4.5.0 -BuildRequires: gcc-plugin-devel -%endif -# Uses libcutl from Code Synthesis -BuildRequires: libcutl-devel >= 1.8.0 -# Uses pkgconfig -BuildRequires: pkgconfig -# Uses expat -BuildRequires: expat-devel - - -# If building on Fedora or RHEL 7 -%if 0%{?rhel}%{?fedora} >= 7 - #Then odb uses the gcc plugin directory - %global ODB_PLUGIN_DIR %(g++ -print-file-name=plugin) -%else - # Otherwise, it just uses the system directory - %global ODB_PLUGIN_DIR %{_libexecdir}/odb/ -%endif - - -%description -ODB is an object-relational mapping (ORM) system for C++. It provides -tools, APIs, and library support that allow you to persist C++ objects -to a relational database (RDBMS) without having to deal with tables, -columns, or SQL and without manually writing any of the mapping code. - - -%prep -%autosetup -p1 -# Set the path to the default.options file -%global odb_default_options_dir %{_sysconfdir}/%{name} -%global odb_default_options_file %{odb_default_options_dir}/default.options - - -%build -confopts="--disable-static --with-options-file=%{odb_default_options_file}" -# If building on RHEL 5/6 -%if 0%{?rhel}%{?fedora} <= 6 -# Otherwise, use devtoolset on RHEL 5/6 to get a version of gcc that supports plugins -source /opt/rh/devtoolset-2/enable -# Add the explicit linking of pthread library because of a toolchain issue -# See: http://www.codesynthesis.com/pipermail/odb-users/2013-February/001103.html -confopts="$confopts LIBS=-lpthread" -%endif -%configure $confopts -make %{?_smp_mflags} - - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - -# Add the .conf file -mkdir -p $RPM_BUILD_ROOT/%{odb_default_options_dir} -echo "# Default ODB options file. This file is automatically loaded by the ODB -# compiler and can be used for installation-wide customizations, such as -# adding an include search path for a commonly used library. For example: -# -I %{_includedir}/boost141 -#" > $RPM_BUILD_ROOT/%{odb_default_options_file} - - - -%files -%config(noreplace) %{odb_default_options_file} -%doc GPLv3 -%doc LICENSE -%doc NEWS -%doc doc/default.css -%doc doc/manual.xhtml -%doc doc/odb-arch.png -%doc doc/odb-flow.png -%doc doc/odb-manual.pdf -%doc doc/odb-manual.ps -%doc doc/odb.xhtml -%{_bindir}/odb -%{ODB_PLUGIN_DIR} -%{_mandir}/man1/odb.1.gz -# Exclude the documentation that doesn't need to be packaged -%exclude %{_datadir}/doc/odb/GPLv3 -%exclude %{_datadir}/doc/odb/LICENSE -%exclude %{_datadir}/doc/odb/NEWS -%exclude %{_datadir}/doc/odb/README -%exclude %{_datadir}/doc/odb/default.css -%exclude %{_datadir}/doc/odb/manual.xhtml -%exclude %{_datadir}/doc/odb/odb-arch.png -%exclude %{_datadir}/doc/odb/odb-flow.png -%exclude %{_datadir}/doc/odb/odb-manual.pdf -%exclude %{_datadir}/doc/odb/odb-manual.ps -%exclude %{_datadir}/doc/odb/odb.xhtml -%exclude %{_datadir}/doc/odb/version - - -%changelog -* Thu Jul 25 2019 Fedora Release Engineering - 2.4.0-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 2.4.0-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 2.4.0-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Feb 08 2018 Fedora Release Engineering - 2.4.0-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 2.4.0-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 2.4.0-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 25 2017 Dave Johansen 2.4.0-19 -- Rebuild for gcc 7 without requires on specific version - -* Sun Feb 05 2017 Kalev Lember 2.4.0-18 -- Rebuild for gcc update - -* Sun Jan 01 2017 Dave Johansen 2.4.0-17 -- Rebuild for gcc update - -* Fri Dec 23 2016 Dave Johansen 2.4.0-16 -- Fix for gcc 6 - -* Sat Sep 10 2016 Dave Johansen 2.4.0-15 -- Rebuild for gcc update - -* Fri Jul 08 2016 Dave Johansen 2.4.0-14 -- Rebuild for gcc update (see Bugzilla #1350948) - -* Sun May 15 2016 Dave Johansen 2.4.0-13 -- Rebuild for gcc update - -* Fri Apr 29 2016 Dave Johansen 2.4.0-12 -- Rebuild for gcc update - -* Sat Feb 06 2016 Dave Johansen 2.4.0-11 -- Patch for gcc 6 - -* Thu Feb 04 2016 Fedora Release Engineering - 2.4.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Fri Jan 29 2016 Dave Johansen 2.4.0-9 -- Rebuild for gcc update - -* Fri Dec 11 2015 Dave Johansen 2.4.0-8 -- Rebuild for gcc update - -* Tue Nov 24 2015 Dave Johansen 2.4.0-7 -- Rebuild for libcutl 1.10.0 - -* Fri Nov 06 2015 Dave Johansen 2.4.0-6 -- Rebuild for gcc update - -* Wed Jun 17 2015 Fedora Release Engineering - 2.4.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri Apr 24 2015 Dave Johansen 2.4.0-4 -- Rebuild for gcc update - -* Thu Apr 16 2015 Dave Johansen 2.4.0-3 -- Rebuild for gcc update - -* Mon Feb 16 2015 Dave Johansen 2.4.0-2 -- Rebuild for gcc 5.0 C++ ABI change - -* Wed Feb 11 2015 Dave Johansen 2.4.0-1 -- Updated to 2.4.0 - -* Fri Feb 06 2015 Dave Johansen - 2.3.0-9 -- Rebuilt for gcc 5.0.0 - -* Wed Nov 05 2014 Dave Johansen - 2.3.0-8 -- Rebuilt for gcc 4.9.2 - -* Sun Aug 17 2014 Fedora Release Engineering - 2.3.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Jul 18 2014 Dave Johansen 2.3.0-6 -- Require the version of GCC that its being built against - -* Sun Jul 6 2014 Ville Skyttä - 2.3.0-5 -- Build with $RPM_OPT_FLAGS - -* Wed Jun 11 2014 Dave Johansen 2.3.0-4 -- Patch to build with gcc 4.9 - -* Sat Jun 07 2014 Fedora Release Engineering - 2.3.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild -- Build against devtoolset 2.0 - -* Wed May 28 2014 Dave Johansen 2.3.0-2 -- Adding expat-devel as BuildRequires - -* Mon Nov 4 2013 Dave Johansen 2.3.0-1 -- Updated to 2.3.0 - -* Tue Jul 23 2013 Dave Johansen 2.2.2-1 -- Initial build diff --git a/odb_gcc6.patch b/odb_gcc6.patch deleted file mode 100644 index 6f7c900..0000000 --- a/odb_gcc6.patch +++ /dev/null @@ -1,355 +0,0 @@ -From 511dcf67322ad87fb32f97d1cf7725c129e83898 Mon Sep 17 00:00:00 2001 -From: Boris Kolpackov -Date: Fri, 5 Feb 2016 16:01:42 +0200 -Subject: [PATCH] Initial work to make ODB compatible with GCC 6 - ---- - odb/cxx-lexer.cxx | 4 ++++ - odb/gcc-fwd.hxx | 23 ++++++++++++++++++++++- - odb/gcc.hxx | 10 ++++++++++ - odb/include.cxx | 31 +++++++++++++++++++++---------- - odb/parser.cxx | 8 ++++---- - odb/plugin.cxx | 29 +++++++++++++++++++++++++++-- - odb/semantics/elements.cxx | 4 ++-- - 7 files changed, 90 insertions(+), 19 deletions(-) - -diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx -index 7029c7e..64df296 100644 ---- a/odb/cxx-lexer.cxx -+++ b/odb/cxx-lexer.cxx -@@ -135,8 +135,12 @@ cpp_error_callback ( - #if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 5 - int /*reason*/, // Added in GCC 4.6.0. - #endif -+#if BUILDING_GCC_MAJOR <= 5 - location_t, - unsigned int, -+#else -+ rich_location*, -+#endif - char const* msg, - va_list *ap) - { -diff --git a/odb/gcc-fwd.hxx b/odb/gcc-fwd.hxx -index a120f05..618b106 100644 ---- a/odb/gcc-fwd.hxx -+++ b/odb/gcc-fwd.hxx -@@ -7,6 +7,24 @@ - - #include - -+#if BUILDING_GCC_MAJOR >= 6 -+ -+// If we include here, it pulls in all kinds of GCC trouble that -+// "poisons" standard C/C++ declarations; see safe-ctype.h. So instead we -+// are going to "exclude" safe-ctype.h. To compensate, however, we will -+// include it first thing in gcc.hxx. -+// -+# include -+# define SAFE_CTYPE_H -+# include -+# undef SAFE_CTYPE_H -+# include -+ -+typedef unsigned int source_location; // -+typedef source_location location_t; // -+ -+#else // GCC < 6 -+ - #if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 8 - # include // CHAR_BIT - # include -@@ -33,6 +51,9 @@ extern "C" - - typedef unsigned int source_location; // - typedef source_location location_t; // --} -+ -+} // extern "C" -+ -+#endif - - #endif // ODB_GCC_FWD_HXX -diff --git a/odb/gcc.hxx b/odb/gcc.hxx -index c953047..858d685 100644 ---- a/odb/gcc.hxx -+++ b/odb/gcc.hxx -@@ -7,6 +7,10 @@ - - #include - -+#if BUILDING_GCC_MAJOR >= 6 -+# include // See gcc-fwd.hxx. -+#endif -+ - // GCC header includes to get the plugin and parse tree declarations. - // The order is important and doesn't follow any kind of logic. - // -@@ -145,4 +149,10 @@ gcc_tree_code_name (gcc_tree_code_type tc) {return tree_code_name[tc];} - #define DECL_CHAIN(x) TREE_CHAIN(x) - #endif - -+// In GCC 6, ANON_AGGRNAME_P became anon_aggrname_p(). -+// -+#if BUILDING_GCC_MAJOR < 6 -+# define anon_aggrname_p(X) ANON_AGGRNAME_P(X) -+#endif -+ - #endif // ODB_GCC_HXX -diff --git a/odb/include.cxx b/odb/include.cxx -index 9c03f99..32d50a6 100644 ---- a/odb/include.cxx -+++ b/odb/include.cxx -@@ -30,9 +30,18 @@ namespace - path path_; - }; - -+#if BUILDING_GCC_MAJOR >= 6 -+ typedef line_map_ordinary line_map_type; -+#else -+ typedef line_map line_map_type; -+# ifndef linemap_check_ordinary -+# define linemap_check_ordinary(X) (X) -+# endif -+#endif -+ - struct includes - { -- typedef std::map map_type; -+ typedef std::map map_type; - bool trailing; // Included at the beginning or at the end of the main file. - map_type map; - }; -@@ -146,7 +155,9 @@ namespace - // - if (l > BUILTINS_LOCATION) - { -- line_map const* lm (linemap_lookup (line_table, l)); -+ line_map_type const* lm ( -+ linemap_check_ordinary ( -+ linemap_lookup (line_table, l))); - - if (lm != 0 && !MAIN_FILE_P (lm)) - { -@@ -539,20 +550,20 @@ namespace - // - #if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6 - size_t used (line_table->used); -- line_map const* maps (line_table->maps); -+ line_map_type const* maps (line_table->maps); - #else - size_t used (line_table->info_ordinary.used); -- line_map const* maps (line_table->info_ordinary.maps); -+ line_map_type const* maps (line_table->info_ordinary.maps); - #endif - - for (size_t i (0); i < used; ++i) - { -- line_map const* m (maps + i); -+ line_map_type const* m (maps + i); - - if (MAIN_FILE_P (m) || m->reason != LC_ENTER) - continue; - -- line_map const* ifm (INCLUDED_FROM (line_table, m)); -+ line_map_type const* ifm (INCLUDED_FROM (line_table, m)); - - #if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6 - path f (m->to_file); -@@ -582,7 +593,7 @@ namespace - for (includes::iterator j (i->second.begin ()); - j != i->second.end (); ++j) - { -- line_map const* lm (j->first); -+ line_map_type const* lm (j->first); - cerr << '\t' << lm->to_file << ":" << LAST_SOURCE_LINE (lm) << endl; - } - */ -@@ -591,13 +602,13 @@ namespace - // it is preferred over all others. Use the first one if there are - // several. - // -- line_map const* main_lm (0); -+ line_map_type const* main_lm (0); - include_directive* main_inc (0); - - for (includes::map_type::iterator j (i->second.map.begin ()); - j != i->second.map.end (); ++j) - { -- line_map const* lm (j->first); -+ line_map_type const* lm (j->first); - - if (MAIN_FILE_P (lm)) - { -@@ -638,7 +649,7 @@ namespace - for (includes::map_type::iterator j (i->second.map.begin ()); - j != i->second.map.end (); ++j) - { -- line_map const* lm (j->first); -+ line_map_type const* lm (j->first); - - #if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6 - string f (lm->to_file); -diff --git a/odb/parser.cxx b/odb/parser.cxx -index 275da33..842611f 100644 ---- a/odb/parser.cxx -+++ b/odb/parser.cxx -@@ -1070,14 +1070,14 @@ emit_type_decl (tree decl) - // says that in typedef struct {} S; S becomes struct's - // name. - // -- if (ANON_AGGRNAME_P (decl_name)) -+ if (anon_aggrname_p (decl_name)) - { - tree d (TYPE_NAME (t)); - - if (d != NULL_TREE && - !DECL_ARTIFICIAL (d) && - DECL_NAME (d) != NULL_TREE && -- !ANON_AGGRNAME_P (DECL_NAME (d))) -+ !anon_aggrname_p (DECL_NAME (d))) - { - decl = d; - decl_name = DECL_NAME (decl); -@@ -1694,7 +1694,7 @@ create_type (tree t, - ts << "start anon/stub " << gcc_tree_code_name(tc) << " at " - << file << ":" << line << endl; - -- if (d == NULL_TREE || ANON_AGGRNAME_P (DECL_NAME (d))) -+ if (d == NULL_TREE || anon_aggrname_p (DECL_NAME (d))) - { - if (tc == RECORD_TYPE) - r = &emit_class (t, file, line, clmn); -@@ -1791,7 +1791,7 @@ create_type (tree t, - ts << "start anon/stub " << gcc_tree_code_name(tc) << " at " - << file << ":" << line << endl; - -- if (d == NULL_TREE || ANON_AGGRNAME_P (DECL_NAME (d))) -+ if (d == NULL_TREE || anon_aggrname_p (DECL_NAME (d))) - { - r = &emit_enum (t, access, file, line, clmn); - } -diff --git a/odb/plugin.cxx b/odb/plugin.cxx -index fbbfe46..bc98f3e 100644 ---- a/odb/plugin.cxx -+++ b/odb/plugin.cxx -@@ -45,14 +45,28 @@ path file_; // File being compiled. - paths inputs_; // List of input files in at-once mode or just file_. - - bool (*cpp_error_prev) ( -- cpp_reader*, int, int, location_t, unsigned int, const char*, va_list*); -+ cpp_reader*, -+ int, -+ int, -+#if BUILDING_GCC_MAJOR >= 6 -+ rich_location*, -+#else -+ location_t, -+ unsigned int, -+#endif -+ const char*, -+ va_list*); - - static bool - cpp_error_filter (cpp_reader* r, - int level, - int reason, -+#if BUILDING_GCC_MAJOR >= 6 -+ rich_location* l, -+#else - location_t l, - unsigned int column_override, -+#endif - const char* msg, - va_list* ap) - { -@@ -66,7 +80,18 @@ cpp_error_filter (cpp_reader* r, - if (strstr (msg, "#pragma once") != 0) - return true; - -- return cpp_error_prev (r, level, reason, l, column_override, msg, ap); -+ return cpp_error_prev ( -+ r, -+ level, -+ reason, -+#if BUILDING_GCC_MAJOR >= 6 -+ l, -+#else -+ l, -+ column_override, -+#endif -+ msg, -+ ap); - } - - // A prefix of the _cpp_file struct. This struct is not part of the -diff --git a/odb/semantics/elements.cxx b/odb/semantics/elements.cxx -index 43fb379..ae9e906 100644 ---- a/odb/semantics/elements.cxx -+++ b/odb/semantics/elements.cxx -@@ -76,7 +76,7 @@ namespace semantics - if (tree decl = TYPE_NAME (n)) - name = DECL_NAME (decl); - -- return name != 0 && ANON_AGGRNAME_P (name); -+ return name != 0 && anon_aggrname_p (name); - } - - return true; -@@ -125,7 +125,7 @@ namespace semantics - if (tree decl = TYPE_NAME (type)) - { - name = DECL_NAME (decl); -- if (name != 0 && ANON_AGGRNAME_P (name)) -+ if (name != 0 && anon_aggrname_p (name)) - return true; - - tree s (CP_DECL_CONTEXT (decl)); --- -1.7.10.4 - -m 61d13eb53ade9f30a64892a901401bda5e42c335 Mon Sep 17 00:00:00 2001 -From: Boris Kolpackov -Date: Mon, 8 Feb 2016 18:39:21 +0200 -Subject: [PATCH] Make compilable with GCC 6 in C++14 mode - ---- - odb/gcc.hxx | 9 ++++++--- - odb/parser.cxx | 2 ++ - 2 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/odb/gcc.hxx b/odb/gcc.hxx -index 858d685..a22357d 100644 ---- a/odb/gcc.hxx -+++ b/odb/gcc.hxx -@@ -7,9 +7,12 @@ - - #include - --#if BUILDING_GCC_MAJOR >= 6 --# include // See gcc-fwd.hxx. --#endif -+// Actually, let's keep it out. With it included we can compile in C++98 -+// but not in C++14 (GCC 6 default). -+// -+// #if BUILDING_GCC_MAJOR >= 6 -+// # include // See gcc-fwd.hxx. -+// #endif - - // GCC header includes to get the plugin and parse tree declarations. - // The order is important and doesn't follow any kind of logic. -diff --git a/odb/parser.cxx b/odb/parser.cxx -index 842611f..6dfff6f 100644 ---- a/odb/parser.cxx -+++ b/odb/parser.cxx -@@ -1857,6 +1857,8 @@ create_type (tree t, - // the array type. In other words, we view it as "constant array" - // rather than "array of constant elements". - // -+ using semantics::array; // vs std::array. -+ - tree bt (TREE_TYPE (t)); - tree bt_mv (TYPE_MAIN_VARIANT (bt)); - type& bt_node (emit_type (bt_mv, access::public_, file, line, clmn)); --- -1.7.10.4 diff --git a/odb_gcc6_fix.patch b/odb_gcc6_fix.patch deleted file mode 100644 index 10cf738..0000000 --- a/odb_gcc6_fix.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ec777147024fde72e4411cc6b1e1e49f4a1d1804 Mon Sep 17 00:00:00 2001 -From: Boris Kolpackov -Date: Fri, 23 Dec 2016 10:18:01 +0200 -Subject: [PATCH] Fix bug in GCC 6 input_location translation - ---- - odb/cxx-lexer.cxx | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx -index 64df296..ae045d9 100644 ---- a/odb/cxx-lexer.cxx -+++ b/odb/cxx-lexer.cxx -@@ -106,7 +106,15 @@ next (string& token, tree* node) - location_t cxx_pragma_lexer:: - location () const - { -+ // Starting from GCC 6 the input location seem to require the same -+ // translation as what we do in real_source_location(). -+ // -+#if BUILDING_GCC_MAJOR >= 6 -+ return linemap_resolve_location ( -+ line_table, input_location, LRK_MACRO_EXPANSION_POINT, 0); -+#else - return input_location; -+#endif - } - - string cxx_pragma_lexer:: --- -1.7.10.4 - diff --git a/sources b/sources deleted file mode 100644 index 06cac90..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -0146d0223f874a9434673682a5669638 odb-2.4.0.tar.bz2