Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Version 1.27 does not compile on CI (issue with mkdoc/pybind/stdc++13) #17

Open
j-rivero opened this issue Mar 26, 2024 · 1 comment
Open

Comments

@j-rivero
Copy link
Collaborator

I've tried to bump the version in this repo to the latest 1.27 and found that GitHub action returned a problem that I think it is related to mkdoc when trying to compile the pybind headers:

2024-03-26T14:03:19.9089434Z �[32m[3,276 / 5,262]�[0m Action bindings/pydrake/documentation_pybind.h; 36s linux-sandbox ... (6 actions, 3 running)
2024-03-26T14:03:19.9090413Z �[32m[3,279 / 5,264]�[0m Action bindings/pydrake/documentation_pybind.h; 37s linux-sandbox ... (6 actions, 3 running)
2024-03-26T14:03:19.9093670Z �[31m�[1mERROR: �[0m/home/runner/work/ros-drake-vendor/ros-drake-vendor/ros_ws/build/drake/drake-prefix/src/drake/bindings/pydrake/BUILD.bazel:55:37: Action bindings/pydrake/documentation_pybind.h failed: (Exit 1): mkdoc failed: error executing Action command (from target //bindings/pydrake:generate_pybind_documentation_header) bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/tools/workspace/pybind11/mkdoc -DDRAKE_COMMON_SYMBOLIC_EXPRESSION_DETAIL_HEADER -DFMT_LOCALE -DFMT_SHARED -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB ... (remaining 882 arguments skipped)
2024-03-26T14:03:19.9096367Z 
2024-03-26T14:03:19.9096853Z Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
2024-03-26T14:03:19.9098266Z /../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression
2024-03-26T14:03:19.9099717Z /../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression
2024-03-26T14:03:19.9100766Z /../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2275:2: note: declared here
2024-03-26T14:03:19.9101300Z Traceback (most recent call last):
2024-03-26T14:03:19.9102477Z   File "/tmp/bazel-working-directory/drake/bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/tools/workspace/pybind11/mkdoc.runfiles/drake/tools/workspace/pybind11/mkdoc.py", line 816, in <module>
2024-03-26T14:03:19.9103522Z     main()
2024-03-26T14:03:19.9104572Z   File "/tmp/bazel-working-directory/drake/bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/tools/workspace/pybind11/mkdoc.runfiles/drake/tools/workspace/pybind11/mkdoc.py", line 782, in main
2024-03-26T14:03:19.9105591Z     raise RuntimeError(
2024-03-26T14:03:19.9106137Z RuntimeError: Parsing headers using the clang library failed with 1 error(s) and 0 fatal error(s)
2024-03-26T14:03:19.9106735Z Target //:install failed to build
2024-03-26T14:03:19.9107232Z Use --verbose_failures to see the command lines of failed build steps.
2024-03-26T14:03:19.9107819Z �[32mINFO: �[0mElapsed time: 97.034s, Critical Path: 38.82s
2024-03-26T14:03:19.9108429Z �[32mINFO: �[0m3286 processes: 2534 internal, 747 linux-sandbox, 5 worker.
2024-03-26T14:03:19.9109000Z �[31m�[1mERROR: �[0mBuild did NOT complete successfully
2024-03-26T14:03:19.9109698Z �[0mgmake[5]: *** [CMakeFiles/drake_cxx_python.dir/build.make:70: CMakeFiles/drake_cxx_python] Error 1
2024-03-26T14:03:19.9110449Z gmake[4]: *** [CMakeFiles/Makefile2:83: CMakeFiles/drake_cxx_python.dir/all] Error 2
2024-03-26T14:03:19.9110970Z gmake[3]: *** [Makefile:136: all] Error 2
2024-03-26T14:03:19.9111617Z gmake[2]: *** [CMakeFiles/drake.dir/build.make:86: drake-prefix/src/drake-stamp/drake-build] Error 2
2024-03-26T14:03:19.9112444Z gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/drake.dir/all] Error 2
2024-03-26T14:03:19.9112915Z gmake: *** [Makefile:146: all] Error 2

Version reported in the logs for CXX is a GNU 11.4.0. There is a mismatch between the compiler version and the stdc++ since one is 11.x and the other is 13.x. I think that the problem could come from the fact of using the ppa of ubuntu-toolchain-r/test:

...
2024-03-26T13:57:39.3807608Z Get:24 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy/main amd64 lib32stdc++6 amd64 13.1.0-8ubuntu1~22.04 [835 kB]
...
2024-03-26T13:58:31.5111678Z Preparing to unpack .../16-lib32stdc++6_13.1.0-8ubuntu1~22.04_amd64.deb ...
2024-03-26T13:58:31.5139794Z Unpacking lib32stdc++6 (13.1.0-8ubuntu1~22.04) over (12.3.0-1ubuntu1~22.04) ...
... 

Seems like the base image could be the one installing that ppa since I don't see anything in the setup.ros code but see an script in the base image repo https://github.com/actions/runner-images/blob/9ee0335bca637272ec439ed8b9a8b9108a7d39b2/images/ubuntu/scripts/build/install-gcc-compilers.sh#L12.

@jwnimmer-tri
Copy link
Contributor

Yes, this is the same thing as RobotLocomotion/drake-ros#340.

The GitHub Actions image has the toolchain PPA and installs GCC 11 (from Jammy) and GCC 12 and 13 (from the PPA).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants