Opened 3 years ago

Last modified 13 months ago

#26281 new defect

curl-config requires the bc command to work

Reported by: embray Owned by:
Priority: minor Milestone:
Component: packages: standard Keywords:
Cc: ​infinity0 Merged in:
Authors: Reviewers:
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

As we found out in #24919 (see https://trac.sagemath.org/ticket/24919#comment:63) the curl-config program that comes with curl, which we use to check the curl version, requires the standard bc command, which apparently on some systems is missing?

In a way this just means that the packaging of curl is broken since it should list bc as a runtime dependency. But we can work around that by checking for it ourselves.

This issue should be independent of #24919 since we already use curl-config to check for curl...

Change History (9)

comment:1 Changed 3 years ago by dimpase

  • Cc ​infinity0 added
  • Report Upstream changed from N/A to Not yet reported upstream; Will do shortly.

This looks like a Debian bug, as I see this on Debian, and they package (lib)curl. By right, curl-config they ship must be fully functional, but it misses bc as a dependency.

I cc one of Debian people packaging Sagemath here.

comment:2 Changed 3 years ago by dimpase

  • Report Upstream changed from Not yet reported upstream; Will do shortly. to Fixed upstream, in a later stable release.

comment:3 Changed 3 years ago by embray

Thanks.

comment:4 follow-up: Changed 3 years ago by embray

I'm not sure what we should do in sage, if anything. I suppose it might still be worth adding an explicit check for the bc program when installing curl :(

comment:5 in reply to: ↑ 4 Changed 3 years ago by dimpase

Replying to embray:

I'm not sure what we should do in sage, if anything. I suppose it might still be worth adding an explicit check for the bc program when installing curl :(

we could just make bc required in the top configure.ac, calling AC_CHECK_PROGRAM or whatever the right macro is.

comment:6 Changed 13 months ago by slelievre

The upstream fix was merged in curl 7.62.0.

Rules for deciding whether to build curl are described in build/pkgs/curl/spkg-configure.m4.

Currently the approach is based on R's needs:

  • build curl unless curl >= 7.22 is found.

Which of the following should we change it to?

  • build curl unless curl >= 7.62 is found
  • build curl unless either curl >= 7.62 is found or curl >= 7.22 and bc are found
Last edited 13 months ago by slelievre (previous) (diff)

comment:7 Changed 13 months ago by dimpase

  • Priority changed from major to minor

Currently we do not build curl if curl >= 7.22 (and, implcitly, bc - if the curl in question does need bc in its curl-config).

Adding an explicit check for bc (after our test for curl failed) would only improve error messages, but that's a rare event that a system has no bc installed.

Other potential improvements here would be to get rid of somewhat dodgy LIBCURL_CHECK_CONFIG and just use PKG_CHECK_MODULES (which doesn't need bc), or try PKG_CHECK_MODULES, and otherwise fall on LIBCURL_CHECK_CONFIG.

But all this is very minor.

Last edited 13 months ago by dimpase (previous) (diff)

comment:8 follow-up: Changed 13 months ago by slelievre

So maybe:

  • check for curl >= 7.62: if found, good
  • if not found, check for curl >= 7.22 and bc: if found, good
  • if not found: build curl

comment:9 in reply to: ↑ 8 Changed 13 months ago by dimpase

Replying to slelievre:

So maybe:

  • check for curl >= 7.62: if found, good
  • if not found, check for curl >= 7.22 and bc: if found, good
  • if not found: build curl

please see my edits

Note: See TracTickets for help on using tickets.