petrikvladimir / pyphysx

Python Wrapper for Nvidia PhysX simulator.
GNU General Public License v3.0
102 stars 21 forks source link

Build on OSX #38

Closed EelcoHoogendoorn closed 3 years ago

EelcoHoogendoorn commented 3 years ago

Hi there.

Congrats on this project; looks really useful, and very clean the way its implemented in pybind, I tried building on OSX (inside a conda-build recipe I am aiming to put together).

conan manages to grab the requested version of physx just fine it seems; but then I run into a compilation error suggestive of a version difference:

[ 50%] Building CXX object CMakeFiles/pyphysx.dir/src/pyphysx.cpp.o
In file included from /Users/eelco/opt/miniconda3/conda-bld/pyphysx_1604003521997/work/src/pyphysx.cpp:11:
/Users/eelco/opt/miniconda3/conda-bld/pyphysx_1604003521997/work/include/Physics.h:28:16: error: no type named 'PxCudaContextManagerDesc' in namespace 'physx'; did
      you mean 'PxCudaContextManager'?
        physx::PxCudaContextManagerDesc desc;
        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
               PxCudaContextManager
/Users/eelco/.conan/data/physx/4.1.1/_/_/package/f958777421f45f4992f33307208920b3a36e2dc2/include/PxSceneDesc.h:50:8: note: 'PxCudaContextManager' declared here
        class PxCudaContextManager;
              ^
In file included from /Users/eelco/opt/miniconda3/conda-bld/pyphysx_1604003521997/work/src/pyphysx.cpp:11:
/Users/eelco/opt/miniconda3/conda-bld/pyphysx_1604003521997/work/include/Physics.h:28:41: error: variable has incomplete type 'physx::PxCudaContextManager'
        physx::PxCudaContextManagerDesc desc;
                                        ^
/Users/eelco/.conan/data/physx/4.1.1/_/_/package/f958777421f45f4992f33307208920b3a36e2dc2/include/PxSceneDesc.h:50:8: note: forward declaration of
      'physx::PxCudaContextManager'
        class PxCudaContextManager;

Does this mean anything to you? What platforms have you successfully built on before?

Regards, Eelco

petrikvladimir commented 3 years ago

Hi, thanks for reporting. I have used the library only on Linux and was not aware of the API difference for osx. Should compile successfully now after commenting out GPU related functionality on apple. See pull request #39, and corresponding Travis build for osx.

Feel free to reopen the issue if that did not resolve your compilation error.

Best, Vladimir