[Bug server/26839] New: Systemtap build failures with clang

tbaeder at redhat dot com sourceware-bugzilla@sourceware.org
Wed Nov 4 08:27:02 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=26839

            Bug ID: 26839
           Summary: Systemtap build failures with clang
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: server
          Assignee: systemtap at sourceware dot org
          Reporter: tbaeder at redhat dot com
  Target Milestone: ---

systemtap currently fails to build with clang.

$ clang --version
clang version 10.0.1 (Fedora 10.0.1-3.fc32)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin



The output is (I tried deduplicating):

./elaborate.h:47:1: error: 'symresolution_info' defined as a struct here but
previously declared as a class; this is valid, but may result in linker errors
under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct symresolution_info: public traversing_visitor
^
./session.h:126:1: note: did you mean struct here?
class symresolution_info;
^~~~~
struct


./elaborate.h:206:16: error: 'derived_probe::printsig' hides overloaded virtual
function [-Werror,-Woverloaded-virtual]
  virtual void printsig (std::ostream &o, bool nest=true) const;
               ^
./staptree.h:913:16: note: hidden overloaded virtual function 'probe::printsig'
declared here: different number of parameters (1 vs 2)
  virtual void printsig (std::ostream &o) const;
               ^
2 errors generated.


./dwflpp.h:185:1: error: struct 'location_context' was previously declared as a
class; this is valid, but may result in linker errors under the Microsoft C++
ABI [-Werror,-Wmismatched-tags]
struct location_context;
^
./loc2stap.h:45:7: note: previous use is here
class location_context
      ^
./dwflpp.h:185:1: note: did you mean class here?
struct location_context;
^~~~~~
class


./dwflpp.h:187:1: error: 'dwflpp' defined as a struct here but previously
declared as a class; this is valid, but may result in linker errors under the
Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct dwflpp
^
./loc2stap.h:44:1: note: did you mean struct here?
class dwflpp;
^~~~~
struct


translate.cxx:303:8: error: 'emit_function' overrides a member function but is
not marked 'override' [-Werror,-Winconsistent-missing-override]
  void emit_function (functiondecl* fd);
       ^
translate.cxx:155:8: note: overridden virtual function is here
  void emit_function (functiondecl* v);
       ^
translate.cxx:304:8: error: 'emit_probe' overrides a member function but is not
marked 'override' [-Werror,-Winconsistent-missing-override]
  void emit_probe (derived_probe* dp);
       ^
translate.cxx:161:8: note: overridden virtual function is here
  void emit_probe (derived_probe* v);
       ^


util.cxx:1545:28: error: taking the absolute value of unsigned type 'unsigned
long' has no effect [-Werror,-Wabsolute-value]
      unsigned min_score = labs(target.size() - it->size());
                           ^
util.cxx:1545:28: note: remove the call to 'labs' since unsigned values cannot
be negative
      unsigned min_score = labs(target.size() - it->size());
                           ^~~~



Fixing the class/struct mixups is easy and shouldn't cause any problems.
I'm not so sure about the others though. How do you handle the missing override
or the hidden overloaded virtual function in this codebase? I can work on this
if it's easier for you.


Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Systemtap mailing list