gazebosim / gz-launch

Run and manage programs and plugins.
https://gazebosim.org
Apache License 2.0
12 stars 17 forks source link

:farmer: launch5-win fails to build because of undefined type in ignition-gazebo6 package #220

Open Crola1702 opened 1 year ago

Crola1702 commented 1 year ago

Environment

Description

Steps to reproduce

  1. Run a build in ign-launch5-win
  2. See it fail

Output

Reference builds:

Log output:

C:\vcpkg\installed\x64-windows\include\pybind11\detail/type_caster_base.h(482,26): error C2027: use of undefined type '_frame' (compiling source file C:\J\workspace\ign_launch-ign-5-win\ws\gz-sim\python\src\ignition\common\Console.cc) [C:\J\workspace\ign_launch-ign-5-win\ws\build\ignition-gazebo6\python\common.vcxproj]

C:\Program Files\Python311\include\pytypedefs.h(22): message : see declaration of '_frame' (compiling source file C:\J\workspace\ign_launch-ign-5-win\ws\gz-sim\python\src\ignition\common\Console.cc) [C:\J\workspace\ign_launch-ign-5-win\ws\build\ignition-gazebo6\python\common.vcxproj]

C:\vcpkg\installed\x64-windows\include\pybind11\detail/type_caster_base.h(482,26): error C2027: use of undefined type '_frame' (compiling source file C:\J\workspace\ign_launch-ign-5-win\ws\gz-sim\python\src\ignition\common\_ignition_common_pybind11.cc) [C:\J\workspace\ign_launch-ign-5-win\ws\build\ignition-gazebo6\python\common.vcxproj]

C:\Program Files\Python311\include\pytypedefs.h(22): message : see declaration of '_frame' (compiling source file C:\J\workspace\ign_launch-ign-5-win\ws\gz-sim\python\src\ignition\common\_ignition_common_pybind11.cc) [C:\J\workspace\ign_launch-ign-5-win\ws\build\ignition-gazebo6\python\common.vcxproj]

This error points to: https://github.com/gazebosim/gz-sim/tree/ign-gazebo6/python/src/ignition/common folder

Crola1702 commented 1 year ago

Linking with https://github.com/gazebosim/gz-sim/issues/2003 as it's the same problem

azeey commented 1 year ago

Our CI uses pybind11 2.9.1 with Python 3.11. According to the pybind11 changelog, support for Python 3.11 was started in pybind11 2.10.0 https://github.com/pybind/pybind11/releases/tag/v2.10.0

Version 2.10.0 Removed support for Python 2.7, Python 3.5, and MSVC 2015. Support for MSVC 2017 is limited due to availability of CI runners; we highly recommend MSVC 2019 or 2022 be used. Initial support added for Python 3.11.

Crola1702 commented 1 year ago

And is there a plan to solve this problem? Bumping pybind version?

azeey commented 1 year ago

vcpkg already has 2.10.3, so I'm not sure why we're getting an older version. @j-rivero can we update the vcpkg snapshot? https://github.com/gazebo-tooling/release-tools/blob/44fb01e28e3722835ac1fdd165ba470dff4e3513/jenkins-scripts/lib/windows_env_vars.bat#L19

j-rivero commented 1 year ago

vcpkg already has 2.10.3, so I'm not sure why we're getting an older version. @j-rivero can we update the vcpkg snapshot? https://github.com/gazebo-tooling/release-tools/blob/44fb01e28e3722835ac1fdd165ba470dff4e3513/jenkins-scripts/lib/windows_env_vars.bat#L19

Upgrading the snapshot is something we should try to avoid since it will move all the dependencies version of stable releases.

After checking offline with @azeey and @Crola1702, one possible option would be to get rid of pybind11 in the vcpkg dependencies we are using to get back the CI to the states before the migration in #892 happened. That has its own risks and the safer approach is probably disable building python bindings on windows in each library by setting SKIP_PYBIND11 to ON just like https://github.com/gazebosim/gz-math/pull/529.