Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-ticket: Declare "optional" dependencies of packages (a package manager's suggested/recommended packages) #21700

Closed
mkoeppe opened this issue Oct 13, 2016 · 35 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Oct 13, 2016

Various packages can be built with or without the presence of some other packages.

For example, the latte_int configure script detects lrslib and lidia if they are installed, and they provide additional features. lidia is quite a big package, and so it is not clear whether it should be a dependency. (Linux package managers have the notion of suggested or recommended packages for this situation.)

GNU make's "order-only dependencies" "sound" as if they can do this, but as Jeroen explains, they can't.

Of course, the user can just work around this issue by doing sage -i lidia && sage -i latte_int (or similar invocations such as make lidia latte_int, which are sequential from left to right thanks to our top-level Makefile), but we must find a proper solution that ensures reproducible (deterministic) builds when a parallelized make is used. In particular, this is relevant after #21538, which provides ./configure --enable-lidia --enable-latte_int && MAKE=-j12 make, for which the sequential workaround is not available.

This feature can be implemented by Makefile trickery, of course. See #30560.

Tickets:

  • Make openssl an optional dependency of python3 #30560: openssl an optional dependency of python3

  • giac detects cocoa (which we have added as an experimental package)

  • pynac is able to use giac if present (but we currently explicitly disable its use)

  • latte_int is able to use lidia for one subroutine -- a huge and unmaintained package; currently it is a normal dependency

  • polymake has lots of optional dependencies

Depends on #31017

CC: @tscrim @dimpase @videlec @jhpalmieri @slel

Component: build: configure

Issue created by migration from https://trac.sagemath.org/ticket/21700

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 13, 2016

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 13, 2016

Commit: cb50fb4

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 13, 2016

Author: Matthias Koeppe

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 13, 2016

New commits:

cb50fb4latte_int: Add order-only dependencies

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 13, 2016

Changed commit from cb50fb4 to 0480c34

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 13, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

0480c34latte_int: Update SPKG.txt

@dimpase
Copy link
Member

dimpase commented Oct 13, 2016

Reviewer: Dima Pasechnik

@jdemeyer
Copy link

comment:5

Given that lrslib and lidia are libraries, they should be real dependencies.

@jdemeyer jdemeyer changed the title latte_int: Add order-only dependencies latte_int: Add dependencies Oct 14, 2016
@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 14, 2016

comment:6

They are optional for latte_int. This means that one can build latte_int with or without them.

@jdemeyer
Copy link

comment:7

Replying to @mkoeppe:

They are optional for latte_int. This means that one can build latte_int with or without them.

That is an argument for not adding those dependencies. It's not an argument for adding them as order-only dependencies.

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 14, 2016

comment:8

If the user types "make latte_int lidia", then that user should get a latte built with lidia. Hence, an order only dependency.

@jdemeyer
Copy link

comment:9

Replying to @mkoeppe:

If the user types "make latte_int lidia", then that user should get a latte built with lidia. Hence, an order only dependency.

That works with a real dependency as well as an order-only dependency, so it's still not an argument for an order-only dependency.

@jdemeyer
Copy link

comment:10

I see what you want now, but what you want doesn't work. There is no way to tell make that something should be a dependency only if it's installed. An order-only dependency is really the opposite of that: an order-only dependency is a dependency if it's not installed.

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 14, 2016

comment:11

If the user types "make latte_int" and lidia is not installed, then lidia should not be installed.
Hence an order only dependency, not a real dependency.

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 14, 2016

comment:12

I think you may be right, but it's past midnight here, so I can't be sure.

@jdemeyer
Copy link

comment:13

Replying to @mkoeppe:

If the user types "make latte_int" and lidia is not installed, then lidia should not be installed.
Hence an order only dependency, not a real dependency.

Like I said in [comment:10], order-only dependencies don't work that way.

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 15, 2016

comment:14

Thanks. You are right. I was confused about order-only dependencies.

I'll update the ticket description

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 15, 2016

Changed author from Matthias Koeppe to none

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 15, 2016

Changed branch from u/mkoeppe/latte_int__add_order_only_dependencies to none

@mkoeppe mkoeppe changed the title Packages with "optional" dependencies (a package manager's suggested/recommended packages) Meta-ticket: Declare "optional" dependencies of packages (a package manager's suggested/recommended packages) Sep 13, 2020
@mkoeppe mkoeppe added this to the sage-9.3 milestone Sep 13, 2020
@jhpalmieri
Copy link
Member

Regarding this part of the ticket description:

Replying to @mkoeppe:

Of course, the user can just work around this issue by doing sage -i lidia && sage -i latte_int, but we must find a proper solution that ensures reproducible (deterministic) builds when a parallelized make is used.

It is better to do make lidia && make latte_int since sage -i lidia will build lidia and everything after it. (So if you have a fresh tarball, sage -i lidia will build all of Sage). So sage -i lidia && sage -i latte_int may cause some packages to be built twice.

(This isn't questioning the main point, that the order in which these are built is important and not taken care of with the current build system.)

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 14, 2020

comment:22

Thanks, I have updated the ticket description

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 13, 2021

comment:24

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@mkoeppe
Copy link
Member Author

mkoeppe commented Jul 19, 2021

comment:25

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Mar 5, 2022
@mkoeppe
Copy link
Member Author

mkoeppe commented May 24, 2022

Dependencies: #31017

@mkoeppe
Copy link
Member Author

mkoeppe commented May 3, 2024

Closing as completed: Several packages already have a dependencies_optional file.

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

No branches or pull requests

4 participants