From 6a1d4ca6f5cc096f5ea1d89b7087814e4121eff2 Mon Sep 17 00:00:00 2001 From: William Allen Date: Thu, 5 Jan 2023 12:29:51 -0500 Subject: [PATCH 01/15] disable vagrind for solvers/mosek_solver_internal_test --- solvers/BUILD.bazel | 3 +++ 1 file changed, 3 insertions(+) diff --git a/solvers/BUILD.bazel b/solvers/BUILD.bazel index 277d6e2d5f3c..37ab1858217e 100644 --- a/solvers/BUILD.bazel +++ b/solvers/BUILD.bazel @@ -1458,6 +1458,9 @@ drake_cc_optional_googletest( name = "mosek_solver_internal_test", opt_in_condition = "//tools:with_mosek", use_default_main = False, + tags = [ + "no_memcheck" + ], deps = [ ":mosek_solver", ":mosek_solver_internal", From 0b4a01c51f6ac5eafac48e59f08a50bc89dd4678 Mon Sep 17 00:00:00 2001 From: William Allen Date: Thu, 5 Jan 2023 12:50:04 -0500 Subject: [PATCH 02/15] reformat bazel file --- solvers/BUILD.bazel | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/solvers/BUILD.bazel b/solvers/BUILD.bazel index 37ab1858217e..fb2b0809c522 100644 --- a/solvers/BUILD.bazel +++ b/solvers/BUILD.bazel @@ -1457,10 +1457,8 @@ drake_cc_googletest( drake_cc_optional_googletest( name = "mosek_solver_internal_test", opt_in_condition = "//tools:with_mosek", + tags = ["no_memcheck"], use_default_main = False, - tags = [ - "no_memcheck" - ], deps = [ ":mosek_solver", ":mosek_solver_internal", From f44902f1c25faa438e8156b05e87d371cbb44fc7 Mon Sep 17 00:00:00 2001 From: William Allen Date: Thu, 5 Jan 2023 18:39:50 -0500 Subject: [PATCH 03/15] Update Bazel to 6.0.0 --- .bazeliskrc | 2 +- setup/ubuntu/source_distribution/install_prereqs.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bazeliskrc b/.bazeliskrc index 4913d8672069..8e1631668655 100644 --- a/.bazeliskrc +++ b/.bazeliskrc @@ -1,3 +1,3 @@ # Keep this version number in sync with the Ubuntu deb installed by # drake/setup/ubuntu/source_distribution/install_prereqs.sh. -USE_BAZEL_VERSION=5.3.1 +USE_BAZEL_VERSION=6.0.0 diff --git a/setup/ubuntu/source_distribution/install_prereqs.sh b/setup/ubuntu/source_distribution/install_prereqs.sh index 419364963216..8bdb2f747f30 100755 --- a/setup/ubuntu/source_distribution/install_prereqs.sh +++ b/setup/ubuntu/source_distribution/install_prereqs.sh @@ -181,7 +181,7 @@ if [[ $(arch) = "aarch64" ]]; then fi else dpkg_install_from_wget \ - bazel 5.3.1 \ - https://releases.bazel.build/5.3.1/release/bazel_5.3.1-linux-x86_64.deb \ - 1e939b50d90f68d30fa4f3c12dfdf31429b83ddd8076c622429854f64253c23d + bazel 6.0.0 \ + https://releases.bazel.build/6.0.0/release/bazel_6.0.0-linux-x86_64.deb \ + f03d44ecaac3878e3d19489e37caa4ca1dc57427b686a78a85065ea3c27ebe6 fi From deb2114cba8b2fa8709d68bda2e53840aae11d39 Mon Sep 17 00:00:00 2001 From: William Allen Date: Fri, 6 Jan 2023 10:15:35 -0500 Subject: [PATCH 04/15] Update hash of .deb file --- setup/ubuntu/source_distribution/install_prereqs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/ubuntu/source_distribution/install_prereqs.sh b/setup/ubuntu/source_distribution/install_prereqs.sh index 8bdb2f747f30..0060638c3c89 100755 --- a/setup/ubuntu/source_distribution/install_prereqs.sh +++ b/setup/ubuntu/source_distribution/install_prereqs.sh @@ -183,5 +183,5 @@ else dpkg_install_from_wget \ bazel 6.0.0 \ https://releases.bazel.build/6.0.0/release/bazel_6.0.0-linux-x86_64.deb \ - f03d44ecaac3878e3d19489e37caa4ca1dc57427b686a78a85065ea3c27ebe6 + b27749e59d7d57d9cf6ca0edce7fbd26bb677797217429052d62ee0f2d008b35 fi From 474416d49e964a083c7987417d1082d117953a06 Mon Sep 17 00:00:00 2001 From: William Allen Date: Mon, 9 Jan 2023 09:19:45 -0500 Subject: [PATCH 05/15] Add dReal patch on macOS --- tools/workspace/dreal/patches/pull18545.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/workspace/dreal/patches/pull18545.patch diff --git a/tools/workspace/dreal/patches/pull18545.patch b/tools/workspace/dreal/patches/pull18545.patch new file mode 100644 index 000000000000..463e539a5ca5 --- /dev/null +++ b/tools/workspace/dreal/patches/pull18545.patch @@ -0,0 +1,12 @@ +See https://github.com/RobotLocomotion/drake/pull/18545 for details +about this patch. + +--- tools/dreal.bzl.orig ++++ tools/dreal.bzl +@@ -65,7 +65,6 @@ + return select({ + "//tools:gcc_build": GCC_FLAGS + extra_gcc_flags + rule_copts, + "//tools:clang_build": CLANG_FLAGS + rule_copts, +- "//tools:apple": CLANG_FLAGS + rule_copts, + "//conditions:default": CXX_FLAGS + rule_copts, + }) \ No newline at end of file From 3440336c90eb80cd99d69108acab42f350871ecb Mon Sep 17 00:00:00 2001 From: William Allen Date: Mon, 9 Jan 2023 12:12:06 -0500 Subject: [PATCH 06/15] Apply patch --- tools/workspace/dreal/repository.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/workspace/dreal/repository.bzl b/tools/workspace/dreal/repository.bzl index 35f3a5ec2aa6..a72943d36c04 100644 --- a/tools/workspace/dreal/repository.bzl +++ b/tools/workspace/dreal/repository.bzl @@ -19,6 +19,7 @@ def dreal_repository( ":patches/platforms.patch", ":patches/pull283.patch", ":patches/warnings.patch", + ":patches/pull18545.patch ], repo_mapping = { "@nlopt": "@nlopt_internal", From 9f98a3bc123cf88d00073cd94430df617279b1b3 Mon Sep 17 00:00:00 2001 From: William Allen Date: Mon, 9 Jan 2023 12:16:30 -0500 Subject: [PATCH 07/15] Fix typo in previous commit --- tools/workspace/dreal/repository.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/workspace/dreal/repository.bzl b/tools/workspace/dreal/repository.bzl index a72943d36c04..d97eeda91222 100644 --- a/tools/workspace/dreal/repository.bzl +++ b/tools/workspace/dreal/repository.bzl @@ -19,7 +19,7 @@ def dreal_repository( ":patches/platforms.patch", ":patches/pull283.patch", ":patches/warnings.patch", - ":patches/pull18545.patch + ":patches/pull18545.patch" ], repo_mapping = { "@nlopt": "@nlopt_internal", From c7b4d693033b912ac6483fc458a9b9b93ce98d24 Mon Sep 17 00:00:00 2001 From: William Allen Date: Mon, 9 Jan 2023 12:25:45 -0500 Subject: [PATCH 08/15] Reformat .bzl file --- tools/workspace/dreal/repository.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/workspace/dreal/repository.bzl b/tools/workspace/dreal/repository.bzl index d97eeda91222..a31ff93d290a 100644 --- a/tools/workspace/dreal/repository.bzl +++ b/tools/workspace/dreal/repository.bzl @@ -19,7 +19,7 @@ def dreal_repository( ":patches/platforms.patch", ":patches/pull283.patch", ":patches/warnings.patch", - ":patches/pull18545.patch" + ":patches/pull18545.patch", ], repo_mapping = { "@nlopt": "@nlopt_internal", From 079d812b235f7d19b77d31076cc740eb8f487fc3 Mon Sep 17 00:00:00 2001 From: William Allen Date: Wed, 11 Jan 2023 09:46:19 -0500 Subject: [PATCH 09/15] Remove unrelated change --- solvers/BUILD.bazel | 1 - 1 file changed, 1 deletion(-) diff --git a/solvers/BUILD.bazel b/solvers/BUILD.bazel index fb2b0809c522..277d6e2d5f3c 100644 --- a/solvers/BUILD.bazel +++ b/solvers/BUILD.bazel @@ -1457,7 +1457,6 @@ drake_cc_googletest( drake_cc_optional_googletest( name = "mosek_solver_internal_test", opt_in_condition = "//tools:with_mosek", - tags = ["no_memcheck"], use_default_main = False, deps = [ ":mosek_solver", From 5284c310328f08f6dc48dc0e3cbebaa0f60882d0 Mon Sep 17 00:00:00 2001 From: William Allen Date: Wed, 18 Jan 2023 16:03:04 -0500 Subject: [PATCH 10/15] Update officially supported Bazel version --- doc/_pages/from_source.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/_pages/from_source.md b/doc/_pages/from_source.md index 4670ad9b558d..60ade785f655 100644 --- a/doc/_pages/from_source.md +++ b/doc/_pages/from_source.md @@ -15,10 +15,10 @@ integration. Any other configurations are provided on a best-effort basis. | Operating System ⁽²⁾ | Architecture | Python ⁽¹⁾ | Bazel | CMake | C/C++ Compiler ⁽³⁾ | Java | |------------------------------------|--------------|------------|-------|-------|------------------------------|-------------------------------| -| Ubuntu 20.04 LTS (Focal Fossa) | x86_64 | 3.8 | 5.3 | 3.16 | GCC 9 (default) or Clang 12 | OpenJDK 11 | -| Ubuntu 22.04 LTS (Jammy Jellyfish) | x86_64 | 3.10 | 5.3 | 3.22 | GCC 11 (default) or Clang 12 | OpenJDK 11 | -| macOS Monterey (12) | x86_64 | 3.10 | 5.3 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | -| macOS Monterey (12) | arm64 | 3.10 | 5.3 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | +| Ubuntu 20.04 LTS (Focal Fossa) | x86_64 | 3.8 | 6.0 | 3.16 | GCC 9 (default) or Clang 12 | OpenJDK 11 | +| Ubuntu 22.04 LTS (Jammy Jellyfish) | x86_64 | 3.10 | 6.0 | 3.22 | GCC 11 (default) or Clang 12 | OpenJDK 11 | +| macOS Monterey (12) | x86_64 | 3.10 | 6.0 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | +| macOS Monterey (12) | arm64 | 3.10 | 6.0 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | ⁽¹⁾ CPython is the only Python implementation supported. From 2a72e8f3d7e5a1cb9c52f1ae2212dd6406877aa2 Mon Sep 17 00:00:00 2001 From: William Allen Date: Fri, 20 Jan 2023 13:08:13 -0500 Subject: [PATCH 11/15] Disable -no_deduplicate link flag to reduce disk space usage --- tools/skylark/drake_cc.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/skylark/drake_cc.bzl b/tools/skylark/drake_cc.bzl index 638e1d959c78..ba80d14a5e33 100644 --- a/tools/skylark/drake_cc.bzl +++ b/tools/skylark/drake_cc.bzl @@ -804,6 +804,7 @@ def drake_cc_test( args = args, deps = deps + add_deps, copts = new_copts, + features = ["-no_deduplicate"], **kwargs ) From 2f24f974a1c864d905c42d446e36cbab459fdf62 Mon Sep 17 00:00:00 2001 From: Jeremy Nimmer Date: Fri, 20 Jan 2023 13:09:06 -0800 Subject: [PATCH 12/15] flag cc_binary as well; add comments --- tools/skylark/drake_cc.bzl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/skylark/drake_cc.bzl b/tools/skylark/drake_cc.bzl index ba80d14a5e33..ff273327a42e 100644 --- a/tools/skylark/drake_cc.bzl +++ b/tools/skylark/drake_cc.bzl @@ -726,6 +726,11 @@ def drake_cc_binary( linkshared = linkshared, linkstatic = linkstatic, linkopts = linkopts, + features = [ + # We should deduplicate symbols while linking (for a ~6% reduction + # in disk use), to conserse space in CI; see #18545 for details. + "-no_deduplicate", + ], **kwargs ) @@ -804,7 +809,11 @@ def drake_cc_test( args = args, deps = deps + add_deps, copts = new_copts, - features = ["-no_deduplicate"], + features = [ + # We should deduplicate symbols while linking (for a ~6% reduction + # in disk use), to conserse space in CI; see #18545 for details. + "-no_deduplicate", + ], **kwargs ) From 7e3816c74720b21584bc65dcecb04fbe93f0ce19 Mon Sep 17 00:00:00 2001 From: William Allen Date: Mon, 23 Jan 2023 10:10:15 -0500 Subject: [PATCH 13/15] Bump Bazel version in a few more places --- .bazeliskrc | 4 ++++ CMakeLists.txt | 2 +- tools/wheel/image/provision-base.sh | 2 +- tools/workspace/drake_visualizer/image/provision.sh | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.bazeliskrc b/.bazeliskrc index 8e1631668655..5fb18181ca1c 100644 --- a/.bazeliskrc +++ b/.bazeliskrc @@ -1,3 +1,7 @@ # Keep this version number in sync with the Ubuntu deb installed by # drake/setup/ubuntu/source_distribution/install_prereqs.sh. +# +# These files should also be updated: +# drake/tools/workspace/drake_visualizer/image/provision.sh +# drake/tools/wheel/image/provision-base.sh USE_BAZEL_VERSION=6.0.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1595147323a4..0f99d83d812f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ endif() # The version passed to find_package(Bazel) should match the # minimum_bazel_version value in the call to versions.check() in WORKSPACE. -set(MINIMUM_BAZEL_VERSION 3.0) +set(MINIMUM_BAZEL_VERSION 4.0) find_package(Bazel ${MINIMUM_BAZEL_VERSION} MODULE REQUIRED) get_filename_component(C_COMPILER_REALPATH "${CMAKE_C_COMPILER}" REALPATH) diff --git a/tools/wheel/image/provision-base.sh b/tools/wheel/image/provision-base.sh index 14fa9824283e..ec4a36f170dc 100755 --- a/tools/wheel/image/provision-base.sh +++ b/tools/wheel/image/provision-base.sh @@ -5,7 +5,7 @@ set -eu -o pipefail -readonly BAZEL_VERSION=5.1.0 +readonly BAZEL_VERSION=6.0.0 readonly BAZEL_ROOT=https://github.com/bazelbuild/bazel/releases/download # Fix ssh permissions. diff --git a/tools/workspace/drake_visualizer/image/provision.sh b/tools/workspace/drake_visualizer/image/provision.sh index a4e45aeec5a0..1f6dc9ff0cf1 100755 --- a/tools/workspace/drake_visualizer/image/provision.sh +++ b/tools/workspace/drake_visualizer/image/provision.sh @@ -4,7 +4,7 @@ set -eu -o pipefail export DEBIAN_FRONTEND=noninteractive -readonly BAZEL_VERSION=5.1.0 +readonly BAZEL_VERSION=6.0.0 readonly BAZEL_ROOT=https://github.com/bazelbuild/bazel/releases/download # Install prerequisites. From 20a341cfccaf079881f228bb0c46c62d8c73a005 Mon Sep 17 00:00:00 2001 From: William Allen Date: Mon, 23 Jan 2023 10:17:53 -0500 Subject: [PATCH 14/15] Revert change to minimum version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f99d83d812f..1595147323a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ endif() # The version passed to find_package(Bazel) should match the # minimum_bazel_version value in the call to versions.check() in WORKSPACE. -set(MINIMUM_BAZEL_VERSION 4.0) +set(MINIMUM_BAZEL_VERSION 3.0) find_package(Bazel ${MINIMUM_BAZEL_VERSION} MODULE REQUIRED) get_filename_component(C_COMPILER_REALPATH "${CMAKE_C_COMPILER}" REALPATH) From 0f27cb3851af7a1fc38961ca90765b0a49090ead Mon Sep 17 00:00:00 2001 From: Jeremy Nimmer Date: Mon, 23 Jan 2023 08:14:24 -0800 Subject: [PATCH 15/15] fixup! typo --- tools/skylark/drake_cc.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/skylark/drake_cc.bzl b/tools/skylark/drake_cc.bzl index ff273327a42e..b657b337e948 100644 --- a/tools/skylark/drake_cc.bzl +++ b/tools/skylark/drake_cc.bzl @@ -728,7 +728,7 @@ def drake_cc_binary( linkopts = linkopts, features = [ # We should deduplicate symbols while linking (for a ~6% reduction - # in disk use), to conserse space in CI; see #18545 for details. + # in disk use), to conserve space in CI; see #18545 for details. "-no_deduplicate", ], **kwargs @@ -811,7 +811,7 @@ def drake_cc_test( copts = new_copts, features = [ # We should deduplicate symbols while linking (for a ~6% reduction - # in disk use), to conserse space in CI; see #18545 for details. + # in disk use), to conserve space in CI; see #18545 for details. "-no_deduplicate", ], **kwargs