SixTrack / sixtracklib

Library for single charged particle simulations in accelerators
GNU Lesser General Public License v2.1
12 stars 16 forks source link

Inconsistent type definitions for gcc/g++ on Mac OS X #133

Open martinschwinzerl opened 3 years ago

martinschwinzerl commented 3 years ago

Compiling sixtracklib on Mac OS X 10.15 Catalina using gcc/g++ 10.2, some types appear to be inconsistent. Specifically, the sixtracklib/common/internal/track_job_base.cpp ends up with the TrackJob's size_type being unsigned long while in the header sixtracklib/common/internal/track_job_base.h, the size_type is an alias for unsigned long long

This results in error messages like the following:

[ 52%] Building CXX object sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job_base.cpp.o
/Users/user926596/git/sixtracklib/sixtracklib/common/internal/track_job_base.cpp:59:25: error: conflicting declaration 'constexpr const st_size_t sixtrack::TrackJobBase::ILLEGAL_BUFFER_ID'
   59 |     constexpr st_size_t tjob_t::ILLEGAL_BUFFER_ID;
      |                         ^~~~~~
In file included from /Users/user926596/git/sixtracklib/sixtracklib/common/internal/track_job_base.cpp:1:
/Users/user926596/git/sixtracklib/sixtracklib/common/internal/track_job_base.h:67:36: note: previous declaration as 'constexpr const size_type sixtrack::TrackJobBase::ILLEGAL_BUFFER_ID'
   67 |         static constexpr size_type ILLEGAL_BUFFER_ID =

TODO:

Thanks to @fsoubelet for reporting this issue!