This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 5017
  Compilation errors with gcc-4.3 snapshot Last modified: 2008-01-24 16:52:14
     Query page      Enter new bug
Bug#: 5017   Hardware:   Reporter: Eugeniy Meshcheryakov <eugen@debian.org>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: Unassigned <systemtap@sources.redhat.com>   Target Milestone:  
Summary:
Keywords:

Attachment Description Type Created Actions
26-more-gcc-4.3-fixes.diff patch for missing #include patch 2007-09-10 20:29 Edit | Diff
23-gcc-4.3-workaround workaround for gcc 4.3 build failure patch 2007-12-17 23:45 Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 5017 depends on: Show dependency tree
Show dependency graph
Bug 5017 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2007-09-10 20:28
There are two errors when compiling systemtap with gcc-4.3 snapshot:

staptree.cxx: In static member function 'static bool
print_format::parse_print(const std::string&, bool&, bool&, bool&, bool&
)':
staptree.cxx:356: error: 'strncmp' was not declared in this scope

In file included from main.cxx:12:
staptree.h:871: error: explicit template specialization cannot have a storage class

First one is just missing #include <cstring>.
Second one is harder to fix, it is related to this change in gcc:
http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01075.html . It can be fixed by
removing second "static" in this code:
template <typename T> static void
require (deep_copy_visitor* v, T* dst, T src)
...
template <> static void
require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src)

Unfortunately current gcc has bug that makes require<indexable *>() extern, so
compilation fails.

------- Additional Comment #1 From Eugeniy Meshcheryakov 2007-09-10 20:29 -------
Created an attachment (id=1996)
patch for missing #include

------- Additional Comment #2 From Frank Ch. Eigler 2007-12-11 13:45 -------
patch committed

------- Additional Comment #3 From Eugeniy Meshcheryakov 2007-12-17 23:44 -------
Applied patch does not fix build failure with gcc 4.3 related to templates. It
is "static" in definition for require<indexable *>() that should be removed, not
require<T>().

------- Additional Comment #4 From Eugeniy Meshcheryakov 2007-12-17 23:45 -------
Created an attachment (id=2147)
workaround for gcc 4.3 build failure

This is workaround that works for both gcc 4.2 and gcc 4.3. Suggested here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455663#24

------- Additional Comment #5 From Eugeniy Meshcheryakov 2008-01-17 17:51 -------
*** Bug 5631 has been marked as a duplicate of this bug. ***

------- Additional Comment #6 From Dave Brolley 2008-01-24 16:52 -------
I've committed these patches.

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In