Skip to content

Conversation

@EthanSteinberg
Copy link
Collaborator

Description

The current way we are doing unit tests with Eigen unintentionally triggers ODR violations due to testing both with and without std::array.

This fixes those ODR violations by updating our build scripts.

@EthanSteinberg EthanSteinberg changed the title Fix ODR violations in our Eigen Tensor Tests Fix ODR violations in our Eigen Tensor tests Dec 17, 2022
@EthanSteinberg EthanSteinberg marked this pull request as draft December 17, 2022 13:58
@EthanSteinberg
Copy link
Collaborator Author

Hi @rwgk, can you take a look at this PR? I think this fixes the ODR issue in our tests.

At least, based on https://github.com/pybind/pybind11/actions/runs/3720383627/jobs/6309827070

@EthanSteinberg EthanSteinberg marked this pull request as ready for review December 17, 2022 14:23
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm traveling and have only very unreliable internet at the moment, therefore I couldn't try things out myself. I'll look more as soon as I can.

Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for the tweaks! With that I just had to add one line in my SConscript to adjust to this PR.

@rwgk rwgk merged commit ee4b9f5 into pybind:master Dec 20, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Dec 20, 2022
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label Dec 20, 2022
@EthanSteinberg EthanSteinberg deleted the fix_eigen_test_odr_violations branch December 20, 2022 13:34
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.

3 participants