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

Add support for building for Windows ARM64 devices #3430

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

anthony-linaro
Copy link

@anthony-linaro anthony-linaro commented Nov 19, 2024

Description of Change(s)

Add support for Windows ARM64 devices.

This was tested using the following command line:

python build_scripts/build_usd.py --no-python --onetbb --tests --no-imaging C:/WoA/OpenUSD/build_dir

Python is currently switched off due to lack of support for PySide on these devices. I am looking at that seperately.

I also had to disable imaging, as building boost appears to be broken when using newer CMake versions (similar issue to #3285)

TBB is set to OneTBB, as 2020u3 doesn't support these devices.

I also had to make a small modification in testWrapper.py, and change line 134 to pathPattern = pathPattern + r'(\S*)', as otherwise the escape sequence was invalid.

Checklist

[x] I have created this PR based on the dev branch

[x] I have followed the coding conventions

[ ] I have added unit tests that exercise this functionality (Reference:
testing guidelines)

[x] I have verified that all unit tests pass with the proposed changes

[x] I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10450

❗ Please make sure that a signed CLA has been submitted!

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@asluk asluk added the build Build-related issue/PR label Nov 20, 2024
@anthony-linaro
Copy link
Author

CLA sorted - approved by Tim Palmer

@pmolodo
Copy link
Contributor

pmolodo commented Nov 25, 2024

Any reason why the testWrapper.py change you mentioned isn't included here? Otherwise, lgtm

@anthony-linaro
Copy link
Author

I figured it was more related to the version of python I have installed (3.12.5), rather than the one used for validation on other devices - as I didn't have those devices/versions to hand, and knew the script already worked as-was on them, I opted not to change it

@@ -393,7 +393,10 @@ def RunCMake(context, force, extraArgs = None):

# Note - don't want to add -A (architecture flag) if generator is, ie, Ninja
if IsVisualStudio2019OrGreater() and "Visual Studio" in generator:
generator = generator + " -A x64"
if "ARM" in os.environ.get('PROCESSOR_IDENTIFIER'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could the platform module be used here?
https://docs.python.org/3/library/platform.html#module-platform

Copy link
Author

@anthony-linaro anthony-linaro Dec 10, 2024

Choose a reason for hiding this comment

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

(repost from correct account)

It could be, but problems arise when running an emulated x64 version of python (which is easy to do by mistake, as that's what the website gives you by default).

This way checks the name of the processor directly, which is not affected by emulation.

@asluk asluk added the needs review Issue needing input/review by the repo maintainer (Pixar) label Dec 3, 2024
@asluk
Copy link
Collaborator

asluk commented Dec 19, 2024

"Python is currently switched off due to lack of support for PySide on these devices. I am looking at that seperately."

Hi @anthony-linaro , per our call yesterday, you also mentioned that the python bindings are failing to compile -- can you post the error messages you are seeing there?

"I also had to disable imaging, as building boost appears to be broken... "

@sunyab , is it expected that the command line

python build_scripts/build_usd.py --no-python --onetbb --tests C:/WoA/OpenUSD/build_dir

would attempt to build boost in v24.11+ ?

Thanks all!

@anthony-linaro
Copy link
Author

Hi @asluk - I have tried to reproduce the compilation errors, but am unable, so will chalk it down to an env issue - with things set up properly, I have most of the tests passing.

However, when I run ctest, I get this:

The following tests FAILED:
          2 - python_properties (Failed)
         47 - python_pickle1 (Failed)
         50 - python_pickle4 (Failed)
        225 - testPlug (Failed)
        666 - testUsdUtilsCreateNewUsdzPackageEditInPlace (Failed)
        708 - testUsdChecker1 (Failed)
        709 - testUsdChecker2 (Failed)
        710 - testUsdChecker3 (Failed)
        711 - testUsdChecker4 (Failed)
        712 - testUsdChecker5 (Failed)
        720 - testUsdChecker13 (Failed)
        778 - testUsdResolverExample (Failed)

I have attached the output file from the tests to this comment. Are these tests expected to fail? If not, do you have any idea why they might be? All env paths are set as instructed after build (bin and lib on path, python on pythonpath)

LastTest.log

@asluk
Copy link
Collaborator

asluk commented Jan 8, 2025

@anthony-linaro I don't think those test failures are expected -- can you try rebasing your branch to be on top of the "dev" branch? That is the most up to date commit. Thanks and happy new year!

@sunyab
Copy link
Contributor

sunyab commented Jan 8, 2025

@sunyab , is it expected that the command line

python build_scripts/build_usd.py --no-python --onetbb --tests C:/WoA/OpenUSD/build_dir

would attempt to build boost in v24.11+ ?

(sorry for the late reply, was out on vacation)

Yes, I would expect that to build boost in v24.11+. When imaging is enabled the --tests option requires the idiff tool from OpenImageIO for image diffs, and the version of OIIO the build script uses still requires boost.

@sunyab
Copy link
Contributor

sunyab commented Jan 8, 2025

However, when I run ctest, I get this:

The following tests FAILED:
          2 - python_properties (Failed)
         47 - python_pickle1 (Failed)
         50 - python_pickle4 (Failed)
        225 - testPlug (Failed)
        666 - testUsdUtilsCreateNewUsdzPackageEditInPlace (Failed)
        708 - testUsdChecker1 (Failed)
        709 - testUsdChecker2 (Failed)
        710 - testUsdChecker3 (Failed)
        711 - testUsdChecker4 (Failed)
        712 - testUsdChecker5 (Failed)
        720 - testUsdChecker13 (Failed)
        778 - testUsdResolverExample (Failed)

Hi @anthony-linaro, the python_* test failures are due to #3384, which is fixed in the dev branch. The other failures don't look familiar to me, so I'm not sure what's going on there.

@anthony-linaro
Copy link
Author

anthony-linaro commented Jan 8, 2025

Hi both, thanks for the responses!

@sunyab You're right, those python issues are now fixed, thanks to the suggestion from @asluk to merge dev.

Sadly, the list of errors has now changed, and I now get this:

The following tests FAILED:
        225 - testPlug (Failed)
        656 - testUsdUtilsCreateNewUsdzPackageEditInPlace (Failed)
        764 - testUsdChecker1 (Failed)
        765 - testUsdChecker2 (Failed)
        766 - testUsdChecker3 (Failed)
        767 - testUsdChecker4 (Failed)
        768 - testUsdChecker5 (Failed)
        776 - testUsdChecker13 (Failed)
        777 - testUsdChecker14 (Failed)
        778 - testUsdChecker15 (Failed)
        779 - testUsdChecker16 (Failed)
        780 - testUsdChecker17 (Failed)
        781 - testUsdChecker18 (Failed)
        788 - testUsdChecker26 (Failed)
        789 - testUsdChecker27 (Failed)
        799 - testUsdChecker37 (Failed)
        802 - testUsdResolverExample (Failed)

I have once again attached the logs: LastTest.log

Any suggestions of where I could start to look? It looks like it's not seeing the "Tf" python module. The path variable is correct, and added as specified when building (ie, modified PATH and PYTHONPATH) - is there another one that got missed somewhere? Was there an extra step required between build_usd.py and ctest for python to be able to see the module?

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -393,7 +393,10 @@ def RunCMake(context, force, extraArgs = None):

# Note - don't want to add -A (architecture flag) if generator is, ie, Ninja
if IsVisualStudio2019OrGreater() and "Visual Studio" in generator:
generator = generator + " -A x64"
if "ARM" in os.environ.get('PROCESSOR_IDENTIFIER'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be good to follow the convention in apple_utils.py and extract this into GetHostArch https://github.com/PixarAnimationStudios/OpenUSD/blob/release/build_scripts/apple_utils.py#L66

Copy link
Author

Choose a reason for hiding this comment

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

Is the suggestion here to write a whole new windows_utils.py (and extract/refactor some things like IsVisualStudioXXXXOrGreater() which are windows only), or just add a function to build_usd.py called something along the lines of GetWindowsHostArch()?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure I'd advocate for another file necessarily (though it is the route I would take myself)

But just extracting the heuristics for detecting arm into a function somewhere in this file itself should be fine?

I just imagine that in the future, we'll need to modify the build parameters for certain dependencies etc based on the current arch, and so it'd be nice to have it as a function from the get go.

Copy link
Author

Choose a reason for hiding this comment

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

I have now moved it out to a seperate function - it should now reliably detect ARM or x64

Critique very much welcome - I've never been much of a python dev

@anthony-linaro
Copy link
Author

anthony-linaro commented Jan 8, 2025 via email

@dgovil
Copy link
Collaborator

dgovil commented Jan 8, 2025

That's fair. At the very least, I'd suggest then adding a caveat to the README somewhere to document that EC isn't supported yet?

Also mention incompatibility with ARM64EC
@anthony-linaro
Copy link
Author

Good idea - I have updated the README.md file to reflect the work done on this PR

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@asluk
Copy link
Collaborator

asluk commented Jan 21, 2025

Hi both, thanks for the responses!

@sunyab You're right, those python issues are now fixed, thanks to the suggestion from @asluk to merge dev.

Sadly, the list of errors has now changed, and I now get this:

The following tests FAILED:
        225 - testPlug (Failed)
        656 - testUsdUtilsCreateNewUsdzPackageEditInPlace (Failed)
        764 - testUsdChecker1 (Failed)
        765 - testUsdChecker2 (Failed)
        766 - testUsdChecker3 (Failed)
        767 - testUsdChecker4 (Failed)
        768 - testUsdChecker5 (Failed)
        776 - testUsdChecker13 (Failed)
        777 - testUsdChecker14 (Failed)
        778 - testUsdChecker15 (Failed)
        779 - testUsdChecker16 (Failed)
        780 - testUsdChecker17 (Failed)
        781 - testUsdChecker18 (Failed)
        788 - testUsdChecker26 (Failed)
        789 - testUsdChecker27 (Failed)
        799 - testUsdChecker37 (Failed)
        802 - testUsdResolverExample (Failed)

I have once again attached the logs: LastTest.log

Any suggestions of where I could start to look? It looks like it's not seeing the "Tf" python module. The path variable is correct, and added as specified when building (ie, modified PATH and PYTHONPATH) - is there another one that got missed somewhere? Was there an extra step required between build_usd.py and ctest for python to be able to see the module?

I think the testUsdResolverExample failure is expected, and/or might need the example resolver to be bootstrapped in PATH and PYTHONPATH as well (@sunyab or @pmolodo , do you remember the incantation for that?)

@tallytalwar , looks like the usdchecker rules are failing (also affects testUsdUtilsCreateNewUsdzPackageEditInPlace), but I'm not sure why-- does anything in the log stand out to you or have a clear root cause in your experience? (e.g., Shader </World/simpleMaterial/boardMat/PBRShader> has invalid shader node. (fails 'ShaderPropertyTypeConformanceChecker'))

It's not clear to me what the testPlug failure is.

@tallytalwar
Copy link
Contributor

tallytalwar commented Jan 21, 2025

@asluk all the usdchecker tests (both old <13 and new framework >=13) are failing because its not able to find any of the usdShaders, example UsdPreviewSurface etc in sdr:

New compliance checker failing here: https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/usdValidation/usdShadeValidators/validators.cpp#L341-L353
Old compliance checerk failing here: https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/usd/usdUtils/complianceChecker.py#L712

Both these point to a build issue which is not picking up some plugins example, usdShaders here: https://github.com/PixarAnimationStudios/OpenUSD/tree/dev/pxr/usdImaging/plugin/usdShaders

Maybe the testPlug failure also points to that :/

@asluk
Copy link
Collaborator

asluk commented Jan 22, 2025

Thanks @tallytalwar ! Is there something additional in PATH or PYTHONPATH etc that @anthony-linaro needs to do to detect the shaders?

@anthony-linaro , can you post the relevant bits from your PATH and PYTHONPATH when running tests?

@tallytalwar
Copy link
Contributor

tallytalwar commented Jan 23, 2025

Ahh I see.. I think the "--no-imaging" arg to the build script doesn't build pxr/usdImaging which is where these shader plugins live.

From the PR description:

python build_scripts/build_usd.py --no-python --onetbb --tests --no-imaging C:/WoA/OpenUSD/build_dir

I also had to disable imaging, as building boost appears to be broken when using newer CMake versions (similar issue to #3285)

@asluk
Copy link
Collaborator

asluk commented Jan 23, 2025

Thanks @tallytalwar .... @anthony-linaro , those failures are expected then ... @tallytalwar , is it worth a separate PR disabling some cases in the usdchecker tests when Imaging is not enabled in the build?

@tallytalwar
Copy link
Contributor

@asluk yes definitely. I was planning to do that, but a PR will also be appreciated. Will sync it in for internal consumption promptly.

@anthony-linaro
Copy link
Author

So, we would consider this ready to go then? Or is there a requirement to fix the imaging first?

@asluk
Copy link
Collaborator

asluk commented Jan 27, 2025

So, we would consider this ready to go then? Or is there a requirement to fix the imaging first?

@anthony-linaro can you try running just testPlug to see if you can get more output from it? something like ctest -R testPlug

Overall I think this is generally ready to go, but defer to @sunyab as to next steps. Thanks all!

@anthony-linaro
Copy link
Author

@asluk Full output:

C:\WoA\OpenUSD\build_dir\build\OpenUSD>ctest -C Release -R testPlug --output-on-failure
Test project C:/WoA/OpenUSD/build_dir/build/OpenUSD
    Start 226: testPlug
1/1 Test #226: testPlug .........................***Failed    0.21 sec
Warning: in _DeclareAliases at line 526 of C:\WoA\OpenUSD\pxr\base\plug\plugin.cpp -- Expected string for alias name, but found int
.Error: return code 3221225477 doesn't match expected 0 (EXPECTED_RETURN_CODE).chdir: C:\Users\Anthony\AppData\Local\Temp\tmp4oyg3b4d
cmd: ['C:/Program', 'Files/Python311-arm64/python.exe', 'C:/WoA/OpenUSD/build_dir/tests/testPlug']


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.31 sec

The following tests FAILED:
        226 - testPlug (Failed)
Errors while running CTest

@asluk
Copy link
Collaborator

asluk commented Jan 30, 2025

@asluk Full output:

C:\WoA\OpenUSD\build_dir\build\OpenUSD>ctest -C Release -R testPlug --output-on-failure
Test project C:/WoA/OpenUSD/build_dir/build/OpenUSD
    Start 226: testPlug
1/1 Test #226: testPlug .........................***Failed    0.21 sec
Warning: in _DeclareAliases at line 526 of C:\WoA\OpenUSD\pxr\base\plug\plugin.cpp -- Expected string for alias name, but found int
.Error: return code 3221225477 doesn't match expected 0 (EXPECTED_RETURN_CODE).chdir: C:\Users\Anthony\AppData\Local\Temp\tmp4oyg3b4d
cmd: ['C:/Program', 'Files/Python311-arm64/python.exe', 'C:/WoA/OpenUSD/build_dir/tests/testPlug']


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.31 sec

The following tests FAILED:
        226 - testPlug (Failed)
Errors while running CTest

Thanks @anthony-linaro -- I can't think of something that would cause this, and I don't think that the warning is what is causing the failure. Also I'd expect many more tests to be broken if plugins were broken.

@sunyab , any ideas on how we can get more diagnostics on the failure? Maybe run with TF_DEBUG=PLUG* in the environment? Thanks!

@asluk
Copy link
Collaborator

asluk commented Feb 12, 2025

@anthony-linaro can you set TF_DEBUG to be "PLUG*" in the environment ? Here is my LastTest.log file that gets output from ctest, when running the test successfully on Windows x86_64

LastTest.log

@anthony-linaro
Copy link
Author

@asluk Attached:
LastTestWithPluginDebug.log

Looks like it's failing on TestPlugDsoUnloadable - I noticed I'm using Python 3.11, and you 3.10 - could this be the issue, maybe 3.11 is more strict on the unloadable plugin?

@asluk
Copy link
Collaborator

asluk commented Feb 13, 2025

@asluk Attached: LastTestWithPluginDebug.log

Looks like it's failing on TestPlugDsoUnloadable - I noticed I'm using Python 3.11, and you 3.10 - could this be the issue, maybe 3.11 is more strict on the unloadable plugin?

Thanks @anthony-linaro -- I suspect it's something else-- I do see usdShadeValidators in your output so I wonder if it's what @tallytalwar suspects as well, that running the tests in a no-imaging build will fail due to the shaders not being available.

I'll try to repro on Windows x86_64 with imaging disabled.

@nvmkuruc
Copy link
Collaborator

There's an open issue for checkers failing without imaging for reference

#3055

@asluk
Copy link
Collaborator

asluk commented Feb 13, 2025

confirmed that testPlug does pass for me with a --no-imaging --tests build on Windows x86_64 with python 3.11 -- I am at commit 67e851b , which is the current Pixar "dev" branch -- @anthony-linaro , can you rebase on top of that?

(these tests fail for me)

The following tests FAILED:
554 - testUsdZipFile (Failed)
657 - testUsdUtilsCreateNewUsdzPackageUdim (Failed)
658 - testUsdUtilsCreateNewUsdzPackageRemapClipsDir (Failed)
659 - testUsdUtilsCreateNewUsdzPackageEditInPlace (Failed)
767 - testUsdChecker1 (Failed)
768 - testUsdChecker2 (Failed)
769 - testUsdChecker3 (Failed)
770 - testUsdChecker4 (Failed)
771 - testUsdChecker5 (Failed)
779 - testUsdChecker13 (Failed)
780 - testUsdChecker14 (Failed)
781 - testUsdChecker15 (Failed)
782 - testUsdChecker16 (Failed)
783 - testUsdChecker17 (Failed)
784 - testUsdChecker18 (Failed)
791 - testUsdChecker26 (Failed)
792 - testUsdChecker27 (Failed)
802 - testUsdChecker37 (Failed)
805 - testUsdResolverExample (Failed)

@asluk
Copy link
Collaborator

asluk commented Feb 13, 2025

All tests pass for me with --imaging with python 3.10 in dev, windows x86_64

with python 3.11 in dev, windows x86_64 these --imaging tests fail

The following tests FAILED:
554 - testUsdZipFile (Failed)
657 - testUsdUtilsCreateNewUsdzPackageUdim (Failed)
867 - testUsdviewNavigationKeys (Failed)
883 - testUsdResolverExample (Failed)

@anthony-linaro , if testPlug still fails for you after rebasing, can you try commenting out blocks of test_ErrorCases in testPlug.py until it passes, to keep zeroing in on specifics?

It looks like TestPlugDsoUnloadable is expected to fail to load, but not to crash, and I'm not sure if any ARM64 specifics with how TestPlugDsoUnloadable gets compiled may be in play-- these compiler flags may need tweaking for ARM64 - https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/base/plug/CMakeLists.txt#L105

@asluk
Copy link
Collaborator

asluk commented Feb 14, 2025

small update-- I am now getting the same test results with --imaging builds on Windows x86_64 with python 3.10 and 3.11 in the dev branch -- testUsdZipFile , testUsdviewNavigationKeys , and testUsdResolverExample are the known failures for that. (My previous python 3.10 test run was implicitly excluding tests that are known to fail on Windows).

testPlug is the only real test that needs further investigation in this PR, and I think the approach I recommended for zeroing in on the error cases and compiler flags for the deliberately "bad" plugins being processed in that test should get the PR over the hump.

all the other failing tests in the PR are from the missing usdShaders in --no-imaging builds, that is tracked in #3055

@anthony-linaro
Copy link
Author

@asluk My error list after merging dev now looks like:

The following tests FAILED:
        226 - testPlug (Failed)
        659 - testUsdUtilsCreateNewUsdzPackageEditInPlace (Failed)
        767 - testUsdChecker1 (Failed)
        768 - testUsdChecker2 (Failed)
        769 - testUsdChecker3 (Failed)
        770 - testUsdChecker4 (Failed)
        771 - testUsdChecker5 (Failed)
        779 - testUsdChecker13 (Failed)
        780 - testUsdChecker14 (Failed)
        781 - testUsdChecker15 (Failed)
        782 - testUsdChecker16 (Failed)
        783 - testUsdChecker17 (Failed)
        784 - testUsdChecker18 (Failed)
        791 - testUsdChecker26 (Failed)
        792 - testUsdChecker27 (Failed)
        802 - testUsdChecker37 (Failed)
        805 - testUsdResolverExample (Failed)

So looks like testPlug wasn't fixed - I'll try and drill down to the specific issue in the suggested way

@asluk
Copy link
Collaborator

asluk commented Feb 14, 2025

@asluk My error list after merging dev now looks like:

The following tests FAILED:
        226 - testPlug (Failed)
        659 - testUsdUtilsCreateNewUsdzPackageEditInPlace (Failed)
        767 - testUsdChecker1 (Failed)
        768 - testUsdChecker2 (Failed)
        769 - testUsdChecker3 (Failed)
        770 - testUsdChecker4 (Failed)
        771 - testUsdChecker5 (Failed)
        779 - testUsdChecker13 (Failed)
        780 - testUsdChecker14 (Failed)
        781 - testUsdChecker15 (Failed)
        782 - testUsdChecker16 (Failed)
        783 - testUsdChecker17 (Failed)
        784 - testUsdChecker18 (Failed)
        791 - testUsdChecker26 (Failed)
        792 - testUsdChecker27 (Failed)
        802 - testUsdChecker37 (Failed)
        805 - testUsdResolverExample (Failed)

So looks like testPlug wasn't fixed - I'll try and drill down to the specific issue in the suggested way

thanks for the update @anthony-linaro -- yep, I think once you start disabling error cases in testPlug.py, we'll get a more targeted sense of the actual severity and root causes of what it's reporting -- cc @sunyab 🙏🏼

@anthony-linaro
Copy link
Author

I've spent an amount of time debugging this, and have narrowed it down to an interesting difference in behaviour, which I'm not entirely sure on why it's happening - I will continue to try and debug, but thought I would update here.

The issue is actually coming from the LoadLibrary call in library.cpp when the DLL is loaded for TestPlugDsoUnloadable - on x64, the DLL fails to load as intended/documented, and execution continues with the handle being a NULLPTR.

On ARM64 however, there is an EXCEPTION_ACCESS_VIOLATION when the LoadLibrary call is made, that just doesn't seem to want to be caught. I've tried both regular try blocks, and also the MSVC extension __try blocks. Regardless of those, the exception seems to immediately kill off the process, causing the error we can see of return code 3221225477 doesn't match expected 0, which comes from testWrapper.py, line 321. Using LoadLibraryEx makes no difference.

I'm not entirely sure what's going on here - by all documentation, this function should just fail, and return NULLPTR - however, it doesn't seem to be doing that at all. Is it because the DLL is so intentionally broken we're running into undefined behaviour?

@asluk
Copy link
Collaborator

asluk commented Feb 26, 2025

Thanks for digging into it @anthony-linaro -- I suspect someone from Microsoft would have more info on why the exception is not being caught. If you comment out

    # try to load an unloadable plugin
    badPlugin = Plug.Registry().GetPluginForType('TestPlugUnloadable')
    self.assertIsNotNone(badPlugin)
    with self.assertRaises(RuntimeError):
        badPlugin.Load()

does the rest of testPlug pass? If so, @sunyab , is there a way to conditionally skip that case behind some sort of Arch query in Python?

@sunyab
Copy link
Contributor

sunyab commented Feb 26, 2025

Sure, that test case could certainly be skipped over using the same logic to detect whether we're in a Windows ARM64 environment as in build_usd.py -- we wouldn't need anything from the Arch library itself (which isn't wrapped to Python anyway).

The main trickiness with TestPlugDsoUnloadable is its intentional use of an unresolved external symbol. I didn't see anything in the LoadLibrary docs that explicitly mention that loading such a library will result in the function returning NULL, so I guess technically its undefined behavior? At the same time, it feels like it'd be pretty weird if the behavior differed between ARM and x64 for this particular case.

One thing I'm kind of curious about is whether moving this code in TestPlugDsoUnloadable.cpp:

static int something =
Unresolved_external_symbol_error_is_expected_Please_ignore();

to within the TF_REGISTRY_FUNCTION block here:

TF_REGISTRY_FUNCTION(TfType)

makes a difference. I have no real reason to think it should, I'm just throwing stuff against the wall.

@anthony-linaro
Copy link
Author

anthony-linaro commented Feb 26, 2025 via email

@asluk
Copy link
Collaborator

asluk commented Feb 27, 2025

@anthony-linaro , yes OpenUSD needs to be incrementally "rebuilt" in order for modified tests to get re-installed to the location from which they are run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build-related issue/PR needs review Issue needing input/review by the repo maintainer (Pixar)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants