-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CMake prefers installed headers over source #83
Comments
I've seen this as well on OSX, and had started looking into it briefly a On Mon, Oct 17, 2016 at 5:37 PM, Jeremy Cowles notifications@github.com
|
Filed as internal issue #138796. |
Further to @asluk's point, I think that transitive header-only dependencies might not be detected in the current scheme. i.e. Foo->Bar->Baz where Foo only needs a header from Baz, might not trigger Baz to publish it's headers if Bar is otherwise up to date. |
I also just ran into this (OSX) where I had an old USD installation, then updated the source to 0.7.2 and tried to build again. I had the same issue with OIIO a few months back, and logged it (and the fix in that case) here: AcademySoftwareFoundation/OpenImageIO#1522 |
darn it ... just got bitten by this again. |
The BEFORE keyword looks like it might help here too, as you suggest. |
Possibly related to this - I keep getting the system boost libraries instead of the locally built ones when the various pxr_test builds are happening. There's a lot of internal logic in there sorting internal and external libraries and I think it's also preferring system installed ones over the locally built ones. |
also related #419 |
Just wanted to note I've run into this in the past but it was in the middle of some other work and I neglected to write down the exact steps to reproduce it consistently. I'm guessing this issue is still present; if it is, I'd love to fix it, so if anyone has a good set of repro steps please let me know -- thanks! |
On OSX at least..... This fails (on the second build):
This still works:
|
Yeah @robpieke I had a similar repro when I ran into it (mine was in |
Thanks @robpieke and @superfunc, I can reproduce the build failures using those steps. When I follow those steps, my build fails when linking the sdfdump executable -- can you confirm whether you see the same failure mode? This particular problem is due to include directory ordering, and I think I have a pretty straightforward fix for this. However, it looks like this is only an issue when building the executables via pxr_build_test; building libraries doesn't seem to have this problem. So, I'm not sure this is the same issue that was originally posted about. |
Hey @sunyab ... yes I can confirm a fail on linking sdfdump given the above. Why do you think this is different than the original report? The specific place/symbol/class where it fails might be different than where @jcowles or I saw it previously, but I suspect the cause (installed header preference) is the same. I'm still hoping something similar to what was done for OIIO (AcademySoftwareFoundation/OpenImageIO#1522) will work here. |
Mine dies in sdfdump as well. I think on older releases, I saw it die earlier, due to a fundamental change in some headers, but I honestly can't remember the specifics. |
@robpieke, I'm mostly guessing. The fix I currently have only affects building executables, and I swear the time I ran into this problem it happened when I was building a library. And yes, my I think my fix is essentially the same as the OIIO issue you posted -- it just switches the include directory ordering around. In any case, I'm hoping to land my fix soon and see where we are then. |
System Information (OS, Hardware, etc.)
Windows
Steps to Reproduce
Deleting the installed pxr headers fixed the build, so presumably it's preferring the installed headers over the source headers.
It seems like CMake should be configured to prefer the source headers over any headers that can be found on the users PATH.
The text was updated successfully, but these errors were encountered: