Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix a build issue on Linux with maya<2020 #1013

Merged

Conversation

pmolodo
Copy link
Contributor

@pmolodo pmolodo commented Dec 17, 2020

On maya<=2019, maya ends up including Xlib.h, which does

#define Bool int

...which messes with SdfValueTypeNames->Bool. So on Linux with Maya<2020,
this just does an #undef Bool.

This may only be an issue on specific Linux distributions, since it's tied
to the system supplied GL/glx.h and Xlib.h headers.

On maya<=2019, maya ends up including Xlib.h, which does

```
#define Bool int
```

...which messes with SdfValueTypeNames->Bool. So on Linux with Maya<2020,
this just does an `#undef Bool`.

This may only be an issue on specific Linux distributions, since it's tied
to the system supplied GL/glx.h and Xlib.h headers.
@mattyjams
Copy link
Contributor

Ugh, yeah, we tripped over that as well and ended up littering a bunch of code with early #includes of sdf/types.h.

The awful details are described here:

// XXX: With Maya versions up through 2019 on Linux, M3dView.h ends up

But I notice the include of sdf/types.h is not there. Maybe the #include became disassociated from that comment block as a result of clang-format? We don't build for Maya 2019 anymore, so we haven't noticed it.

@kxl-adsk kxl-adsk added the build Related to building maya-usd repository label Dec 17, 2020
@kxl-adsk kxl-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Dec 17, 2020
@kxl-adsk kxl-adsk merged commit 1c51229 into Autodesk:dev Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to building maya-usd repository ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants