diff --git a/setup/mac/binary_distribution/Brewfile b/setup/mac/binary_distribution/Brewfile index ce2fa9bc95d7..825e69846296 100644 --- a/setup/mac/binary_distribution/Brewfile +++ b/setup/mac/binary_distribution/Brewfile @@ -5,7 +5,6 @@ tap 'robotlocomotion/director' cask 'adoptopenjdk' unless system '/usr/libexec/java_home --version 1.8+ --failfast &> /dev/null' -brew 'clp' brew 'cmake' brew 'double-conversion' brew 'eigen' diff --git a/setup/ubuntu/binary_distribution/packages-focal.txt b/setup/ubuntu/binary_distribution/packages-focal.txt index d6f518585830..c8d422ec6f32 100644 --- a/setup/ubuntu/binary_distribution/packages-focal.txt +++ b/setup/ubuntu/binary_distribution/packages-focal.txt @@ -1,4 +1,3 @@ -coinor-libclp1 coinor-libcoinutils3v5 default-jre jupyter-notebook diff --git a/setup/ubuntu/binary_distribution/packages-jammy.txt b/setup/ubuntu/binary_distribution/packages-jammy.txt index a56259cca8fc..0eb2f33dbf3d 100644 --- a/setup/ubuntu/binary_distribution/packages-jammy.txt +++ b/setup/ubuntu/binary_distribution/packages-jammy.txt @@ -1,4 +1,3 @@ -coinor-libclp1 coinor-libcoinutils3v5 default-jre jupyter-notebook diff --git a/setup/ubuntu/source_distribution/packages-focal.txt b/setup/ubuntu/source_distribution/packages-focal.txt index 2fcb1da9f5c5..16ada4a36833 100644 --- a/setup/ubuntu/source_distribution/packages-focal.txt +++ b/setup/ubuntu/source_distribution/packages-focal.txt @@ -1,5 +1,4 @@ clang-format-12 -coinor-libclp-dev coinor-libcoinutils-dev default-jdk file diff --git a/setup/ubuntu/source_distribution/packages-jammy.txt b/setup/ubuntu/source_distribution/packages-jammy.txt index a4b9e3841d37..f99f4249bfe1 100644 --- a/setup/ubuntu/source_distribution/packages-jammy.txt +++ b/setup/ubuntu/source_distribution/packages-jammy.txt @@ -1,5 +1,4 @@ clang-format-12 -coinor-libclp-dev coinor-libcoinutils-dev default-jdk file diff --git a/solvers/BUILD.bazel b/solvers/BUILD.bazel index dc6df9d1dec6..1c445ead01b4 100644 --- a/solvers/BUILD.bazel +++ b/solvers/BUILD.bazel @@ -881,7 +881,7 @@ drake_cc_variant_library( ":mathematical_program", ], deps_enabled = [ - "@clp", + "@clp_internal//:clp", "//common:unused", "//math:autodiff", ], diff --git a/tools/install/libdrake/BUILD.bazel b/tools/install/libdrake/BUILD.bazel index 13091d7deb3a..565d63219b49 100644 --- a/tools/install/libdrake/BUILD.bazel +++ b/tools/install/libdrake/BUILD.bazel @@ -127,17 +127,6 @@ install( ], ) -# Depend on CLP's shared library iff CLP is enabled. -cc_library( - name = "clp_deps", - deps = select({ - "//conditions:default": [ - "@clp", - ], - "//tools:no_clp": [], - }), -) - # Depend on IPOPT's shared library iff IPOPT is enabled and we're on a platform # that uses the host OS shared library. selects.config_setting_group( @@ -237,7 +226,6 @@ cc_library( cc_library( name = "libdrake_runtime_so_deps", deps = [ - ":clp_deps", ":gurobi_deps", ":ipopt_deps", ":mosek_deps", diff --git a/tools/wheel/image/dependencies/projects.cmake b/tools/wheel/image/dependencies/projects.cmake index 4797edbbf181..b91c295ecc1d 100644 --- a/tools/wheel/image/dependencies/projects.cmake +++ b/tools/wheel/image/dependencies/projects.cmake @@ -76,20 +76,6 @@ set(lapack_url "https://github.com/Reference-LAPACK/lapack/archive/v${lapack_ver set(lapack_md5 "d70fc27a8bdebe00481c97c728184f09") list(APPEND ALL_PROJECTS lapack) -# coinutils -set(coinutils_version 2.11.4) -set(coinutils_url "https://github.com/coin-or/CoinUtils/archive/refs/tags/releases/${coinutils_version}.tar.gz") -set(coinutils_md5 "dcdb2a327344014de9d8b050575fa90b") -set(coinutils_dlname "coinutils-${coinutils_version}.tar.gz") -list(APPEND ALL_PROJECTS coinutils) - -# clp -set(clp_version 1.17.5) -set(clp_url "https://github.com/coin-or/Clp/archive/refs/tags/releases/${clp_version}.tar.gz") -set(clp_md5 "f7c25af22d2f03398cbbdf38c8b4f6fd") -set(clp_dlname "clp-${clp_version}.tar.gz") -list(APPEND ALL_PROJECTS clp) - # ipopt (requires mumps) if(APPLE) set(mumps_version 5.4.1) # Latest available in Ubuntu. diff --git a/tools/wheel/image/dependencies/projects/clp.cmake b/tools/wheel/image/dependencies/projects/clp.cmake deleted file mode 100644 index 910581e8b4e9..000000000000 --- a/tools/wheel/image/dependencies/projects/clp.cmake +++ /dev/null @@ -1,19 +0,0 @@ -ExternalProject_Add(clp - URL ${clp_url} - URL_MD5 ${clp_md5} - DOWNLOAD_NAME ${clp_dlname} - DEPENDS coinutils - ${COMMON_EP_ARGS} - BUILD_IN_SOURCE 1 - CONFIGURE_COMMAND ./configure - --prefix=${CMAKE_INSTALL_PREFIX} - --disable-shared - CFLAGS=-fPIC - CXXFLAGS=-fPIC - BUILD_COMMAND make - INSTALL_COMMAND make install - ) - -extract_license(clp - Clp/LICENSE -) diff --git a/tools/wheel/image/dependencies/projects/coinutils.cmake b/tools/wheel/image/dependencies/projects/coinutils.cmake deleted file mode 100644 index 5e6bac12fb33..000000000000 --- a/tools/wheel/image/dependencies/projects/coinutils.cmake +++ /dev/null @@ -1,18 +0,0 @@ -ExternalProject_Add(coinutils - URL ${coinutils_url} - URL_MD5 ${coinutils_md5} - DOWNLOAD_NAME ${coinutils_dlname} - ${COMMON_EP_ARGS} - BUILD_IN_SOURCE 1 - CONFIGURE_COMMAND ./configure - --prefix=${CMAKE_INSTALL_PREFIX} - --disable-shared - CFLAGS=-fPIC - CXXFLAGS=-fPIC - BUILD_COMMAND make - INSTALL_COMMAND make install - ) - -extract_license(coinutils - CoinUtils/LICENSE -) diff --git a/tools/workspace/BUILD.bazel b/tools/workspace/BUILD.bazel index 3d60d3b5e66c..a609d2dfc6b9 100644 --- a/tools/workspace/BUILD.bazel +++ b/tools/workspace/BUILD.bazel @@ -47,6 +47,8 @@ drake_py_binary( srcs = ["vendor_cxx.py"], visibility = [ # These should all be of the form "@foo_internal//:__subpackages__". + "@clp_internal//:__subpackages__", + "@coinutils_internal//:__subpackages__", "@conex_internal//:__subpackages__", "@fcl_internal//:__subpackages__", "@gz_math_internal//:__subpackages__", @@ -79,6 +81,8 @@ drake_py_binary( _DRAKE_EXTERNAL_PACKAGE_INSTALLS = ["@%s//:install" % p for p in [ "ccd_internal", + "clp_internal", + "coinutils_internal", "com_jidesoft_jide_oss", "common_robotics_utilities", "commons_io", diff --git a/tools/workspace/clp/repository.bzl b/tools/workspace/clp/repository.bzl index 5500d79a7cf9..20074d74b46a 100644 --- a/tools/workspace/clp/repository.bzl +++ b/tools/workspace/clp/repository.bzl @@ -18,5 +18,6 @@ def clp_repository( modname = modname, pkg_config_paths = pkg_config_paths, homebrew_subdir = homebrew_subdir, + extra_deprecation = "The @clp external is deprecated in Drake's WORKSPACE and will be removed on or after 2023-12-01.", # noqa **kwargs ) diff --git a/tools/workspace/clp_internal/BUILD.bazel b/tools/workspace/clp_internal/BUILD.bazel new file mode 100644 index 000000000000..2f1fbb2f7891 --- /dev/null +++ b/tools/workspace/clp_internal/BUILD.bazel @@ -0,0 +1,12 @@ +load("//tools/lint:lint.bzl", "add_lint_tests") + +filegroup( + name = "patches", + srcs = glob( + ["patches/**"], + allow_empty = True, + ), + visibility = ["//visibility:public"], +) + +add_lint_tests() diff --git a/tools/workspace/clp_internal/package.BUILD.bazel b/tools/workspace/clp_internal/package.BUILD.bazel new file mode 100644 index 000000000000..7aff2075a4a4 --- /dev/null +++ b/tools/workspace/clp_internal/package.BUILD.bazel @@ -0,0 +1,166 @@ +# -*- bazel -*- + +load( + "@drake//tools/install:install.bzl", + "install", +) +load( + "@drake//tools/workspace/coinutils_internal:defs.bzl", + "coin_cc_library", +) + +licenses(["reciprocal"]) # EPL-2.0 + +package(default_visibility = ["//visibility:private"]) + +exports_files([ + # Always provide access to license texts. + "LICENSE", +]) + +_HDRS = glob( + [ + "Clp/src/*.h", + "Clp/src/*.hpp", + ], + exclude = [ + "**/config*", + "**/*Config.h", + ], + allow_empty = False, +) + +_SRCS = glob( + [ + "Clp/src/*.cpp", + ], + exclude = [ + "**/ClpMain*", + # We treat COIN_HAS_ABC as OFF. + "**/Abc*", + "**/CoinAbc*", + # We treat COIN_HAS_AMD, COIN_HAS_CHOLMOD, and COIN_HAS_GLPK as OFF. + "**/ClpCholeskyUfl*", + # We treat COIN_HAS_MUMPS as OFF. + # TODO(jwnimmer-tri) We can probably enable this. I've left it off for + # now only out of inertia -- Ubuntu builds CLP without MUMPS. + "**/ClpCholeskyMumps*", + # We treat COIN_HAS_WSMP as OFF. + "**/ClpCholeskyWssmp*", + ], + allow_empty = False, +) + +_AUTOCONF_DEFINES = [ + "CLP_VERSION=\"drake_vendor\"", + "PACKAGE_VERSION=\"drake_vendor\"", + "VERSION=\"drake_vendor\"", + # Features of the standard library and/or host system. + "HAVE_CFLOAT=1", + "HAVE_CMATH=1", + "HAVE_FLOAT_H=1", + "HAVE_INTTYPES_H=1", + "HAVE_MATH_H=1", + "HAVE_STDINT_H=1", + "HAVE_STDLIB_H=1", + "HAVE_STRINGS_H=1", + "HAVE_STRING_H=1", + "HAVE_SYS_STAT_H=1", + "HAVE_SYS_TYPES_H=1", + "HAVE_UNISTD_H=1", + "STDC_HEADERS=1", + # Optional dependencies that we do actually want to use. + "COIN_HAS_BLAS=1", + "COIN_HAS_COINUTILS=1", + # No debug self-checks (the default). + "COIN_CLP_CHECKLEVEL=0", + "COIN_CLP_VERBOSITY=0", + # These are no-ops, but they can't be omitted. + "CLP_VERSION_MAJOR", + "CLP_VERSION_MINOR", + "CLP_VERSION_RELEASE", +] + +_AUTOCONF_UNDEFINES = [ + # Don't use these features of the standard library and/or host system. + "F77_DUMMY_MAIN", + "F77_FUNC_", + "FC_DUMMY_MAIN_EQ_F77", + "HAVE_CIEEEFP", + "HAVE_DLFCN_H", + "HAVE_IEEEFP_H", + "HAVE_MEMORY_H", + # TODO(jwnimmer-tri) We can probably enable this. I've left it off for now + # only out of inertia -- Ubuntu builds CLP without MUMPS. + "COIN_HAS_MUMPS", + # Optional dependencies that we don't use. + "CLP_HAS_ABC", + "COIN_HAS_AMD", + "COIN_HAS_ASL", + "COIN_HAS_CHOLMOD", + "COIN_HAS_GLPK", + "COIN_HAS_NETLIB", + "COIN_HAS_OSI", + "COIN_HAS_OSITESTS", + "COIN_HAS_READLINE", + "COIN_HAS_SAMPLE", + "COIN_HAS_WSMP", + "HAVE_READLINE_READLINE_H", + # Chaff. + "CLP_SVN_REV", + "PACKAGE", + "PACKAGE_BUGREPORT", + "PACKAGE_NAME", + "PACKAGE_STRING", + "PACKAGE_TARNAME", + # This is actually used by the C++ code, but autoconf_configure_file can't + # handle it. We'll use _CONFIG_PRIVATE_DEFINES for this instead, below. + "F77_FUNC", +] + +_CONFIG_PRIVATE_DEFINES = [ + "F77_FUNC(name,NAME)=name##_", + # This is consistent with a bespoke definition in the upstream Makefile.am. + # This definition is somehow not provided by autoconf. + "COIN_HAS_CLP=1", +] + +_INCLUDES = [ + "Clp/src/", +] + +coin_cc_library( + name = "clp", + config_h = "ClpConfig.h", + config_h_public = "Clp/src/config_clp_default.h", + config_h_private = "Clp/src/config.h.in", + autoconf_defines = _AUTOCONF_DEFINES, + autoconf_undefines = _AUTOCONF_UNDEFINES, + config_private_defines = _CONFIG_PRIVATE_DEFINES, + hdrs_public = _HDRS, + includes_public = _INCLUDES, + hdrs_private = _HDRS, + includes_private = _INCLUDES, + srcs = _SRCS, + vendor_tool_args = ["--no-inline-namespace"], + output_vendoring_patch = "drake_clp.patch", + deps = [ + "@coinutils_internal//:coinutils", + ], + visibility = ["//visibility:public"], +) + +install( + name = "install", + docs = [ + "LICENSE", + # We must redistribute our code changes, per Clp EPL-2.0 license. + ":drake_clp.patch", + "@drake//tools/workspace/clp_internal:patches", + ], + allowed_externals = [ + "@drake//tools/workspace/clp_internal:patches", + ], + doc_strip_prefix = ["patches"], + visibility = ["//visibility:public"], +) diff --git a/tools/workspace/clp_internal/patches/missing_include.patch b/tools/workspace/clp_internal/patches/missing_include.patch new file mode 100644 index 000000000000..4d81c716ddad --- /dev/null +++ b/tools/workspace/clp_internal/patches/missing_include.patch @@ -0,0 +1,12 @@ +[clp] Add missing include for COIN_DBL_MAX + +--- Clp/src/CbcOrClpParam.cpp ++++ Clp/src/CbcOrClpParam.cpp +@@ -3,6 +3,7 @@ + // Corporation and others. All Rights Reserved. + // This code is licensed under the terms of the Eclipse Public License (EPL). + ++#include "CoinFinite.hpp" + #include "CoinPragma.hpp" + #include "CoinTime.hpp" + #include "CbcOrClpParam.hpp" diff --git a/tools/workspace/clp_internal/repository.bzl b/tools/workspace/clp_internal/repository.bzl new file mode 100644 index 000000000000..bf360a3a8c86 --- /dev/null +++ b/tools/workspace/clp_internal/repository.bzl @@ -0,0 +1,19 @@ +load( + "@drake//tools/workspace:github.bzl", + "github_archive", +) + +def clp_internal_repository( + name, + mirrors = None): + github_archive( + name = name, + repository = "coin-or/Clp", + commit = "releases/1.17.8", + sha256 = "f9931b5ba44f0daf445c6b48fc2c250dc12e667e59ace8ea7b025f158fe31556", # noqa + build_file = ":package.BUILD.bazel", + patches = [ + ":patches/missing_include.patch", + ], + mirrors = mirrors, + ) diff --git a/tools/workspace/coinutils_internal/BUILD.bazel b/tools/workspace/coinutils_internal/BUILD.bazel index cc90ff2e7c04..2f1fbb2f7891 100644 --- a/tools/workspace/coinutils_internal/BUILD.bazel +++ b/tools/workspace/coinutils_internal/BUILD.bazel @@ -1,7 +1,12 @@ load("//tools/lint:lint.bzl", "add_lint_tests") -add_lint_tests() +filegroup( + name = "patches", + srcs = glob( + ["patches/**"], + allow_empty = True, + ), + visibility = ["//visibility:public"], +) -# TODO(jwnimmer-tri) In the future, we anticipate adding coinutils as an actual -# workspace dependency. For now, this is just a convenient place to store some -# COIN-OR related Bazel macros. +add_lint_tests() diff --git a/tools/workspace/coinutils_internal/defs.bzl b/tools/workspace/coinutils_internal/defs.bzl index e183353c8254..11b5f54df99a 100644 --- a/tools/workspace/coinutils_internal/defs.bzl +++ b/tools/workspace/coinutils_internal/defs.bzl @@ -179,7 +179,7 @@ def coin_cc_library( srcs = [upstream_src, vendor_src], outs = [vendor_src + ".patch"], cmd = " ".join([ - "(diff -u0", + "(diff -U0", "--label={upstream_src} $(execpath {upstream_src})", "--label={vendor_src} $(execpath {vendor_src})", "> $@ || [[ $$? == 1 ]])", diff --git a/tools/workspace/coinutils_internal/package.BUILD.bazel b/tools/workspace/coinutils_internal/package.BUILD.bazel new file mode 100644 index 000000000000..b043cee89a55 --- /dev/null +++ b/tools/workspace/coinutils_internal/package.BUILD.bazel @@ -0,0 +1,157 @@ +# -*- bazel -*- + +load( + "@drake//tools/install:install.bzl", + "install", +) +load( + "@drake//tools/workspace/coinutils_internal:defs.bzl", + "coin_cc_library", +) + +licenses(["reciprocal"]) # EPL-2.0 + +package(default_visibility = ["//visibility:private"]) + +exports_files([ + # Always provide access to license texts. + "LICENSE", +]) + +_HDRS = glob( + [ + "CoinUtils/src/*.hpp", + "CoinUtils/src/*.h", + ], + exclude = [ + "**/config*", + "**/*Config.h", + ], + allow_empty = False, +) + +_SRCS = glob( + [ + "CoinUtils/src/*.cpp", + ], + allow_empty = False, +) + +_AUTOCONF_DEFINES = [ + "COINUTILS_VERSION=\"drake_vendor\"", + "PACKAGE_VERSION=\"drake_vendor\"", + "VERSION=\"drake_vendor\"", + # Features of the standard library and/or host system. + "COINUTILS_HAS_CSTDINT=1", + "COINUTILS_HAS_STDINT_H=1", + "COIN_C_FINITE=std::isfinite", + "COIN_C_ISNAN=std::isnan", + "COIN_INT64_T=int64_t", + "COIN_INTPTR_T=intptr_t", + "COIN_UINT64_T=uint64_t", + "HAVE_CFLOAT=1", + "HAVE_CINTTYPES=1", + "HAVE_CMATH=1", + "HAVE_CSTDINT=1", + "HAVE_FLOAT_H=1", + "HAVE_INTTYPES_H=1", + "HAVE_MATH_H=1", + "HAVE_STDINT_H=1", + "HAVE_STDLIB_H=1", + "HAVE_STRINGS_H=1", + "HAVE_STRING_H=1", + "HAVE_SYS_STAT_H=1", + "HAVE_SYS_TYPES_H=1", + "HAVE_UNISTD_H=1", + "STDC_HEADERS=1", + # Optional dependencies that we do actually want to use. + "COIN_HAS_BLAS=1", + "COIN_HAS_LAPACK=1", + # No debug self-checks (the default). + "COIN_COINUTILS_CHECKLEVEL=0", + "COIN_COINUTILS_VERBOSITY=0", +] + +_AUTOCONF_UNDEFINES = [ + # Don't use these features of the standard library and/or host system. + "COINUTILS_PTHREADS", + "F77_DUMMY_MAIN", + "F77_FUNC_", + "FC_DUMMY_MAIN_EQ_F77", + "HAVE_CIEEEFP", + "HAVE_DLFCN_H", + "HAVE_ENDIAN_H", + "HAVE_IEEEFP_H", + "HAVE_MEMORY_H", + "HAVE_WINDOWS_H", + # Optional dependencies that we don't use. + "COIN_HAS_BZLIB", + "COIN_HAS_GLPK", + "COIN_HAS_NETLIB", + "COIN_HAS_READLINE", + "COIN_HAS_SAMPLE", + "COIN_HAS_ZLIB", + "HAVE_BZLIB_H", + "HAVE_READLINE_READLINE_H", + "HAVE_ZLIB_H", + # Don't use internal memory pooling; libc pooling will suffice. + "COINUTILS_MEMPOOL_MAXPOOLED", + "COINUTILS_MEMPOOL_OVERRIDE_NEW", + # Chaff. + "COINUTILS_SVN_REV", + "COINUTILS_VERSION_MAJOR", + "COINUTILS_VERSION_MINOR", + "COINUTILS_VERSION_RELEASE", + "PACKAGE", + "PACKAGE_BUGREPORT", + "PACKAGE_NAME", + "PACKAGE_STRING", + "PACKAGE_TARNAME", + "SIZEOF_INT", + "SIZEOF_INT_P", + "SIZEOF_LONG", + "SIZEOF_LONG_LONG", + # This is actually used by the C++ code, but autoconf_configure_file can't + # handle it. We'll use _CONFIG_PRIVATE_DEFINES for this instead, below. + "F77_FUNC", +] + +_CONFIG_PRIVATE_DEFINES = [ + "F77_FUNC(name,NAME)=name##_", +] + +_INCLUDES = [ + "CoinUtils/src/", +] + +coin_cc_library( + name = "coinutils", + config_h = "CoinUtilsConfig.h", + config_h_public = "CoinUtils/src/config_coinutils_default.h", + config_h_private = "CoinUtils/src/config.h.in", + autoconf_defines = _AUTOCONF_DEFINES, + autoconf_undefines = _AUTOCONF_UNDEFINES, + config_private_defines = _CONFIG_PRIVATE_DEFINES, + hdrs_public = _HDRS, + includes_public = _INCLUDES, + hdrs_private = _HDRS, + includes_private = _INCLUDES, + srcs = _SRCS, + vendor_tool_args = ["--no-inline-namespace"], + output_vendoring_patch = "drake_coinutils.patch", + visibility = ["//visibility:public"], +) + +install( + name = "install", + docs = [ + "LICENSE", + # We must redistribute our code changes, per CoinUtils EPL-2.0 license. + ":drake_coinutils.patch", + "@drake//tools/workspace/coinutils_internal:patches", + ], + allowed_externals = [ + "@drake//tools/workspace/coinutils_internal:patches", + ], + visibility = ["//visibility:public"], +) diff --git a/tools/workspace/coinutils_internal/repository.bzl b/tools/workspace/coinutils_internal/repository.bzl new file mode 100644 index 000000000000..9c91f0afb3e0 --- /dev/null +++ b/tools/workspace/coinutils_internal/repository.bzl @@ -0,0 +1,16 @@ +load( + "@drake//tools/workspace:github.bzl", + "github_archive", +) + +def coinutils_internal_repository( + name, + mirrors = None): + github_archive( + name = name, + repository = "coin-or/CoinUtils", + commit = "releases/2.11.9", + sha256 = "15d572ace4cd3b7c8ce117081b65a2bd5b5a4ebaba54fadc99c7a244160f88b8", # noqa + build_file = ":package.BUILD.bazel", + mirrors = mirrors, + ) diff --git a/tools/workspace/default.bzl b/tools/workspace/default.bzl index 6250676c8b90..829975373b60 100644 --- a/tools/workspace/default.bzl +++ b/tools/workspace/default.bzl @@ -8,6 +8,8 @@ load("@drake//tools/workspace/cc:repository.bzl", "cc_repository") load("@drake//tools/workspace/ccd_internal:repository.bzl", "ccd_internal_repository") # noqa load("@drake//tools/workspace/clang_cindex_python3_internal:repository.bzl", "clang_cindex_python3_internal_repository") # noqa load("@drake//tools/workspace/clp:repository.bzl", "clp_repository") +load("@drake//tools/workspace/clp_internal:repository.bzl", "clp_internal_repository") # noqa +load("@drake//tools/workspace/coinutils_internal:repository.bzl", "coinutils_internal_repository") # noqa load("@drake//tools/workspace/com_jidesoft_jide_oss:repository.bzl", "com_jidesoft_jide_oss_repository") # noqa load("@drake//tools/workspace/common_robotics_utilities:repository.bzl", "common_robotics_utilities_repository") # noqa load("@drake//tools/workspace/commons_io:repository.bzl", "commons_io_repository") # noqa @@ -132,7 +134,13 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS): if "clang_cindex_python3_internal" not in excludes: clang_cindex_python3_internal_repository(name = "clang_cindex_python3_internal", mirrors = mirrors) # noqa if "clp" not in excludes: + # The @clp external is deprecated in Drake's WORKSPACE and will be + # removed on or after 2023-12-01. clp_repository(name = "clp") + if "clp_internal" not in excludes: + clp_internal_repository(name = "clp_internal", mirrors = mirrors) + if "coinutils_internal" not in excludes: + coinutils_internal_repository(name = "coinutils_internal", mirrors = mirrors) # noqa if "com_jidesoft_jide_oss" not in excludes: com_jidesoft_jide_oss_repository(name = "com_jidesoft_jide_oss", mirrors = mirrors) # noqa if "common_robotics_utilities" not in excludes: diff --git a/tools/workspace/ipopt_internal_fromsource/BUILD.bazel b/tools/workspace/ipopt_internal_fromsource/BUILD.bazel index 0ee18c093828..04c63f752f9d 100644 --- a/tools/workspace/ipopt_internal_fromsource/BUILD.bazel +++ b/tools/workspace/ipopt_internal_fromsource/BUILD.bazel @@ -1,6 +1,15 @@ load("@drake//tools/skylark:drake_py.bzl", "drake_py_unittest") load("//tools/lint:lint.bzl", "add_lint_tests") +filegroup( + name = "patches", + srcs = glob( + ["patches/**"], + allow_empty = True, + ), + visibility = ["//visibility:public"], +) + drake_py_unittest( name = "lint_test", data = [ diff --git a/tools/workspace/ipopt_internal_fromsource/package.BUILD.bazel b/tools/workspace/ipopt_internal_fromsource/package.BUILD.bazel index 819c7c4035fc..57847fd2766d 100644 --- a/tools/workspace/ipopt_internal_fromsource/package.BUILD.bazel +++ b/tools/workspace/ipopt_internal_fromsource/package.BUILD.bazel @@ -260,10 +260,8 @@ _AUTOCONF_DEFINES = [ "IPOPT_VERSION=\"drake_vendor\"", # Features of the standard library and/or host system. "HAVE_CFLOAT=1", - "HAVE_CIEEEFP=1", "HAVE_CMATH=1", "HAVE_FLOAT_H=1", - "HAVE_IEEEFP_H=1", "HAVE_INTTYPES_H=1", "HAVE_MATH_H=1", "HAVE_STDINT_H=1", @@ -296,6 +294,8 @@ _AUTOCONF_DEFINES = [ _AUTOCONF_UNDEFINES = [ # Don't use these features of the standard library and/or host system. + "HAVE_CIEEEFP", + "HAVE_IEEEFP_H", "CXX_NO_MINUS_C_MINUS_O", "F77_DUMMY_MAIN", "F77_FUNC", @@ -377,6 +377,10 @@ install( "LICENSE", # We must redistribute our code changes, per Ipopt's EPL-2.0 license. ":drake_ipopt.patch", + "@drake//tools/workspace/ipopt_internal_fromsource:patches", + ], + allowed_externals = [ + "@drake//tools/workspace/ipopt_internal_fromsource:patches", ], visibility = ["//visibility:public"], )