Project

General

Profile

Bug #7153

artdaq-core compile errors on Mavericks

Added by Christopher Green about 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/13/2014
Due date:
% Done:

0%

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

Description

The following errors were obtained attempting to compile the current head of the develop branch for artdaq-core in debug mode with qualifiers e6:s5. The package was first compiled with buildtool -j 32 -cfl -- -i to compile that which could be compiled, and then make -i to capture the errors for the failing compile units:

[greenc@mac-120590] ~/work/cet-is/build/artdaq-core-debug (ups) $ make -i 
[ 10%] Built target artdaq-core_Data
[ 15%] Built target Fragment_t
[ 21%] Built target RawEvent_t
[ 26%] Built target artdaq-core_Generators
[ 31%] Built target FragmentGenerator_t
[ 36%] Building CXX object artdaq-core/Utilities/CMakeFiles/artdaq-core_Utilities.dir/TimeUtils.cc.o
/Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Utilities/TimeUtils.cc: In function ‘std::string artdaq::TimeUtils::convertUnixTimeToString(const timeval&)’:
/Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Utilities/TimeUtils.cc:32:61: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘__darwin_suseconds_t {aka int}’ [-Werror=format=]
     sprintf(fractionalString, "%06ld", inputUnixTime.tv_usec);
                                                             ^
/Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Utilities/TimeUtils.cc:32:61: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘__darwin_suseconds_t {aka int}’ [-Werror=format=]
cc1plus: all warnings being treated as errors
Linking CXX shared library ../../lib/libartdaq-core_Utilities.dylib
g++: error: CMakeFiles/artdaq-core_Utilities.dir/TimeUtils.cc.o: No such file or directory
[ 42%] Built target artdaq-core_Utilities
[ 47%] Building CXX object artdaq-core/Data/CMakeFiles/artdaq-core_Data_dict.dir/artdaq-core_Data_dict.cpp.o
/Users/greenc/work/cet-is/build/artdaq-core-debug/artdaq-core/Data/artdaq-core_Data_dict.cpp: In function ‘void {anonymous}::read___artdaq__Fragment_0(char*, TVirtualObject*)’:
/Users/greenc/work/cet-is/build/artdaq-core-debug/artdaq-core/Data/artdaq-core_Data_dict.cpp:413:12: error: no match for ‘operator=’ (operand types are ‘artdaq::QuickVec<long long unsigned int>’ and ‘std::vector<long unsigned int>’)
      vals_ = onfile.vals_; 
            ^
/Users/greenc/work/cet-is/build/artdaq-core-debug/artdaq-core/Data/artdaq-core_Data_dict.cpp:413:12: note: candidates are:
In file included from /Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Data/Fragment.hh:18:0,
                 from /Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Data/classes.h:1,
                 from /Users/greenc/work/cet-is/build/artdaq-core-debug/artdaq-core/Data/artdaq-core_Data_dict.cpp:29:
/Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Data/QuickVec.hh:82:16: note: artdaq::QuickVec<TT_>& artdaq::QuickVec<TT_>::operator=(const artdaq::QuickVec<TT_>&) [with TT_ = long long unsigned int]
     QUICKVEC & operator=( const QuickVec & other ) //= delete; // non copyable
                ^
/Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Data/QuickVec.hh:82:16: note:   no known conversion for argument 1 from ‘std::vector<long unsigned int>’ to ‘const artdaq::QuickVec<long long unsigned int>&’
/Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Data/QuickVec.hh:98:16: note: artdaq::QuickVec<TT_>& artdaq::QuickVec<TT_>::operator=(artdaq::QuickVec<TT_>&&) [with TT_ = long long unsigned int]
     QUICKVEC & operator=( QuickVec && other ) // assign movable
                ^
/Users/greenc/work/cet-is/sources/artdaq-core/artdaq-core/Data/QuickVec.hh:98:16: note:   no known conversion for argument 1 from ‘std::vector<long unsigned int>’ to ‘artdaq::QuickVec<long long unsigned int>&&’
<snip link errors caused by preceding compile errors>
Note that the format error can be resolved either with conditional compilation or by using ostringstream instead of sprintf(). The cause of the QuickVec-related errors is less obvious.

artdaq-core-diff.txt (1.8 KB) artdaq-core-diff.txt Diff with proposed patch. Christopher Green, 10/13/2014 06:57 PM

History

#1 Updated by Christopher Green about 5 years ago

  • Description updated (diff)

#2 Updated by Christopher Green about 5 years ago

My initial thoughts about the NOT_OLD_CXXSTD macro were wrong. It now looks like a straight failure to understand the line from the ioread rule, vals_ = onfile.vals_;, where vals_ is of type artdaq::QuickVec<long long unsigned int> and onfile.vals_ is of type std::vector<long unsigned int>. Note the "long long" in the first argument is not a typo. You're going to have to look at some .i files, viz:

[greenc@mac-120590] ~/work/cet-is/build/artdaq-core-debug/artdaq-core/Data (ups) $ make artdaq-core_Data_dict.i 2>&1 | less
Preprocessing CXX source to CMakeFiles/artdaq-core_Data_dict.dir/artdaq-core_Data_dict.cpp.i
I would suggest pulling Philippe into this one.

#3 Updated by Christopher Green about 5 years ago

See attached patch. Note that version 12 is probably a dead end, backward-compatibility-wise, at least as far as reading on Darwin goes. Is this version out in the wild?

#4 Updated by Kurt Biery about 5 years ago

  • Status changed from New to Resolved
  • Target version set to v1_12_04

The RawDataType and other uint_64t variables and typedefs were changed to "unsigned long long" to get this to work. (See commit https://cdcvs.fnal.gov/redmine/projects/artdaq-core/repository/revisions/3fe5c7368978847ad8c4c002d89e3f29eae7431a in artdaq-core.)

#5 Updated by Christopher Green about 5 years ago

Has the TimeUtils.cc problem also been resolved?

#6 Updated by Kurt Biery about 5 years ago

Thanks for the reminder, Chris. After your question, I modified TimeUtils.cc so that it should now compile both on Linux and MacOS.

#7 Updated by Kurt Biery about 4 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF