Skip to content

C++14#10

Draft
omar-moreno wants to merge 17 commits intomasterfrom
c++14
Draft

C++14#10
omar-moreno wants to merge 17 commits intomasterfrom
c++14

Conversation

@omar-moreno
Copy link
Collaborator

BEGINRELEASENOTES
Push updates that make hps-lcio c++17 compatible.

ENDRELEASENOTES

@omar-moreno omar-moreno marked this pull request as draft November 22, 2022 23:03
@mholtrop
Copy link
Collaborator

Notes:

All versions:

There are a ton of warnings when compiling this code... Always has been an issue with LCIO as long as I can remember.

clang 13 - compiles on MacOS

gcc 11 - MacOS - cmake error on MacOS for cmake 3.x (tried 3.25, 3.23, 3.21)

Weird error when running cmake, claiming -std=c++11 is an invalid option, which it isn't. This is something somewhere inside the overly complicate CMakeLists.txt includes that checks the options on the compiler incorrectly.
Error:
CMake Error at cmake/ilcsoft_default_cxx_flags.cmake:41 (MESSAGE):
Cannot add -std=c++11 to CMAKE_CXX_FLAGS, but c++11 was requested, check
your compiler
Call Stack (most recent call first):
cmake/ilcsoft_default_settings.cmake:23 (INCLUDE)
CMakeLists.txt:28 (INCLUDE)

gcc 4.8.5 - does not compile

Does not build on Centos7 with default compiler gcc 4.8.5. This is not an issue, since we are more on. However, this code is compiling with -std=c++11, so perhaps it should compile if there are no c++14 features used?
Error:
/net/data/endeavour1/HPS/hps-lcio/src/cpp/src/SIO/SIOSimTrackHitHandler.cc: In member function ‘virtual unsigned int SIO::SIOSimTrackHitHandler::read(SIO_stream*, EVENT::LCObject**)’:
/net/data/endeavour1/HPS/hps-lcio/src/cpp/src/SIO/SIOSimTrackHitHandler.cc:27:37: error: cannot allocate an object of abstract type ‘IOIMPL::SimTrackerHitIOImpl’
SimTrackerHitIOImpl* hit = new SimTrackerHitIOImpl ;

gcc 6.1.0, 9.2.0, 9.3.0 - Linux - does not compile

Does not build on Centos7 with default compiler gcc 6.1.0, 9.2.0 or 9.3.0
Error:
/net/data/endeavour1/HPS/hps-lcio/src/cpp/src/SIO/SIOSimTrackHitHandler.cc: In member function ‘virtual unsigned int SIO::SIOSimTrackHitHandler::read(SIO_stream*, EVENT::LCObject**)’:
/net/data/endeavour1/HPS/hps-lcio/src/cpp/src/SIO/SIOSimTrackHitHandler.cc:27:37: error: invalid new-expression of abstract class type ‘IOIMPL::SimTrackerHitIOImpl’
27 | SimTrackerHitIOImpl* hit = new SimTrackerHitIOImpl ;
| ^~~~~~~~~~~~~~~~~~~

@omar-moreno
Copy link
Collaborator Author

@mholtrop Thanks for the notes. This isn't compiling yet because I haven't fix all the issues. I'll let you know when it's ready to compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants