Environment
- OS: Ubuntu 24.04
- Compiler: GCC 14.2.0
- CMake: 3.28.3
- Branch/commit: master/c5a063d
Context
There are example scenes (e.g. under data/Scenes/AnimatedBody_2D.json) that use embedded
Python scripts to animate rigid bodies dynamically. These scenes require
-DUSE_EMBEDDED_PYTHON=On to function. However, this option cannot be
built successfully, making these examples completely unusable.
I also checked out the commit(tag:2.10.0) where USE_EMBEDDED_PYTHON support was
originally introduced, and the build failed there as well with the same
errors — so this feature appears to have never been buildable.
Steps to Reproduce
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PYTHON_BINDINGS=On -DUSE_EMBEDDED_PYTHON=On ..
Error
CMake configuration fails with:
The dependency target "pysplishsplash_embed" of target "SimulatorBase" does not exist.
This happens because add_subdirectory(Simulator) is processed before
add_subdirectory(pySPlisHSPlasH) in the top-level CMakeLists.txt,
so pysplishsplash_embed does not exist yet when Simulator/CMakeLists.txt
adds it to SIMULATION_DEPENDENCIES.
After commenting out pysplishsplash_embed from SIMULATION_DEPENDENCIES,
the build progresses but hits a second error:
Target "SimulatorBase" links to: pybind11::embed but the target was not found.
pySPlisHSPlasH/CMakeLists.txt references pybind11::embed, but the
bundled extern/pybind/CMakeLists.txt only defines pybind11::headers
— pybind11::embed does not exist.
My Understanding (may be incorrect)
It seems like there is a circular dependency between SimulatorBase and
pysplishsplash_embed:
Simulator/CMakeLists.txt links SimulatorBase to pysplishsplash_embed
pySPlisHSPlasH/CMakeLists.txt links pysplishsplash_embed to SimulatorBase
Combined with the subdirectory ordering and the missing pybind11::embed
target, building with -DUSE_EMBEDDED_PYTHON=On does not seem possible
with the current CMake configuration.
I may be misunderstanding the intended build setup, so any guidance on
how to correctly build with this option would be appreciated.
Expected Behavior
-DUSE_EMBEDDED_PYTHON=On should configure and build successfully.
Environment
Context
There are example scenes (e.g. under
data/Scenes/AnimatedBody_2D.json) that use embeddedPython scripts to animate rigid bodies dynamically. These scenes require
-DUSE_EMBEDDED_PYTHON=Onto function. However, this option cannot bebuilt successfully, making these examples completely unusable.
I also checked out the commit(tag:2.10.0) where
USE_EMBEDDED_PYTHONsupport wasoriginally introduced, and the build failed there as well with the same
errors — so this feature appears to have never been buildable.
Steps to Reproduce
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PYTHON_BINDINGS=On -DUSE_EMBEDDED_PYTHON=On ..
Error
CMake configuration fails with:
The dependency target "pysplishsplash_embed" of target "SimulatorBase" does not exist.This happens because
add_subdirectory(Simulator)is processed beforeadd_subdirectory(pySPlisHSPlasH)in the top-level CMakeLists.txt,so
pysplishsplash_embeddoes not exist yet whenSimulator/CMakeLists.txtadds it to
SIMULATION_DEPENDENCIES.After commenting out
pysplishsplash_embedfromSIMULATION_DEPENDENCIES,the build progresses but hits a second error:
Target "SimulatorBase" links to: pybind11::embed but the target was not found.pySPlisHSPlasH/CMakeLists.txtreferencespybind11::embed, but thebundled
extern/pybind/CMakeLists.txtonly definespybind11::headers—
pybind11::embeddoes not exist.My Understanding (may be incorrect)
It seems like there is a circular dependency between
SimulatorBaseandpysplishsplash_embed:Simulator/CMakeLists.txtlinksSimulatorBasetopysplishsplash_embedpySPlisHSPlasH/CMakeLists.txtlinkspysplishsplash_embedtoSimulatorBaseCombined with the subdirectory ordering and the missing
pybind11::embedtarget, building with
-DUSE_EMBEDDED_PYTHON=Ondoes not seem possiblewith the current CMake configuration.
I may be misunderstanding the intended build setup, so any guidance on
how to correctly build with this option would be appreciated.
Expected Behavior
-DUSE_EMBEDDED_PYTHON=Onshould configure and build successfully.