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

Compilation errors #16

Open
diarmidmackenzie opened this issue Mar 15, 2023 · 1 comment
Open

Compilation errors #16

diarmidmackenzie opened this issue Mar 15, 2023 · 1 comment

Comments

@diarmidmackenzie
Copy link

diarmidmackenzie commented Mar 15, 2023

I'm using this code to build PhysX, and hitting a couple of errors during the make stage that prevent the build from completing.

First error was this:

/src/PhysX/physx/source/physx/src/NpBatchQuery.cpp:369:33: error: variable 'hitsSpaceLeft' is uninitialized when passed as a const reference argument here [-Werror,-Wuninitialized-const-reference]
        PxU32 hitsSpaceLeft; PX_UNUSED(hitsSpaceLeft);
                                       ^~~~~~~~~~~~~
1 error generated.

I was able to workaround by adjusting the line in NpBatchQuery.cpp to initialize histSpaceLeft like this

        PxU32 hitsSpaceLeft = 0; PX_UNUSED(hitsSpaceLeft);

That resolved that error, but then I hit another error.

/src/PhysX/physx/source/physxextensions/src/ExtSharedQueueEntryPool.h:104:33: error: ISO C++ requires the name after '::~' to be found in the same scope as the name before '::~' [-Werror,-Wdtor-name]
Ext::SharedQueueEntryPool<Alloc>::~SharedQueueEntryPool()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
                                ::SharedQueueEntryPool
1 error generated.

The PhysX code I am building is from this repo:
https://github.com/diarmidmackenzie/PhysX-1/tree/joint-projection

Which has just one change vs. this:
https://github.com/zach-capalbo/PhysX

Which has only a few changes vs. this:
https://github.com/ashconnell/PhysX

None of these changes seem in any way related to the errors above. It seems odd to be hitting compiler errors in core PhysX code that I've not touched at all. Could my build somehow be running with different compiler, or different compiler flags vs. what other people have run?

I am running in a WSL2 VM on Windows, with Docker Desktop. My understanding was that the build environment should be entirely contained inside the docker container, so shouldn't be affected by the underlying OS it's running on.

Next step, I'm going to try a clean check-out of https://github.com/ashconnell/physx-js and https://github.com/ashconnell/PhysX and see if I get any better results...

@diarmidmackenzie
Copy link
Author

I a completely clean check-out of everything, and this time I used this PhysX:
https://github.com/prestomation/PhysX/tree/emscripten_wip

Hit exactly the same compiler error:

[ 72%] Building CXX object sdk_source_bin/CMakeFiles/PhysX.dir/src/PhysX/physx/source/physx/src/NpBatchQuery.cpp.o
/src/PhysX/physx/source/physx/src/NpBatchQuery.cpp:369:33: error: variable 'hitsSpaceLeft' is uninitialized when passed as a const reference argument here [-Werror,-Wuninitialized-const-reference]
        PxU32 hitsSpaceLeft; PX_UNUSED(hitsSpaceLeft);
                                       ^~~~~~~~~~~~~
1 error generated.

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

No branches or pull requests

1 participant