-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workspace] Build IPOPT from source on Ubuntu
On Ubuntu, this is an upgrade from 3.11.9 to 3.14.12. On Ubuntu, we can now remove ipopt from the prereqs setup and skip it during wheel builds. It's licensed as EPL-2.0 so we can statically link it but we do need to distribute a patch file with our changes. We also teach vendor_cxx about gentler option for vendoring, where we only hide the symbols without prefixing them with "drake_vendor". On macOS, Homebrew usually tracks the newest upstream version so the urgency of rebuilding from source is reduced. Building from source would still help with linker issues, but since there is no MUMPS package in Homebrew the work to make it happen is not yet worth the time investment.
- Loading branch information
1 parent
8ecb82d
commit af49eb3
Showing
24 changed files
with
853 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
coinor-libclp1 | ||
coinor-libcoinutils3v5 | ||
coinor-libipopt1v5 | ||
default-jre | ||
jupyter-notebook | ||
libblas3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
coinor-libclp1 | ||
coinor-libcoinutils3v5 | ||
coinor-libipopt1v5 | ||
default-jre | ||
jupyter-notebook | ||
libblas-dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
clang-format-12 | ||
coinor-libclp-dev | ||
coinor-libcoinutils-dev | ||
coinor-libipopt-dev | ||
default-jdk | ||
file | ||
gfortran | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
clang-format-12 | ||
coinor-libclp-dev | ||
coinor-libcoinutils-dev | ||
coinor-libipopt-dev | ||
default-jdk | ||
file | ||
gfortran | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# This file exists to make our directory into a Bazel package, so that our | ||
# neighboring *.bzl file can be loaded elsewhere. | ||
|
||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
|
||
add_lint_tests() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
load( | ||
"@drake//tools/workspace:pkg_config.bzl", | ||
"pkg_config_repository", | ||
) | ||
load("@drake//tools/workspace:os.bzl", "os_specific_alias_repository") | ||
|
||
def ipopt_repository( | ||
name, | ||
licenses = [ | ||
"reciprocal", # CPL-1.0 | ||
"unencumbered", # Public-Domain | ||
], | ||
modname = "ipopt", | ||
pkg_config_paths = [], | ||
homebrew_subdir = "opt/ipopt/lib/pkgconfig", | ||
**kwargs): | ||
pkg_config_repository( | ||
# How we build IPOPT depends on which platform we're on. | ||
def ipopt_repository(name): | ||
os_specific_alias_repository( | ||
name = name, | ||
licenses = licenses, | ||
modname = modname, | ||
pkg_config_paths = pkg_config_paths, | ||
**kwargs | ||
mapping = { | ||
"macOS default": [ | ||
"ipopt=@ipopt_internal_pkgconfig//:ipopt_internal_pkgconfig", | ||
"install=@ipopt_internal_pkgconfig//:install", | ||
], | ||
"Ubuntu default": [ | ||
"ipopt=@ipopt_internal_fromsource//:ipopt", | ||
"install=@ipopt_internal_fromsource//:install", | ||
], | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
load("@drake//tools/skylark:drake_py.bzl", "drake_py_unittest") | ||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
|
||
drake_py_unittest( | ||
name = "lint_test", | ||
data = [ | ||
":package.BUILD.bazel", | ||
"//tools/wheel:image/dependencies/projects.cmake", | ||
"@ipopt_internal_fromsource//:drake_repository_metadata.json", | ||
"@ipopt_internal_fromsource//:src/Makefile.am", | ||
], | ||
tags = ["lint"], | ||
) | ||
|
||
add_lint_tests() |
Oops, something went wrong.