Macaulay2 / homebrew-tap

The Macaulay2 tap for Homebrew
7 stars 6 forks source link

Reduce dependencies of M2 #52

Open mahrud opened 3 years ago

mahrud commented 3 years ago

Currently:

==> Dependencies
Build: autoconf ✔, automake ✔, bison ✔, cmake ✔, libtool ✔, ninja ✔, pkg-config ✔
Required: bdw-gc ✔, boost ✔, eigen ✔, factory@4.1.3 ✔, fflas-ffpack ✔, flint@2.6.3 ✔, frobby ✔, gdbm ✔, givaro ✔, glpk ✔, gmp ✔, libatomic_ops ✔, libxml2 ✔, mathic ✔, mathicgb ✔, memtailor ✔, mpfr ✔, mpsolve ✔, ntl ✔, openblas@0.3.13 ✔, readline ✔
Recommended: cddlib@0.94k ✔, cohomcalg ✔, csdp ✔, fourtitwo ✔, gfan ✔, lrs ✔, nauty ✔, normaliz ✔, topcom ✔
Optional: tbb ✘

Some can become build dependencies, like eigen and fflas-ffpack, some like cddlib can be entirely removed. It might be good to statically link larger dependencies (like boost, openblas) and make them build dependencies.

ps: tbb is optional because it introduced a dependency on gcc, which caused some issues. Would be good to make it a recommended build dependency for both M2 and mathicgb again.

mahrud commented 3 years ago

Based on the current dependency tree, the dependencies with the most number of dependencies are: openblas, libxml2, tbb, boost.

[mahrud@noether homebrew-tap]$ brew deps --tree M2
macaulay2/tap/macaulay2
├── bdw-gc
├── boost
│   ├── bzip2
│   └── zlib
├── eigen
├── factory
│   ├── flint
│   │   ├── gmp
│   │   ├── mpfr
│   │   │   └── gmp
│   │   └── ntl
│   │       └── gmp
│   ├── gmp
│   └── ntl
│       └── gmp
├── fflas-ffpack
│   ├── givaro
│   │   └── gmp
│   ├── gmp
│   └── openblas@0.3.13
│       └── gcc@9
│           ├── gmp
│           ├── isl
│           │   └── gmp
│           ├── libmpc
│           │   ├── gmp
│           │   └── mpfr
│           │       └── gmp
│           ├── mpfr
│           │   └── gmp
│           ├── zlib
│           └── binutils
│               └── zlib
├── flint
│   ├── gmp
│   ├── mpfr
│   │   └── gmp
│   └── ntl
│       └── gmp
├── frobby
│   └── gmp
├── gdbm
├── givaro
│   └── gmp
├── gmp
├── libatomic_ops
├── libxml2
│   ├── python@3.9
│   │   ├── gdbm
│   │   ├── openssl@1.1
│   │   ├── readline
│   │   │   └── ncurses
│   │   ├── sqlite
│   │   │   ├── readline
│   │   │   │   └── ncurses
│   │   │   └── zlib
│   │   ├── xz
│   │   ├── bzip2
│   │   ├── libffi
│   │   ├── ncurses
│   │   ├── unzip
│   │   │   └── bzip2
│   │   └── zlib
│   ├── readline
│   │   └── ncurses
│   └── zlib
├── mathic
│   └── memtailor
├── mathicgb
│   ├── mathic
│   │   └── memtailor
│   └── memtailor
├── memtailor
├── mpfr
│   └── gmp
├── mpsolve
│   ├── gmp
│   └── mpfr
│       └── gmp
├── ntl
│   └── gmp
├── openblas@0.3.13
│   └── gcc@9
│       ├── gmp
│       ├── isl
│       │   └── gmp
│       ├── libmpc
│       │   ├── gmp
│       │   └── mpfr
│       │       └── gmp
│       ├── mpfr
│       │   └── gmp
│       ├── zlib
│       └── binutils
│           └── zlib
├── readline
│   └── ncurses
├── cohomcalg
├── csdp
│   └── openblas@0.3.13
│       └── gcc@9
│           ├── gmp
│           ├── isl
│           │   └── gmp
│           ├── libmpc
│           │   ├── gmp
│           │   └── mpfr
│           │       └── gmp
│           ├── mpfr
│           │   └── gmp
│           ├── zlib
│           └── binutils
│               └── zlib
├── fourtitwo
│   ├── glpk
│   │   └── gmp
│   └── gmp
├── gfan
│   ├── cddlib@0.94
│   │   └── gmp
│   └── gmp
├── lrs
│   └── gmp
├── nauty
├── normaliz
│   ├── boost
│   │   ├── bzip2
│   │   └── zlib
│   ├── gmp
│   └── nauty
├── tbb
│   └── python@3.9
│       ├── gdbm
│       ├── openssl@1.1
│       ├── readline
│       │   └── ncurses
│       ├── sqlite
│       │   ├── readline
│       │   │   └── ncurses
│       │   └── zlib
│       ├── xz
│       ├── bzip2
│       ├── libffi
│       ├── ncurses
│       ├── unzip
│       │   └── bzip2
│       └── zlib
└── topcom
    ├── cddlib@0.94
    │   └── gmp
    └── gmp
DanGrayson commented 3 years ago

That's a cool graph!

slel commented 2 years ago

Any chance to use some bits from a brew-installed Singular?

slel commented 2 years ago

The boost issue that lead to pinning boost to 1.76 is now closed:

Does this mean boost can be unpinned here now?

mahrud commented 2 years ago

Any chance to use some bits from a brew-installed Singular?

If you can figure out how to made dependencies conditional on what bottles are installed that would be nice. Otherwise, it's pretty safe to just ignore brew's warnings that some factory or singular files are getting replaced ..

Does this mean boost can be unpinned here now?

Sure, though I'm not particularly in a rush.