Peter Robinson wrote: > That built, update submitted, just gnatcoll and matreshka to go. OK, here we go: · one patch to Gnatcoll for GCC 5 · one patch to Matreshka for GCC 5 · another patch to build Matreshka in spite of bug 1151793 · one fix to GPRbuild that is needed before Matreshka can be built · and a better workaround for the libgnat version issue that really should get in before the release. Björn Persson
diff --git a/gnatcoll-2013-visibility.patch b/gnatcoll-2013-visibility.patch new file mode 100644 index 0000000..61ab243 --- /dev/null +++ b/gnatcoll-2013-visibility.patch @@ -0,0 +1,47 @@ +--- src/gnatcoll-traces.adb 2015-05-01 02:22:57.181750324 +0200 ++++ src/gnatcoll-traces.adb 2015-05-01 02:22:35.451079384 +0200 +@@ -930,7 +930,7 @@ + --------------------- + + procedure Put_Stack_Trace (Stream : in out Trace_Stream_Record'Class) is +- Tracebacks : Tracebacks_Array (1 .. 50); ++ Tracebacks : GNAT.Traceback.Tracebacks_Array (1 .. 50); + Len : Natural; + begin + Call_Chain (Tracebacks, Len); +--- src/gnatcoll-memory.adb 2013-01-08 11:50:34.000000000 +0100 ++++ src/gnatcoll-memory.adb 2015-05-01 03:07:29.821997624 +0200 +@@ -22,7 +22,6 @@ + ------------------------------------------------------------------------------ + + with Ada.Exceptions; +-with Ada.Exceptions.Traceback; + with Ada.Unchecked_Deallocation; + with GNAT.IO; use GNAT.IO; + with GNAT.Traceback; use GNAT.Traceback; +@@ -166,7 +165,6 @@ + ----------- + + function Equal (K1, K2 : Tracebacks_Array_Access) return Boolean is +- use Ada.Exceptions.Traceback; + begin + return K1.all = K2.all; + end Equal; +@@ -215,7 +213,7 @@ + Ptr : System.Address; + Size : Storage_Count) return Byte_Count + is +- Trace : aliased Tracebacks_Array (1 .. Stack_Trace_Depth); ++ Trace : aliased GNAT.Traceback.Tracebacks_Array (1 .. Stack_Trace_Depth); + Len : Natural; + Elem : Traceback_Htable_Elem_Ptr; + Chunk : Chunk_Data; +@@ -247,7 +245,7 @@ + if Elem = null then + Elem := new Traceback_Htable_Elem' + (Traceback => +- new Tracebacks_Array'(Trace (Trace'First + 2 .. Len)), ++ new GNAT.Traceback.Tracebacks_Array'(Trace (Trace'First + 2 .. Len)), + Allocs => 1, + Frees => 0, + Total_Allocs => Size_Was, diff --git a/gnatcoll.spec b/gnatcoll.spec index e0ae7e9..e1a2052 100644 --- a/gnatcoll.spec +++ b/gnatcoll.spec @@ -9,6 +9,8 @@ URL: http://libre.adacore.com Source0: %{name}-gpl-%{version}-src.tgz Patch1: %{name}-%{version}-directories.patch Patch2: %{name}-%{version}-optflags.patch +# Resolve problems with GCC5 and visibility: +Patch3: gnatcoll-2013-visibility.patch BuildRequires: fedora-gnat-project-common >= 2 BuildRequires: python-devel gmp-devel GtkAda-devel BuildRequires: pygtk2-devel postgresql-devel chrpath @@ -39,6 +41,7 @@ Requires: postgresql-devel sqlite-devel %setup -q -n %{name}-gpl-%{version}-src %patch1 -p1 %patch2 -p1 +%patch3 %build %configure --enable-shared --with-readline --enable-gpl --with-sqlite=/usr/include/ @@ -99,8 +102,8 @@ rm -f %{buildroot}/%{_datadir}/%{name}/dborm.pyo %changelog -* Wed Apr 29 2015 Peter Robinson <pbrobinson@xxxxxxxxxxxxxxxxx> 2013-11 -- rebuild (gcc / gnat 5) +* Fri May 01 2015 Björn Persson <Bjorn@Rombobjörn.se> - 2013-11 +- Patched to build with GCC 5. * Tue Mar 31 2015 Pavel Zhukov <landgraf@xxxxxxxxxxxxxxxxx> - 2013-10 - Fix library dir
From 90903ea1474a65b8efb29719d412c427aadbb3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Persson?= <Bjorn@Rombobjörn.se> Date: Sat, 2 May 2015 21:24:38 +0200 Subject: [PATCH 1/2] Patched to build with GCC 5. --- matreshka-0.6.0-GCC5.patch | 117 +++++++++++++++++++++++++++++++++++++++++++++ matreshka.spec | 7 ++- 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 matreshka-0.6.0-GCC5.patch diff --git a/matreshka-0.6.0-GCC5.patch b/matreshka-0.6.0-GCC5.patch new file mode 100644 index 0000000..ca5dea1 --- /dev/null +++ b/matreshka-0.6.0-GCC5.patch @@ -0,0 +1,117 @@ +--- source/league/league-environment_variables.adb 2011-02-26 13:11:48.788640000 +0100 ++++ source/league/league-environment_variables.adb 2015-05-02 17:44:59.589254146 +0200 +@@ -61,8 +61,7 @@ + use type Universal_String_Maps.Map; + + begin +- return +- Universal_String_Maps.Map (Left) = Universal_String_Maps.Map (Right); ++ return Left.Data = Right.Data; + end "="; + + ----------- +@@ -71,7 +70,7 @@ + + procedure Clear (Self : in out Environment_Variable_Set'Class) is + begin +- Universal_String_Maps.Map (Self).Clear; ++ Self.Data.Clear; + end Clear; + + -------------- +@@ -83,7 +82,7 @@ + Name : League.Strings.Universal_String) return Boolean + is + Key : constant Key_Type := To_Key (Name); +- Position : constant Universal_String_Maps.Cursor := Self.Find (Key); ++ Position : constant Universal_String_Maps.Cursor := Self.Data.Find (Key); + + begin + return Universal_String_Maps.Has_Element (Position); +@@ -108,14 +107,14 @@ + Value : League.Strings.Universal_String) + is + Key : constant Key_Type := To_Key (Name); +- Position : constant Universal_String_Maps.Cursor := Self.Find (Key); ++ Position : constant Universal_String_Maps.Cursor := Self.Data.Find (Key); + + begin + if Universal_String_Maps.Has_Element (Position) then +- Self.Replace_Element (Position, Value); ++ Self.Data.Replace_Element (Position, Value); + + else +- Self.Insert (Key, Value); ++ Self.Data.Insert (Key, Value); + end if; + end Insert; + +@@ -128,11 +127,11 @@ + Name : League.Strings.Universal_String) + is + Key : constant Key_Type := To_Key (Name); +- Position : Universal_String_Maps.Cursor := Self.Find (Key); ++ Position : Universal_String_Maps.Cursor := Self.Data.Find (Key); + + begin + if Universal_String_Maps.Has_Element (Position) then +- Self.Delete (Position); ++ Self.Data.Delete (Position); + end if; + end Remove; + +@@ -155,7 +154,7 @@ + return League.Strings.Universal_String + is + Key : constant Key_Type := To_Key (Name); +- Position : constant Universal_String_Maps.Cursor := Self.Find (Key); ++ Position : constant Universal_String_Maps.Cursor := Self.Data.Find (Key); + + begin + if Universal_String_Maps.Has_Element (Position) then +--- source/league/league-environment_variables.ads 2012-08-13 09:41:05.105439000 +0200 ++++ source/league/league-environment_variables.ads 2015-05-02 17:44:59.589254146 +0200 +@@ -93,7 +93,8 @@ + "=", + League.Strings."="); + +- type Environment_Variable_Set is +- new Universal_String_Maps.Map with null record; ++ type Environment_Variable_Set is tagged record ++ Data : Universal_String_Maps.Map; ++ end record; + + end League.Environment_Variables; +--- source/xml/sax/xml/xml-sax-simple_readers.ads 2012-10-08 17:25:42.487161000 +0200 ++++ source/xml/sax/xml/xml-sax-simple_readers.ads 2015-05-02 16:45:24.480791034 +0200 +@@ -303,7 +303,7 @@ + type Simple_Shared_Locator is tagged; + type Simple_Shared_Locator_Access is access all Simple_Shared_Locator'Class; + +- type SAX_Simple_Reader is new Ada.Finalization.Limited_Controlled ++ type SAX_Simple_Reader is limited new Ada.Finalization.Limited_Controlled + and XML.SAX.Readers.SAX_Reader with + record + -- Handlers +--- source/xml/sax/xml-sax-input_sources-streams-sockets.ads 2011-07-22 22:16:17.999942000 +0200 ++++ source/xml/sax/xml-sax-input_sources-streams-sockets.ads 2015-05-02 16:54:10.442710474 +0200 +@@ -63,7 +63,7 @@ + + private + +- type Socket_Input_Source is new Stream_Input_Source with record ++ type Socket_Input_Source is limited new Stream_Input_Source with record + Socket : GNAT.Sockets.Socket_Type; + end record; + +--- testsuite/xml/sax_events_writers.ads 2013-10-28 12:46:59.843622000 +0100 ++++ testsuite/xml/sax_events_writers.ads 2015-05-02 18:26:33.838316036 +0200 +@@ -190,7 +190,7 @@ + private + + type SAX_Events_Writer is +- new Ada.Finalization.Limited_Controlled ++ limited new Ada.Finalization.Limited_Controlled + and XML.SAX.Content_Handlers.SAX_Content_Handler + and XML.SAX.DTD_Handlers.SAX_DTD_Handler + and XML.SAX.Entity_Resolvers.SAX_Entity_Resolver diff --git a/matreshka.spec b/matreshka.spec index 5c5787e..8597ac2 100644 --- a/matreshka.spec +++ b/matreshka.spec @@ -1,12 +1,13 @@ %define _gprdir %_GNAT_project_dir Name: matreshka Version: 0.6.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Set of Ada libraries to help to develop information systems Group: System Environment/Libraries License: BSD URL: http://forge.ada-ru.org/matreshka Source0: http://forge.ada-ru.org/matreshka/downloads/%{name}-%{version}.tar.gz +Patch1: matreshka-0.6.0-GCC5.patch BuildRequires: gcc-gnat BuildRequires: fedora-gnat-project-common >= 3 BuildRequires: chrpath @@ -330,6 +331,7 @@ Requires: fedora-gnat-project-common >= 2 %prep %setup -q +%patch1 %build make config %{?_smp_mflags} GPRBUILD_FLAGS="%Gnatmake_optflags" @@ -424,6 +426,9 @@ chrpath --delete %{buildroot}%{_libdir}/lib* %files amf-mofext-devel -f .objs/amf_mofext-devel.files %changelog +* Sat May 02 2015 Björn Persson <bjorn@rombobjörn.se> - 0.6.0-9 +- Patched to build with GCC 5. + * Wed Apr 29 2015 Peter Robinson <pbrobinson@xxxxxxxxxxxxxxxxx> 0.6.0-8 - rebuild (gcc / gnat 5) -- 2.1.0
From 9cbac4a86fdcba3bd86ae24b6a26dc4970f97d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Persson?= <Bjorn@Rombobjörn.se> Date: Sat, 2 May 2015 22:31:23 +0200 Subject: [PATCH 2/2] Disable testing with Valgrind for now. --- matreshka.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matreshka.spec b/matreshka.spec index 8597ac2..3372d9f 100644 --- a/matreshka.spec +++ b/matreshka.spec @@ -341,7 +341,9 @@ make %{?_smp_mflags} GPRBUILD_FLAGS="%Gnatmake_optflags" %check ## find libs without RPATH, Fedora specific export LD_LIBRARY_PATH="%{buildroot}/%{_libdir}/:$LD_LIBRARY_PATH" -make %{?_smp_mflags} GNAT_OPTFLAGS="%{GNAT_optflags}" check +make %{?_smp_mflags} GNAT_OPTFLAGS="%{GNAT_optflags}" check HAS_VALGRIND= +# Testing with Valgrind is disabled because of +# https://bugzilla.redhat.com/show_bug.cgi?id=1151793 ## Delete compiled python files rm -f %{buildroot}/%{_datadir}/gdb/python/matreshka/matreshka.py? -- 2.1.0
From a93f20bd8d19285875bebc3482b036d248e2a0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Persson?= <Bjorn@Rombobjörn.se> Date: Sat, 2 May 2015 13:28:25 +0200 Subject: [PATCH 1/2] Convey -m options. --- gprbuild-2014-m_options.patch | 11 +++++++++++ gprbuild.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gprbuild-2014-m_options.patch diff --git a/gprbuild-2014-m_options.patch b/gprbuild-2014-m_options.patch new file mode 100644 index 0000000..3b16116 --- /dev/null +++ b/gprbuild-2014-m_options.patch @@ -0,0 +1,11 @@ +--- src/gprbuild.adb 2014-04-17 11:50:17.000000000 +0200 ++++ src/gprbuild.adb 2015-05-02 10:13:53.460235623 +0200 +@@ -121,7 +121,7 @@ + Simple_Name : Boolean := False) + is + begin +- if Value'Length <= 2 ++ if not Opt.CodePeer_Mode or else Value'Length <= 2 + or else Value (Value'First .. Value'First + 1) /= "-m" + then + Add_Option_Internal (Value, To, Display, Simple_Name); diff --git a/gprbuild.spec b/gprbuild.spec index 787a3e8..a2ac4a9 100644 --- a/gprbuild.spec +++ b/gprbuild.spec @@ -1,6 +1,6 @@ Name: gprbuild Version: 2014 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Ada project builder Group: Development/Languages License: GPLv2+ @@ -14,6 +14,8 @@ Patch2: %{name}-%{version}-destdir.patch Patch3: %{name}-%{version}-usrmove.patch ## FIXME change RTL version not hardcore it Patch4: %{name}-%{version}-gcc5.patch +# Fix a bug that throws away GCC options that begin with "-m": +Patch5: gprbuild-2014-m_options.patch BuildRequires: xmlada-devel BuildRequires: gcc-gnat > 5.0 @@ -42,6 +44,7 @@ and libraries and is particularly well-suited for compiled languages. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 # Update the various config.guess to upstream release for new arch support cp /usr/lib/rpm/config.* . @@ -71,6 +74,9 @@ rm -rf %{buildroot}/%{_datadir}/doc/%{name} %_GNAT_project_dir/* %changelog +* Sat May 02 2015 Björn Persson <bjorn@rombobjörn.se> - 2014-5 +- Fixed a bug that threw away GCC options that begin with "-m". + * Sun Mar 29 2015 Pavel Zhukov <landgraf@xxxxxxxxxxxxxxxxx> - 2014-4 - New release (2014) - Fix library version -- 2.1.0
From 7375c6edaf8fe67aa9870830849b78cdf9d48444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Persson?= <Bjorn@Rombobjörn.se> Date: Sat, 2 May 2015 14:25:38 +0200 Subject: [PATCH 2/2] better libgnat version workaround --- gprbuild-2014-gcc5.patch | 53 ++++++++++++++++++++++++++++++++---------------- gprbuild.spec | 2 +- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/gprbuild-2014-gcc5.patch b/gprbuild-2014-gcc5.patch index 2ac08e6..a885840 100644 --- a/gprbuild-2014-gcc5.patch +++ b/gprbuild-2014-gcc5.patch @@ -1,19 +1,36 @@ -diff --git a/src/gprlib.adb b/src/gprlib.adb -index 3d81609..4f574db 100644 ---- a/src/gprlib.adb -+++ b/src/gprlib.adb -@@ -1185,12 +1185,12 @@ begin - new String' - ("-lgnat" & - Shared_Libgnat_Separator & -- Line (6 .. Last)); -+ "5"); - Libgnarl := - new String' - ("-lgnarl" & - Shared_Libgnat_Separator & -- Line (6 .. Last)); -+ "5"); - end if; +--- a/src/gprlib.adb 2014-04-17 11:50:17.000000000 +0200 ++++ b/src/gprlib.adb 2015-05-02 14:16:49.361501056 +0200 +@@ -25,6 +25,7 @@ + + with Ada.Command_Line; use Ada.Command_Line; + with Ada.Text_IO; use Ada.Text_IO; ++with Ada.Strings.Fixed; + + with ALI; + with Csets; +@@ -1170,6 +1171,25 @@ + GNAT_Version := new String'(Line (6 .. Last)); + GNAT_Version_Set := True; + ++ -- The version numbering scheme changed in GCC 5. ++ -- If there is a dot in the version, and the part before ++ -- the dot is 5 or greater, then use only that part in the ++ -- library names. ++ ++ declare ++ Pos : Natural := Ada.Strings.Fixed.Index (Line, ".", 6); ++ begin ++ if Pos > 0 then ++ Pos := Pos - 1; -- the last digit in the first part ++ if Natural'Value (Line(6 .. Pos)) >= 5 then ++ Last := Pos; ++ end if; ++ end if; ++ exception ++ when Constraint_Error => ++ null; -- Not a number? Then let it be. ++ end; ++ + -- On VMS, replace all '.' with '_', to avoid names with + -- several dots. - else diff --git a/gprbuild.spec b/gprbuild.spec index a2ac4a9..43f9253 100644 --- a/gprbuild.spec +++ b/gprbuild.spec @@ -12,7 +12,7 @@ Patch0: %{name}-%{version}-noopenvms.patch Patch1: %{name}-%{version}-iterator_variable.patch Patch2: %{name}-%{version}-destdir.patch Patch3: %{name}-%{version}-usrmove.patch -## FIXME change RTL version not hardcore it +# Adapt to the changed version numbering scheme in GCC 5: Patch4: %{name}-%{version}-gcc5.patch # Fix a bug that throws away GCC options that begin with "-m": Patch5: gprbuild-2014-m_options.patch -- 2.1.0
Attachment:
pgpinoH7YRIDu.pgp
Description: OpenPGP digital signatur
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct