Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[sdf] Fix for PXR_STRICT_BUILD_MODE with wrap of SdfLayer::Traverse #1074

Conversation

pmolodo
Copy link
Contributor

@pmolodo pmolodo commented Jan 2, 2020

Description of Change(s)

This fixes a build issue introduced by:

[sdf] wrap SdfLayer::Traverse.
2357a7b

...when building with PXR_STRICT_BUILD_MODE + gcc 6 + boost 1.61.

The fix is the same applied by:

Locally disable placement-new warnings in later versions of gcc.
898b8c1

Note - this was fixed in boost 1.62:

boostorg/function#9

Since this placement-new problem is only a problem on specific versions of boost, I wonder if we should add a boost-version check to the places where ARCH_PRAGMA_PLACEMENT_NEW is used?

Alternatively, since vfxplatform-CY2019 is already advocating 1.66 (where this is not an issue), I wonder if it might be better to provide a more "general" solution, by doing a check at the CMAKE level... and if PXR_STRICT_BUILD_MODE is used, and we're using gcc 6+, AND we're using boost<1.62, we simply add a "-Wno-placement-new".

Fixes Issue(s)

  • Building with PXR_STRICT_BUILD_MODE + gcc-6 + boost-1.61

This fixes a build issue introduced by:

[sdf] wrap SdfLayer::Traverse.
2357a7b

...when building with PXR_STRICT_BUILD_MODE + gcc 6 + boost 1.61.

The fix is the same applied by:

Locally disable placement-new warnings in later versions of gcc.
898b8c1
@jilliene
Copy link

jilliene commented Jan 6, 2020

Filed as internal issue #USD-5776

@c64kernal
Copy link
Contributor

Hey @elrond79 -- thanks for the fix! We discussed this a bit and we like your suggestion of just checking for gcc 6+ && boost<1.62 to always add the -Wno-placement-new". That way we have a centralized place to remove the change once we update our minimum required version of boost. Does that sound good? Thanks again!

@c64kernal c64kernal added the blocked Issue fix or pull request blocked until questions are answered or pending notes are addressed label Jan 7, 2020
pmolodo pushed a commit to LumaPictures/USD that referenced this pull request Jan 9, 2020
This is an alternative solution to the same problem addressed:

Locally disable placement-new warnings in later versions of gcc.
898b8c1

After discussion
  (PixarAnimationStudios#1074),
we decided that the best solution would be to globally disable
this for the affected combo of gcc + boost versions, since newer
versions of boost are not affected.
@pmolodo
Copy link
Contributor Author

pmolodo commented Jan 9, 2020

Agreed - I like that solution better too. Closing this in favor of:

#1081

@pmolodo pmolodo closed this Jan 9, 2020
@c64kernal
Copy link
Contributor

Thanks so much @elrond79, we'll have a look at #1081 as soon as we can!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
blocked Issue fix or pull request blocked until questions are answered or pending notes are addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants