Comments (6)
Also fails in the same way with g++12 on Ubuntu 22.04.
from physx.
Thanks for reporting. While I don't see your exact error, compilation with gcc11 indeed fails. We've narrowed down the issue and it will be fixed in the next version.
As a workaround for now, you can try adjusting the build flags for gcc, in particular remove -Werror
and add -fpermissive
. The easiest place to change this is in source/compiler/cmake/linux/CMakeLists.txt
at the line that begins with SET(GCC_WARNINGS ...
from physx.
I tried -fpermissive
and updated to the latest PhysX release but I am still getting the error. Here is the full command that CMake is running to compile PxMetaDataObjects.h
:
/usr/bin/g++-11 -DNDEBUG -DPX_PHYSX_GPU_SHARED_LIB_NAME=libPhysXGpu_64.so -DPX_PHYSX_STATIC_LIB -DPX_PUBLIC_RELEASE=1 -DPX_SUPPORT_OMNI_PVD=0 -DPX_SUPPORT_PVD=0 -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/common/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/common/src -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/physx/src -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/physx/src/device -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/physxgpu/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/contact -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/common -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/convex -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/distance -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/sweep -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/gjk -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/intersection -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/mesh -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/hf -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/pcm -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/geomutils/src/ccd -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/lowlevel/api/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/lowlevel/software/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/lowlevel/common/include/pipeline -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/lowlevel/common/include/utils -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/lowlevelaabb/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/lowleveldynamics/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/simulationcontroller/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/simulationcontroller/src -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/scenequery/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/physxmetadata/core/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/immediatemode/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/pvd/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/omnipvd -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/pvdruntime/include -I/home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/foundation/include -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -Wno-class-memaccess -Wno-invalid-offsetof -Wno-mismatched-new-delete -Wno-nonnull-compare -Wno-pragmas -Wno-uninitialized -Wno-unused-function -O3 -fPIC -w -std=gnu++20 -MD -MT deps/physx/physx/compiler/public/sdk_source_bin/CMakeFiles/PhysX.dir/__/__/physxmetadata/core/src/PxMetaDataObjects.cpp.o -MF deps/physx/physx/compiler/public/sdk_source_bin/CMakeFiles/PhysX.dir/__/__/physxmetadata/core/src/PxMetaDataObjects.cpp.o.d -o deps/physx/physx/compiler/public/sdk_source_bin/CMakeFiles/PhysX.dir/__/__/physxmetadata/core/src/PxMetaDataObjects.cpp.o -c /home/runner/work/RavEngine/RavEngine/deps/physx/physx/source/physxmetadata/core/src/PxMetaDataObjects.cpp
from physx.
This is surprising because we're testing the release in a clean containerized Ubuntu environment the respective default clang and gcc versions, i.e., Ubuntu 20.04 LTS with gcc 9 or clang 10 and Ubuntu 22.04 LTS with gcc 11 or clang 14, and have not seen any problems.
Are you using a customized setup to build PhysX?
Your original post indicates that the compile error happens when compiling PxAutoGeneratedMetaDataObjects.cpp
. Your most recent post shows the build flags for PxMetaDataObjects.cpp
. Just copying them for readability, the flags are
-std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -fno-strict-aliasing
-Wall -Werror -Wno-array-bounds -Wno-class-memaccess -Wno-invalid-offsetof
-Wno-mismatched-new-delete -Wno-nonnull-compare -Wno-pragmas -Wno-uninitialized
-Wno-unused-function -O3 -fPIC -w -std=gnu++20 -MD -MT
and do not include -fpermissive
as far as I can tell. Can you double-check that the flags for the actual file that produces errors are set correctly? I know the error happens in the header file, but that header is included from multiple source files, so it's important that you're actually working with the right cpp file.
Once you figured out which file exactly it is and ruled out other problems, you can apply a patch similar to the lines in source/compiler/cmake/linux/PhysX.cmake#L122, i.e., something like
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET_SOURCE_FILES_PROPERTIES(${PX_SOURCE_DIR}/omnipvd/OmniPvdPxSampler.cpp PROPERTIES COMPILE_FLAGS "-fpermissive -Wno-error")
ENDIF()
from physx.
I was able to find the issue - I had set CMAKE_CXX_STANDARD earlier in my top-level CMakeLists.txt to C++20 which was affecting PhysX and causing the error with g++. Removing this fixed the issue for me. In my testing I could set the standard up to C++17 without issues on g++, the error started happening only on C++20. Thanks!
from physx.
Great, thanks for letting us know!
from physx.
Related Issues (20)
- Position Based Dynamics: Set Particle Position and Velocity HOT 4
- TGS instability with drives HOT 4
- crush in PxContactStreamIterator getFaceIndex0 when GPU enabled and contact with custom geometry or mesh HOT 2
- PxRigidBodyExt::setMassAndUpdateInertia of kinematic rigid actor with triangle mesh causes: Assertion failed: mG.isFinite() HOT 2
- setting driveForceLimit does not work HOT 2
- SDF cause CUDA error , even black screen (driver crash)
- SDF cause CUDA error , even black screen (driver crash?) HOT 4
- Increasing Damping ingnores ForceLimit of PxD6 Joint HOT 9
- PxCustomGeometryExt::BaseConvexCallbacks::raycast doesn't report back which fields are valid HOT 2
- Trigger emulation and character controller HOT 3
- Crash inside SAP Broad phase when there is too much collision pairs HOT 2
- issue with getting a center of mass
- Unable to compile with Clang - __m128 is not a structure or union HOT 3
- TGS solver does not support PxPairFlag::eNOTIFY_THRESHOLD_FORCE_... flags HOT 2
- Blast build for Visual Studio 2022
- I can not link physx 5.3.0 library from vcpkg into my project HOT 3
- Static contact forces are not correct on inclined plane HOT 5
- linux - cannot build libraries (error: 'src' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]) HOT 9
- Bad task scheduling due to lack of priority HOT 2
- How to read data from Flow HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from physx.