Skip to content

Conversation

@kkauder
Copy link
Collaborator

@kkauder kkauder commented Feb 10, 2025

Briefly, what does this PR introduce?

Added an explicit template instantiation that otherwise can get optimized away and lead to a linker error in gcc.

Turning on -O2 (e.g. implicitly with -DCMAKE_BUILD_TYPE=RelWithDebInfo) on gcc14 leads to

bin/ld: libeicsmear.so: undefined reference to `erhic::EventFromAsciiFactory<erhic::EventHepMC>::FinishEvent()'

A similar bug was caught by Chris P. in BNLNPPS/nopayloadclient#12, and I extrapolated a fix for this issue.

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No

Does this PR change default behavior?

No

@kkauder kkauder merged commit 15e8b65 into master Feb 10, 2025
@kkauder kkauder deleted the gccO2fix branch February 10, 2025 21:36
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.

2 participants