Project

General

Profile

Bug #16070

problem building artdaq-core v1_07_xx

Added by Lynn Garren over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Known Issues
Target version:
Start date:
04/04/2017
Due date:
% Done:

0%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

There was a problem building v1_07_02 on Ubuntu. The build failed with mentions of assert. We believe that the reason the problem only occurs on Ubuntu is because of some difference in system headers. The problem was found to have two causes.

First, the tests still contained #ifdef HAVE_CANVAS clauses. But since v1_07_xx requires canvas, this flag is no longer defined. Commit core|f48891b939335c55a5b0f39d996dd4fb927fb724 on source:core|@v1_07_branch resolves this problem.

Second, a header was included inside a namespace declaration. This is not recommended practice. Since that header also contained an include of the cassert header, this caused confusion. Commit core|225f0e4c3b95d563415afd16e0f1ad3e71fd5c8c on source:core|@v1_07_branch resolves this problem with minimal changes to the code. We hope you will find this fix acceptable.

diff --git a/artdaq-core/Data/Fragment.hh b/artdaq-core/Data/Fragment.hh
index 4beec81..2a29b71 100644
--- a/artdaq-core/Data/Fragment.hh
+++ b/artdaq-core/Data/Fragment.hh
@@ -15,9 +15,9 @@

 #include "artdaq-core/Data/detail/RawFragmentHeader.hh" 
 #include "artdaq-core/Data/dictionarycontrol.hh" 
+# include "QuickVec.hh" 

 namespace artdaq {
-# include "QuickVec.hh" 
 # define DATAVEC_T QuickVec<RawDataType>
 //#define DATAVEC_T std::vector<RawDataType>
        typedef detail::RawFragmentHeader::RawDataType RawDataType;
diff --git a/artdaq-core/Data/QuickVec.hh b/artdaq-core/Data/QuickVec.hh
index bc9e67b..42e9f3b 100644
--- a/artdaq-core/Data/QuickVec.hh
+++ b/artdaq-core/Data/QuickVec.hh
@@ -56,6 +56,8 @@ static inline void *QV_MEMALIGN(size_t boundary, size_t size) { void *retadr; po
 # define QUICKVEC_VERSION  static short Class_Version() { return 5; } // proper version for templat
 #endif

+namespace artdaq {
+ 
 QUICKVEC_TEMPLATE
 struct QuickVec
 {
@@ -354,6 +356,8 @@ inline void QUICKVEC::push_back(const value_type& val)
        ++size_;
 }

+} // namespace
+
 #ifdef UNDEF_TRACE_AT_END
 # undef TRACE
 #endif

History

#1 Updated by Lynn Garren over 3 years ago

  • Subject changed from problem building v1_07_xx to problem building artdaq-core v1_07_xx

#2 Updated by Christopher Green over 3 years ago

  • Description updated (diff)

[ Fixed links to commits and branches in description. ]

#3 Updated by Eric Flumerfelt over 3 years ago

  • Category set to Known Issues
  • Status changed from New to Resolved
  • Assignee set to Lynn Garren
  • Target version set to artdaq Next Release

I have merged changes into both develop and master, and deleted the v1_07_branch.

#4 Updated by Eric Flumerfelt over 3 years ago

  • Status changed from Resolved to Closed
  • Target version changed from artdaq Next Release to artdaq-core v1_07_04


Also available in: Atom PDF