archive/issues_027633.json:
{
"assignees": [],
"body": "<div id=\"comment:0\"></div>\n\none needs to understand the existing design first.\n\n* (as far as I can see) currently Sage generates *.pc files for pkg-config, for blas, cblas, and lapack. This is done for Atlas (and for external blas/lapack fed in by `SAGE_ATLAS_LIB` ?). For openblas these *.pc files are basically all point to the same library.\n\n* how are they used? Are they all used?\n\n* is the description of `SAGE_ATLAS_LIB` outdated? I cannot imagine any need for f77 libraries in 2019...\n\nDepends on #28883\n\nCC: @embray @vbraun @sagetrac-tmonteil @mezzarobba @orlitzky @EmmanuelCharpentier @kiwifb @isuruf @mkoeppe\n\nComponent: **build: configure**\n\nAuthor: **Dima Pasechnik**\n\nBranch: **[`81bf522`](https://github.com/sagemath/sagetrac-mirror/commit/81bf522a5a417e236f9b9ee4f05256126b5b47cb)**\n\nReviewer: **Isuru Fernando**\n\n_Issue created by migration from https://trac.sagemath.org/ticket/27870_\n\n",
"closed_at": "2020-01-09T23:44:36Z",
"created_at": "2019-05-25T10:22:58Z",
"labels": [
"https://github.com/sagemath/sage/labels/c%3A%20build%3A%20configure",
"https://github.com/sagemath/sage/labels/p%3A%20major%20/%203",
"https://github.com/sagemath/sage/labels/enhancement",
"https://github.com/sagemath/sage/labels/c%3A%20build%3A%20configure"
],
"milestone": "https://github.com/sagemath/sage/milestones/sage-9.1",
"reactions": [],
"repository": "https://github.com/sagemath/sage",
"title": "spkg-configure.m4 for $(BLAS) (i.e. atlas and openblas)",
"type": "issue",
"updated_at": "2020-01-13T15:06:18Z",
"url": "https://github.com/sagemath/sage/issues/27870",
"user": "https://github.com/dimpase"
}
one needs to understand the existing design first.
-
(as far as I can see) currently Sage generates *.pc files for pkg-config, for blas, cblas, and lapack. This is done for Atlas (and for external blas/lapack fed in by
SAGE_ATLAS_LIB
?). For openblas these *.pc files are basically all point to the same library. -
how are they used? Are they all used?
-
is the description of
SAGE_ATLAS_LIB
outdated? I cannot imagine any need for f77 libraries in 2019...
Depends on #28883
CC: @embray @vbraun @sagetrac-tmonteil @mezzarobba @orlitzky @EmmanuelCharpentier @kiwifb @isuruf @mkoeppe
Component: build: configure
Author: Dima Pasechnik
Branch: 81bf522
Reviewer: Isuru Fernando
Issue created by migration from https://trac.sagemath.org/ticket/27870
archive/issue_events_379275.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-05-25T10:22:58Z",
"event": "milestoned",
"issue": "https://github.com/sagemath/sage/issues/27870",
"milestone_number": null,
"milestone_title": "sage-8.8",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379275"
}
archive/issue_events_379276.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-05-25T10:22:58Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/c%3A%20build%3A%20configure",
"label_color": "0000b0",
"label_name": "c: build: configure",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379276"
}
archive/issue_events_379277.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-05-25T10:22:58Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/p%3A%20major%20/%203",
"label_color": "ffbb00",
"label_name": "p: major / 3",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379277"
}
archive/issue_events_379278.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-05-25T10:22:58Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/enhancement",
"label_color": "696969",
"label_name": "enhancement",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379278"
}
archive/issue_comments_432779.json:
{
"body": "<div id=\"comment:1\" align=\"right\">comment:1</div>\n\nYes, we should probably get rid of some of the ATLAS-specific stuff (or re-appropriate it). The thing about a lot of the ATLAS stuff is that it doesn't actually care that much about having ATLAS BLAS; the way much of it is written it will work if it can find some BLAS anywhere. That's why on Cygwin it works when you install the lapack package, because it comes with a built-in netlib BLAS. It has nothing to do with ATLAS.\n\nIt would make sense to have an option to look for openblas if it exists, or else fall back on a generic BLAS if one can be found via various sources (pkg-config, some autoconf tests, etc.).",
"created_at": "2019-05-31T15:54:27Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432779",
"user": "https://github.com/embray"
}
Yes, we should probably get rid of some of the ATLAS-specific stuff (or re-appropriate it). The thing about a lot of the ATLAS stuff is that it doesn't actually care that much about having ATLAS BLAS; the way much of it is written it will work if it can find some BLAS anywhere. That's why on Cygwin it works when you install the lapack package, because it comes with a built-in netlib BLAS. It has nothing to do with ATLAS.
It would make sense to have an option to look for openblas if it exists, or else fall back on a generic BLAS if one can be found via various sources (pkg-config, some autoconf tests, etc.).
archive/issue_events_379279.json:
{
"actor": "https://github.com/embray",
"created_at": "2019-06-14T14:55:02Z",
"event": "demilestoned",
"issue": "https://github.com/sagemath/sage/issues/27870",
"milestone_number": null,
"milestone_title": "sage-8.8",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379279"
}
archive/issue_comments_432780.json:
{
"body": "<div id=\"comment:2\" align=\"right\">comment:2</div>\n\nAs the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).",
"created_at": "2019-06-14T14:55:02Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432780",
"user": "https://github.com/embray"
}
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).
archive/issue_comments_432781.json:
{
"body": "Commit: **[`b446427`](https://github.com/sagemath/sagetrac-mirror/commit/b446427fbb1792029a12d3a53cdcddf7e92e81d9)**",
"created_at": "2019-12-10T00:05:53Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432781",
"user": "https://github.com/dimpase"
}
Commit: b446427
archive/issue_comments_432782.json:
{
"body": "<div id=\"comment:5\" align=\"right\">comment:5</div>\n\nDebian has all the needed .pc files, so there it appears to work.\n\n---\nNew commits:\n<table><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/b446427fbb1792029a12d3a53cdcddf7e92e81d9\"><code>b446427</code></a></td><td><code>a bare minumim openblas config</code></td></tr></table>\n",
"created_at": "2019-12-10T00:05:53Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432782",
"user": "https://github.com/dimpase"
}
Debian has all the needed .pc files, so there it appears to work.
New commits:
b446427 | a bare minumim openblas config |
archive/issue_comments_432783.json:
{
"body": "Branch: **[u/dimpase/packages/openblas/openblasconf](https://github.com/sagemath/sagetrac-mirror/tree/u/dimpase/packages/openblas/openblasconf)**",
"created_at": "2019-12-10T00:05:53Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432783",
"user": "https://github.com/dimpase"
}
Branch: u/dimpase/packages/openblas/openblasconf
archive/issue_events_379280.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-10T00:08:19Z",
"event": "milestoned",
"issue": "https://github.com/sagemath/sage/issues/27870",
"milestone_number": null,
"milestone_title": "sage-9.1",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379280"
}
archive/issue_comments_432784.json:
{
"body": "<div id=\"comment:7\" align=\"right\">comment:7</div>\n\nThat's certainly better than nothing. There should probably also be a check in `REQUIRED-CHECK` (the third argument to `SAGE_SPKG_CONFIGURE`) to set `sage_require_openblas=no` if `$with_blas != openblas`). This way it won't check for openblas if someone configured Sage with `--with-blas=atlas`.",
"created_at": "2019-12-12T13:02:16Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432784",
"user": "https://github.com/embray"
}
That's certainly better than nothing. There should probably also be a check in REQUIRED-CHECK
(the third argument to SAGE_SPKG_CONFIGURE
) to set sage_require_openblas=no
if $with_blas != openblas
). This way it won't check for openblas if someone configured Sage with --with-blas=atlas
.
archive/issue_comments_432785.json:
{
"body": "<div id=\"comment:8\" align=\"right\">comment:8</div>\n\nOne can only check for `openblas` with `pkg-config` and make `blas.pc` and `lapack.pc` just as copies of `openblas.pc`.\n\nBut I don't know how to look for `openblas.pc` to copy, other than doing Unix `find /usr/` - something that is neither robust nor fast.",
"created_at": "2019-12-12T13:20:38Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432785",
"user": "https://github.com/dimpase"
}
One can only check for openblas
with pkg-config
and make blas.pc
and lapack.pc
just as copies of openblas.pc
.
But I don't know how to look for openblas.pc
to copy, other than doing Unix find /usr/
- something that is neither robust nor fast.
archive/issue_comments_432786.json:
{
"body": "<div id=\"comment:9\" align=\"right\">comment:9</div>\n\nOne can fill in templates for `blas.pc` by calling `pkg-config` on `openblas`, but this looks like an ugly hack...",
"created_at": "2019-12-12T13:22:27Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432786",
"user": "https://github.com/dimpase"
}
One can fill in templates for blas.pc
by calling pkg-config
on openblas
, but this looks like an ugly hack...
archive/issue_comments_432787.json:
{
"body": "<div id=\"comment:10\" align=\"right\">comment:10</div>\n\nOK, in fact one get the location of `openblas.pc` file:\n\n```\npkg-config --variable=pcfiledir openblas\n```\n(this works), and the corresponding autoconf macro (not tested yet): \n\n```\n PKG_CHECK_VAR([OPENBLASPCDIR], [openblas], [pcfiledir],\n [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])\n```",
"created_at": "2019-12-12T23:00:54Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432787",
"user": "https://github.com/dimpase"
}
OK, in fact one get the location of openblas.pc
file:
pkg-config --variable=pcfiledir openblas
(this works), and the corresponding autoconf macro (not tested yet):
PKG_CHECK_VAR([OPENBLASPCDIR], [openblas], [pcfiledir],
[ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
archive/issue_comments_432788.json:
{
"body": "Changed commit from **[`b446427`](https://github.com/sagemath/sagetrac-mirror/commit/b446427fbb1792029a12d3a53cdcddf7e92e81d9)** to **[`cb725d3`](https://github.com/sagemath/sagetrac-mirror/commit/cb725d388640d1791778cb5788cdc2ee9482581e)**",
"created_at": "2019-12-13T13:53:41Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432788",
"user": "https://github.com/sagetrac-git"
}
Changed commit from b446427
to cb725d3
archive/issue_comments_432789.json:
{
"body": "<div id=\"comment:11\"></div>\n\nBranch pushed to git repo; I updated commit sha1. New commits:\n<table><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/22300f60d3f637238dfe952de05a44601c4a3ce6\"><code>22300f6</code></a></td><td><code>use openblas.pc for blas and lapack, don't require atlas is to be used</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/cb725d388640d1791778cb5788cdc2ee9482581e\"><code>cb725d3</code></a></td><td><code>move blas handling to build/pkgs/</code></td></tr></table>\n",
"created_at": "2019-12-13T13:53:41Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432789",
"user": "https://github.com/sagetrac-git"
}
Branch pushed to git repo; I updated commit sha1. New commits:
22300f6 | use openblas.pc for blas and lapack, don't require atlas is to be used |
cb725d3 | move blas handling to build/pkgs/ |
archive/issue_events_379281.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-13T13:56:20Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379281"
}
archive/issue_comments_432790.json:
{
"body": "<div id=\"comment:12\" align=\"right\">comment:12</div>\n\nthis is a minimal fix for the use of system's openblas, identifiable from pkg-config.\n\nI have not touched Atlas installation procedure.",
"created_at": "2019-12-13T13:56:20Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432790",
"user": "https://github.com/dimpase"
}
this is a minimal fix for the use of system's openblas, identifiable from pkg-config.
I have not touched Atlas installation procedure.
archive/issue_comments_432791.json:
{
"body": "Author: **Dima Pasechnik**",
"created_at": "2019-12-13T13:56:20Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432791",
"user": "https://github.com/dimpase"
}
Author: Dima Pasechnik
archive/issue_comments_432792.json:
{
"body": "<div id=\"comment:13\" align=\"right\">comment:13</div>\n\nWell... I did `git trac checkout 27870`, then `make`, and `make` went directly to checking the documentation.\n\nI guess that testing your patch involves either `make clean` or `make distclean`. Which one ?",
"created_at": "2019-12-13T18:45:53Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432792",
"user": "https://github.com/EmmanuelCharpentier"
}
Well... I did git trac checkout 27870
, then make
, and make
went directly to checking the documentation.
I guess that testing your patch involves either make clean
or make distclean
. Which one ?
archive/issue_comments_432793.json:
{
"body": "<div id=\"comment:14\" align=\"right\">comment:14</div>\n\nReplying to [@EmmanuelCharpentier](#comment%3A13):\n> Well... I did `git trac checkout 27870`, then `make`, and `make` went directly to checking the documentation.\n> \n> I guess that testing your patch involves either `make clean` or `make distclean`. Which one ?\n\nNot only this :-)\n\n```\nmake openblas-clean # uninstall package\n./bootstrap # update ./configure\n./configure # here the output should show that openblas is not being installed\nmake build\n```\non OSX for some reason I also needed to `./sage -f numpy` before `make build`\n\n`make distclean` before `bootstrap` is more robust. I'm not sure in which cases one should re-install all the packages that depend upon blas, too, this might be\nplatform-dependent.\n\n---\n\nOne naturally is interested in testing against system's openblas: e.g. on debian and derived systems one needs `apt install pkg-config libopenblas-dev`\n\nOn OSX's Homebrew one would need `brew install openblas` and then export certain\nenvironment variable (as Homebrew will tell you), as for some reason it's not installed into a default location.",
"created_at": "2019-12-13T19:23:48Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432793",
"user": "https://github.com/dimpase"
}
Replying to @EmmanuelCharpentier:
Well... I did
git trac checkout 27870
, thenmake
, andmake
went directly to checking the documentation.I guess that testing your patch involves either
make clean
ormake distclean
. Which one ?
Not only this :-)
make openblas-clean # uninstall package
./bootstrap # update ./configure
./configure # here the output should show that openblas is not being installed
make build
on OSX for some reason I also needed to ./sage -f numpy
before make build
make distclean
before bootstrap
is more robust. I'm not sure in which cases one should re-install all the packages that depend upon blas, too, this might be
platform-dependent.
One naturally is interested in testing against system's openblas: e.g. on debian and derived systems one needs apt install pkg-config libopenblas-dev
On OSX's Homebrew one would need brew install openblas
and then export certain
environment variable (as Homebrew will tell you), as for some reason it's not installed into a default location.
archive/issue_comments_432794.json:
{
"body": "<div id=\"comment:15\" align=\"right\">comment:15</div>\n\nThere is a larger mess to deal with here, but TBH I'm fine with solving it one piece at a time. It looks like a few packages (R, numpy,... ?) do use pkg-config to discover information about the blas/lapack being used. And our pkg-config is hacked (build/pkgs/pkgconf/patches/pkg-config.in) to look in a custom directory for .pc files if they aren't found on the system. So I think the idea was that if pkg-config couldn't find e.g. lapack.pc, that it would then look in SAGE_LOCAL to find it.\n\nThis only raises more questions. If openblas is installed on the system, can we count on the system pkg-config to know that the system blas/lapack are just the system openblas? If so, then we shouldn't need to create \"fallback\" symlinks. If not, would linking to some other blas/lapack cause problems? Why don't those packages check for openblas or atlas directly instead of \"blas\" and \"lapack\", in that case? And so on. Your approach looks better the deeper I go.",
"created_at": "2019-12-13T20:12:11Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432794",
"user": "https://github.com/orlitzky"
}
There is a larger mess to deal with here, but TBH I'm fine with solving it one piece at a time. It looks like a few packages (R, numpy,... ?) do use pkg-config to discover information about the blas/lapack being used. And our pkg-config is hacked (build/pkgs/pkgconf/patches/pkg-config.in) to look in a custom directory for .pc files if they aren't found on the system. So I think the idea was that if pkg-config couldn't find e.g. lapack.pc, that it would then look in SAGE_LOCAL to find it.
This only raises more questions. If openblas is installed on the system, can we count on the system pkg-config to know that the system blas/lapack are just the system openblas? If so, then we shouldn't need to create "fallback" symlinks. If not, would linking to some other blas/lapack cause problems? Why don't those packages check for openblas or atlas directly instead of "blas" and "lapack", in that case? And so on. Your approach looks better the deeper I go.
archive/issue_comments_432795.json:
{
"body": "<div id=\"comment:16\" align=\"right\">comment:16</div>\n\nI more or less copy the logic of openblas/dpkg-install - which does install openblas.pc under 3 different names - openblas, blas, and lapack.",
"created_at": "2019-12-13T20:52:15Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432795",
"user": "https://github.com/dimpase"
}
I more or less copy the logic of openblas/dpkg-install - which does install openblas.pc under 3 different names - openblas, blas, and lapack.
archive/issue_comments_432796.json:
{
"body": "<div id=\"comment:17\" align=\"right\">comment:17</div>\n\nI tried this (meaning `make distclean; ./bootstrap; make`) with an Ubuntu virtual machine. `config.log` says\n\n```\nconfigure:20206: result: atlas-3.10.2.p3 will not be installed (configure check)\n...\nconfigure:20206: result: openblas-0.3.6.p0 will not be installed (configure check)\n```\nbut `scipy` installation fails with\n\n```\nnumpy.distutils.system_info.NotFoundError: No lapack/blas resources found.\n```\nThere are also various warnings in the `numpy` installation log about not finding atlas or blas.",
"created_at": "2019-12-13T20:55:12Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432796",
"user": "https://github.com/jhpalmieri"
}
I tried this (meaning make distclean; ./bootstrap; make
) with an Ubuntu virtual machine. config.log
says
configure:20206: result: atlas-3.10.2.p3 will not be installed (configure check)
...
configure:20206: result: openblas-0.3.6.p0 will not be installed (configure check)
but scipy
installation fails with
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
There are also various warnings in the numpy
installation log about not finding atlas or blas.
archive/issue_comments_432797.json:
{
"body": "<div id=\"comment:18\" align=\"right\">comment:18</div>\n\nscipy depends on numpy to supply blas interface, so something goes wrong with numpy installation (it is weird that it foes not fail).\n\nit works for me on Debian 10. numpy has its own extermely convoluted configure routine, which emits a lot of noise about not finding this or that.\n\nCould you try building numpy with SAGE_CHECK ?",
"created_at": "2019-12-13T21:02:58Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432797",
"user": "https://github.com/dimpase"
}
scipy depends on numpy to supply blas interface, so something goes wrong with numpy installation (it is weird that it foes not fail).
it works for me on Debian 10. numpy has its own extermely convoluted configure routine, which emits a lot of noise about not finding this or that.
Could you try building numpy with SAGE_CHECK ?
archive/issue_comments_432798.json:
{
"body": "<div id=\"comment:19\" align=\"right\">comment:19</div>\n\nReplying to [@dimpase](#comment%3A16):\n> I more or less copy the logic of openblas/dpkg-install - which does install openblas.pc under 3 different names - openblas, blas, and lapack.\n\nYeah I agree with that. Maybe two years from now, no one is using atlas any more and this is easy to clean up by dropping support for it and by having those other packages call `pkg-config openblas...` instead of `pkg-config lapack` and `pkg-config blas`. No need to worry about it now.",
"created_at": "2019-12-13T21:04:01Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432798",
"user": "https://github.com/orlitzky"
}
Replying to @dimpase:
I more or less copy the logic of openblas/dpkg-install - which does install openblas.pc under 3 different names - openblas, blas, and lapack.
Yeah I agree with that. Maybe two years from now, no one is using atlas any more and this is easy to clean up by dropping support for it and by having those other packages call pkg-config openblas...
instead of pkg-config lapack
and pkg-config blas
. No need to worry about it now.
archive/issue_comments_432799.json:
{
"body": "<div id=\"comment:20\" align=\"right\">comment:20</div>\n\nReplying to [@jhpalmieri](#comment%3A17):\n>\n> There are also various warnings in the `numpy` installation log about not finding atlas or blas.\n\nFWIW numpy is one of those packages that uses pkg-config to find these libraries; see build/pkgs/numpy/lapack_conf.py.",
"created_at": "2019-12-13T21:07:07Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432799",
"user": "https://github.com/orlitzky"
}
Replying to @jhpalmieri:
There are also various warnings in the
numpy
installation log about not finding atlas or blas.
FWIW numpy is one of those packages that uses pkg-config to find these libraries; see build/pkgs/numpy/lapack_conf.py.
archive/issue_comments_432800.json:
{
"body": "<div id=\"comment:21\" align=\"right\">comment:21</div>\n\nApart from Atlas and openblas there are other perfectly ok implementations of blas and lapack, which may be used.",
"created_at": "2019-12-13T21:07:23Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432800",
"user": "https://github.com/dimpase"
}
Apart from Atlas and openblas there are other perfectly ok implementations of blas and lapack, which may be used.
archive/issue_comments_432801.json:
{
"body": "<div id=\"comment:22\" align=\"right\">comment:22</div>\n\ne.g. there are highly optimised by hardware vendors blas and lapacks (e.g. MKL)",
"created_at": "2019-12-13T21:08:59Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432801",
"user": "https://github.com/dimpase"
}
e.g. there are highly optimised by hardware vendors blas and lapacks (e.g. MKL)
archive/issue_comments_432802.json:
{
"body": "<div id=\"comment:23\" align=\"right\">comment:23</div>\n\nReplying to [@dimpase](#comment%3A18):\n> Could you try building numpy with SAGE_CHECK ?\n\n`numpy` has no `spkg-check` file, so this acts the same as what I did before.",
"created_at": "2019-12-13T21:17:33Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432802",
"user": "https://github.com/jhpalmieri"
}
Replying to @dimpase:
Could you try building numpy with SAGE_CHECK ?
numpy
has no spkg-check
file, so this acts the same as what I did before.
archive/issue_comments_432803.json:
{
"body": "<div id=\"comment:24\" align=\"right\">comment:24</div>\n\nI'm not suggesting that we don't support other blas/lapack implementations, but trying to account for multiple system implementations AND multiple sage implementations is making life harder than it has to be. Somewhere down the road, we should be (a) checking for system blas/lapack, and using what we find; then (b) as a fallback, installing openblas and using openblas.\n\nThis is all speculation right now, regardless =)",
"created_at": "2019-12-13T21:19:10Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432803",
"user": "https://github.com/orlitzky"
}
I'm not suggesting that we don't support other blas/lapack implementations, but trying to account for multiple system implementations AND multiple sage implementations is making life harder than it has to be. Somewhere down the road, we should be (a) checking for system blas/lapack, and using what we find; then (b) as a fallback, installing openblas and using openblas.
This is all speculation right now, regardless =)
archive/issue_comments_432804.json:
{
"body": "<div id=\"comment:25\" align=\"right\">comment:25</div>\n\nReplying to [@orlitzky](#comment%3A24):\n> I'm not suggesting that we don't support other blas/lapack implementations, but trying to account for multiple system implementations AND multiple sage implementations is making life harder than it has to be. Somewhere down the road, we should be (a) checking for system blas/lapack, and using what we find; then (b) as a fallback, installing openblas and using openblas.\n> \n> This is all speculation right now, regardless =)\n\nDo you mean \"not ready for prime time\" ?",
"created_at": "2019-12-13T21:27:19Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432804",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @orlitzky:
I'm not suggesting that we don't support other blas/lapack implementations, but trying to account for multiple system implementations AND multiple sage implementations is making life harder than it has to be. Somewhere down the road, we should be (a) checking for system blas/lapack, and using what we find; then (b) as a fallback, installing openblas and using openblas.
This is all speculation right now, regardless =)
Do you mean "not ready for prime time" ?
archive/issue_events_379282.json:
{
"actor": "https://github.com/EmmanuelCharpentier",
"created_at": "2019-12-13T22:05:24Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379282"
}
archive/issue_events_379283.json:
{
"actor": "https://github.com/EmmanuelCharpentier",
"created_at": "2019-12-13T22:05:24Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20work",
"label_color": "ffff00",
"label_name": "needs work",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379283"
}
archive/issue_comments_432805.json:
{
"body": "<div id=\"comment:27\" align=\"right\">comment:27</div>\n\nReplying to [@dimpase](#comment%3A14):\n> Replying to [@EmmanuelCharpentier](#comment%3A13):\n> > Well... I did `git trac checkout 27870`, then `make`, and `make` went directly to checking the documentation.\n> > \n> > I guess that testing your patch involves either `make clean` or `make distclean`. Which one ?\n> \n> \n> Not only this :-)\n> \n> ```\n> make openblas-clean # uninstall package\n> ./bootstrap # update ./configure\n> ./configure # here the output should show that openblas is not being installed\n> ```\n\nNo such bllody luck. From config.log:\n\n```\nconfigure:11316: === checking whether to install the openblas SPKG ===\nconfigure:11334: checking BLAS library\nconfigure:11353: result: openblas\nconfigure:11395: checking for OPENBLAS\nconfigure:11402: $PKG_CONFIG --exists --print-errors \"openblas >= 0.3.5\"\nPackage openblas was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openblas.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'openblas' found\nconfigure:11405: $? = 1\nconfigure:11419: $PKG_CONFIG --exists --print-errors \"openblas >= 0.3.5\"\nPackage openblas was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openblas.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'openblas' found\nconfigure:11422: $? = 1\nconfigure:11436: result: no\nNo package 'openblas' found\n```\n\nBut the relevant packages **are** installed systemwide (Debian testing) :\n\n```\ncharpent@zen-book-flip:~$ dpkg -l \"*openblas*\"\nSouhait=inconnU/Install\u00e9/suppRim\u00e9/Purg\u00e9/H=\u00e0 garder\n| \u00c9tat=Non/Install\u00e9/fichier-Config/d\u00e9paqUet\u00e9/\u00e9chec-conFig/H=semi-install\u00e9/W=att>\n|/ Err?=(aucune)/besoin R\u00e9installation (\u00c9tat,Err: majuscule=mauvais)\n||/ Nom Version Architecture Description\n+++-=============================-============-============-===================>\nii libopenblas-base:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>\nii libopenblas-dev:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>\nun libopenblas-openmp-dev <aucune> <aucune> (aucune description>\nii libopenblas-pthread-dev:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>\nun libopenblas-serial-dev <aucune> <aucune> (aucune description>\nii libopenblas0:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>\nun libopenblas0-openmp <aucune> <aucune> (aucune description>\nii libopenblas0-pthread:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>\nun libopenblas0-serial <aucune> <aucune> (aucune description\n```\n\n==> `needs_work`.\n\nSorry.",
"created_at": "2019-12-13T22:05:24Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432805",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @dimpase:
Replying to @EmmanuelCharpentier:
Well... I did
git trac checkout 27870
, thenmake
, andmake
went directly to checking the documentation.I guess that testing your patch involves either
make clean
ormake distclean
. Which one ?Not only this :-)
make openblas-clean # uninstall package ./bootstrap # update ./configure ./configure # here the output should show that openblas is not being installed
No such bllody luck. From config.log:
configure:11316: === checking whether to install the openblas SPKG ===
configure:11334: checking BLAS library
configure:11353: result: openblas
configure:11395: checking for OPENBLAS
configure:11402: $PKG_CONFIG --exists --print-errors "openblas >= 0.3.5"
Package openblas was not found in the pkg-config search path.
Perhaps you should add the directory containing `openblas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openblas' found
configure:11405: $? = 1
configure:11419: $PKG_CONFIG --exists --print-errors "openblas >= 0.3.5"
Package openblas was not found in the pkg-config search path.
Perhaps you should add the directory containing `openblas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openblas' found
configure:11422: $? = 1
configure:11436: result: no
No package 'openblas' found
But the relevant packages are installed systemwide (Debian testing) :
charpent@zen-book-flip:~$ dpkg -l "*openblas*"
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=att>
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom Version Architecture Description
+++-=============================-============-============-===================>
ii libopenblas-base:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>
ii libopenblas-dev:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>
un libopenblas-openmp-dev <aucune> <aucune> (aucune description>
ii libopenblas-pthread-dev:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>
un libopenblas-serial-dev <aucune> <aucune> (aucune description>
ii libopenblas0:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>
un libopenblas0-openmp <aucune> <aucune> (aucune description>
ii libopenblas0-pthread:amd64 0.3.7+ds-5 amd64 Optimized BLAS (lin>
un libopenblas0-serial <aucune> <aucune> (aucune description
==> needs_work
.
Sorry.
archive/issue_comments_432806.json:
{
"body": "<div id=\"comment:28\" align=\"right\">comment:28</div>\n\ndo you have `pkg-config` installed?",
"created_at": "2019-12-13T22:13:55Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432806",
"user": "https://github.com/dimpase"
}
do you have pkg-config
installed?
archive/issue_comments_432807.json:
{
"body": "<div id=\"comment:29\" align=\"right\">comment:29</div>\n\nReplying to [@dimpase](#comment%3A28):\n> do you have `pkg-config` installed? \n\n\nYes :\n\n```\ncharpent@zen-book-flip:~$ dpkg -l \"*pkg-config*\"\nSouhait=inconnU/Install\u00e9/suppRim\u00e9/Purg\u00e9/H=\u00e0 garder\n| \u00c9tat=Non/Install\u00e9/fichier-Config/d\u00e9paqUet\u00e9/\u00e9chec-conFig/H=semi-install\u00e9/W=att>\n|/ Err?=(aucune)/besoin R\u00e9installation (\u00c9tat,Err: majuscule=mauvais)\n||/ Nom Version Architecture Description\n+++-==============-============-============-==================================>\nii pkg-config 0.29-6 amd64 manage compile and link flags for >\nun pkg-config-bin <aucune> <aucune> (aucune description n'est disponib>\n```\n\nI was unaware (until 30 seconds ago) of `pkg-config-bin`. It seems to be a virtual package (i. e. in Debianese, a placeholder for a functionality fullfillable by more than one package).",
"created_at": "2019-12-13T22:25:47Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432807",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @dimpase:
do you have
pkg-config
installed?
Yes :
charpent@zen-book-flip:~$ dpkg -l "*pkg-config*"
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=att>
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom Version Architecture Description
+++-==============-============-============-==================================>
ii pkg-config 0.29-6 amd64 manage compile and link flags for >
un pkg-config-bin <aucune> <aucune> (aucune description n'est disponib>
I was unaware (until 30 seconds ago) of pkg-config-bin
. It seems to be a virtual package (i. e. in Debianese, a placeholder for a functionality fullfillable by more than one package).
archive/issue_comments_432808.json:
{
"body": "<div id=\"comment:30\" align=\"right\">comment:30</div>\n\nwhat does \n\n```\npkg-config --list-all | grep blas\n```\nshow?",
"created_at": "2019-12-13T22:31:28Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432808",
"user": "https://github.com/dimpase"
}
what does
pkg-config --list-all | grep blas
show?
archive/issue_comments_432809.json:
{
"body": "<div id=\"comment:31\" align=\"right\">comment:31</div>\n\nReplying to [@dimpase](#comment%3A30):\n> what does \n> \n> ```\n> pkg-config --list-all | grep blas\n> ```\n> show? \n\n```\ncharpent@zen-book-flip:~$ pkg-config --list-all | grep blas\nlapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\nblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\nblas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\nlapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\nblas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms\n```",
"created_at": "2019-12-13T22:34:29Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432809",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @dimpase:
what does
pkg-config --list-all | grep blas
show?
charpent@zen-book-flip:~$ pkg-config --list-all | grep blas
lapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK
blas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2
blas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2
lapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK
blas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms
archive/issue_comments_432810.json:
{
"body": "<div id=\"comment:32\" align=\"right\">comment:32</div>\n\nI think my numpy/scipy problem is from each package's `spkg-install` script:\n\n```\n export {ATLAS,PTATLAS,OPENBLAS,MKL,MKLROOT}=None\n```\nSetting `OPENBLAS` to `None` seems to cause the package not to find the system's openblas installation. Removing `OPENBLAS` from the list of environment variables fixes things for me. What is the purpose of this line?",
"created_at": "2019-12-13T22:53:44Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432810",
"user": "https://github.com/jhpalmieri"
}
I think my numpy/scipy problem is from each package's spkg-install
script:
export {ATLAS,PTATLAS,OPENBLAS,MKL,MKLROOT}=None
Setting OPENBLAS
to None
seems to cause the package not to find the system's openblas installation. Removing OPENBLAS
from the list of environment variables fixes things for me. What is the purpose of this line?
archive/issue_comments_432811.json:
{
"body": "<div id=\"comment:33\" align=\"right\">comment:33</div>\n\nReplying to [@EmmanuelCharpentier](#comment%3A25):\n> \n> Do you mean \"not ready for prime time\" ?\n> \n\nI probably should not have said anything at all. Modulo whatever bugs are being worked out, Dima's approach looks good to me.\n\nLater on, there may be *additional* improvements to make sage support the system blas/lapack, but this patch is a step in the right direction.",
"created_at": "2019-12-13T22:58:09Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432811",
"user": "https://github.com/orlitzky"
}
Replying to @EmmanuelCharpentier:
Do you mean "not ready for prime time" ?
I probably should not have said anything at all. Modulo whatever bugs are being worked out, Dima's approach looks good to me.
Later on, there may be additional improvements to make sage support the system blas/lapack, but this patch is a step in the right direction.
archive/issue_comments_432812.json:
{
"body": "<div id=\"comment:34\" align=\"right\">comment:34</div>\n\nReplying to [@jhpalmieri](#comment%3A32):\n> I think my numpy/scipy problem is from each package's `spkg-install` script:\n> \n> ```\n> export {ATLAS,PTATLAS,OPENBLAS,MKL,MKLROOT}=None\n> ```\n> Setting `OPENBLAS` to `None` seems to cause the package not to find the system's openblas installation. Removing `OPENBLAS` from the list of environment variables fixes things for me. What is the purpose of this line?\n\nI can reproduce your problem - and it seems to go away if I just not call that\npython script, i.e.\n\n```diff\n--- a/build/pkgs/numpy/spkg-install\n+++ b/build/pkgs/numpy/spkg-install\n@@ -11,7 +11,7 @@ else\n export LDFLAGS=\"${LDFLAGS} -shared\"\n fi\n \n-sage-python23 ../lapack_conf.py\n+# sage-python23 ../lapack_conf.py\n \n # Make sure that the fortran objects are compiled with -fPIC\n export FFLAGS=\"$FFLAGS -fPIC\"\n```\n\nI'm not saying it can be just removed unconditionally, but it needs an adjustment.\n\nHopefully Francois, its author, knows what's going wrong.",
"created_at": "2019-12-13T23:01:54Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432812",
"user": "https://github.com/dimpase"
}
Replying to @jhpalmieri:
I think my numpy/scipy problem is from each package's
spkg-install
script:export {ATLAS,PTATLAS,OPENBLAS,MKL,MKLROOT}=None
Setting
OPENBLAS
toNone
seems to cause the package not to find the system's openblas installation. RemovingOPENBLAS
from the list of environment variables fixes things for me. What is the purpose of this line?
I can reproduce your problem - and it seems to go away if I just not call that python script, i.e.
--- a/build/pkgs/numpy/spkg-install
+++ b/build/pkgs/numpy/spkg-install
@@ -11,7 +11,7 @@ else
export LDFLAGS="${LDFLAGS} -shared"
fi
-sage-python23 ../lapack_conf.py
+# sage-python23 ../lapack_conf.py
# Make sure that the fortran objects are compiled with -fPIC
export FFLAGS="$FFLAGS -fPIC"
I'm not saying it can be just removed unconditionally, but it needs an adjustment.
Hopefully Francois, its author, knows what's going wrong.
archive/issue_comments_432813.json:
{
"body": "<div id=\"comment:35\" align=\"right\">comment:35</div>\n\nReplying to [@EmmanuelCharpentier](#comment%3A31):\n> Replying to [@dimpase](#comment%3A30):\n> > what does \n> > \n> > ```\n> > pkg-config --list-all | grep blas\n> > ```\n> > show? \n> \n> \n> ```\n> charpent@zen-book-flip:~$ pkg-config --list-all | grep blas\n> lapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\n> blas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\n> blas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\n> lapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\n> blas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms\n> ```\n\nSo in their infinite wisdom they removed `openblas.pc` all together.\nNot sure it's a Debian bug (note that upstream openblas does create such a file, so it's really an incompatible Debian invention here).",
"created_at": "2019-12-13T23:05:14Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432813",
"user": "https://github.com/dimpase"
}
Replying to @EmmanuelCharpentier:
Replying to @dimpase:
what does
pkg-config --list-all | grep blas
show?
charpent@zen-book-flip:~$ pkg-config --list-all | grep blas lapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK blas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2 blas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2 lapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK blas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms
So in their infinite wisdom they removed openblas.pc
all together.
Not sure it's a Debian bug (note that upstream openblas does create such a file, so it's really an incompatible Debian invention here).
archive/issue_comments_432814.json:
{
"body": "<div id=\"comment:36\" align=\"right\">comment:36</div>\n\nReplying to [@dimpase](#comment%3A35):\n> Replying to [@EmmanuelCharpentier](#comment%3A31):\n> > Replying to [@dimpase](#comment%3A30):\n> > > what does \n> > > \n> > > ```\n> > > pkg-config --list-all | grep blas\n> > > ```\n> > > show? \n> > \n> > \n> > ```\n> > charpent@zen-book-flip:~$ pkg-config --list-all | grep blas\n> > lapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\n> > blas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\n> > blas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\n> > lapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\n> > blas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms\n> > ```\n> \n> \n> So in their infinite wisdom they removed `openblas.pc` all together.\n> Not sure it's a Debian bug (note that upstream openblas does create such a file, so it's really an incompatible Debian invention here).\n\nNope:\n\n```\ncharpent@zen-book-flip:~$ ls -l /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc \n-rw-r--r-- 1 root root 570 d\u00e9c. 2 06:33 /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc\ncharpent@zen-book-flip:~$ cat /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc \nlibdir=/usr/lib/x86_64-linux-gnu/openblas-pthread/\nincludedir=/usr/include/x86_64-linux-gnu/openblas-pthread/\nopenblas_config= USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 NO_CBLAS= NO_LAPACK= NO_LAPACKE=1 NO_AFFINITY=1 USE_OPENMP=0 generic MAX_THREADS=64\nversion=0.3.7\nextralib=-lm -lpthread -lgfortran -lm -lpthread -lgfortran\nName: openblas\nDescription: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version\nVersion: ${version}\nURL: https://github.com/xianyi/OpenBLAS\nLibs: -L${libdir} -lopenblas\nLibs.private: ${extralib}\nCflags: -I${includedir}\n```\n\nThe problem is elsewhere...",
"created_at": "2019-12-13T23:18:54Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432814",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @dimpase:
Replying to @EmmanuelCharpentier:
Replying to @dimpase:
what does
pkg-config --list-all | grep blas
show?
charpent@zen-book-flip:~$ pkg-config --list-all | grep blas lapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK blas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2 blas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2 lapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK blas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms
So in their infinite wisdom they removed
openblas.pc
all together. Not sure it's a Debian bug (note that upstream openblas does create such a file, so it's really an incompatible Debian invention here).
Nope:
charpent@zen-book-flip:~$ ls -l /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc
-rw-r--r-- 1 root root 570 déc. 2 06:33 /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc
charpent@zen-book-flip:~$ cat /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc
libdir=/usr/lib/x86_64-linux-gnu/openblas-pthread/
includedir=/usr/include/x86_64-linux-gnu/openblas-pthread/
openblas_config= USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 NO_CBLAS= NO_LAPACK= NO_LAPACKE=1 NO_AFFINITY=1 USE_OPENMP=0 generic MAX_THREADS=64
version=0.3.7
extralib=-lm -lpthread -lgfortran -lm -lpthread -lgfortran
Name: openblas
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
Version: ${version}
URL: https://github.com/xianyi/OpenBLAS
Libs: -L${libdir} -lopenblas
Libs.private: ${extralib}
Cflags: -I${includedir}
The problem is elsewhere...
archive/issue_comments_432815.json:
{
"body": "<div id=\"comment:37\" align=\"right\">comment:37</div>\n\nNote, however,that my `locate` finds the `openblas.pc` created in my various Sage trees, but **not** the systewide one.\n\nI don't recall having ever fiddled with its configuration.\n\nReplying to [@EmmanuelCharpentier](#comment%3A36):\n> Replying to [@dimpase](#comment%3A35):\n> > Replying to [@EmmanuelCharpentier](#comment%3A31):\n> > > Replying to [@dimpase](#comment%3A30):\n> > > > what does \n> > > > \n> > > > ```\n> > > > pkg-config --list-all | grep blas\n> > > > ```\n> > > > show? \n> > > \n> > > \n> > > ```\n> > > charpent@zen-book-flip:~$ pkg-config --list-all | grep blas\n> > > lapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\n> > > blas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\n> > > blas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2\n> > > lapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK\n> > > blas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms\n> > > ```\n> > \n> > \n> > So in their infinite wisdom they removed `openblas.pc` all together.\n> > Not sure it's a Debian bug (note that upstream openblas does create such a file, so it's really an incompatible Debian invention here).\n> \n> \n> Nope:\n> \n> ```\n> charpent@zen-book-flip:~$ ls -l /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc \n> -rw-r--r-- 1 root root 570 d\u00e9c. 2 06:33 /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc\n> charpent@zen-book-flip:~$ cat /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc \n> libdir=/usr/lib/x86_64-linux-gnu/openblas-pthread/\n> includedir=/usr/include/x86_64-linux-gnu/openblas-pthread/\n> openblas_config= USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 NO_CBLAS= NO_LAPACK= NO_LAPACKE=1 NO_AFFINITY=1 USE_OPENMP=0 generic MAX_THREADS=64\n> version=0.3.7\n> extralib=-lm -lpthread -lgfortran -lm -lpthread -lgfortran\n> Name: openblas\n> Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version\n> Version: ${version}\n> URL: https://github.com/xianyi/OpenBLAS\n> Libs: -L${libdir} -lopenblas\n> Libs.private: ${extralib}\n> Cflags: -I${includedir}\n> ```\n> \n> The problem is elsewhere...\n>\n>",
"created_at": "2019-12-13T23:23:50Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432815",
"user": "https://github.com/EmmanuelCharpentier"
}
Note, however,that my locate
finds the openblas.pc
created in my various Sage trees, but not the systewide one.
I don't recall having ever fiddled with its configuration.
Replying to @EmmanuelCharpentier:
Replying to @dimpase:
Replying to @EmmanuelCharpentier:
Replying to @dimpase:
what does
pkg-config --list-all | grep blas
show?
charpent@zen-book-flip:~$ pkg-config --list-all | grep blas lapack-openblas openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK blas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2 blas-openblas openblas-blas - Optimized BLAS (linear algebra) library based on GotoBLAS2 lapack openblas-lapack - Optimized BLAS (linear algebra) library, LAPACK blas-netlib BLAS - FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms
So in their infinite wisdom they removed
openblas.pc
all together. Not sure it's a Debian bug (note that upstream openblas does create such a file, so it's really an incompatible Debian invention here).Nope:
charpent@zen-book-flip:~$ ls -l /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc -rw-r--r-- 1 root root 570 déc. 2 06:33 /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc charpent@zen-book-flip:~$ cat /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig/openblas.pc libdir=/usr/lib/x86_64-linux-gnu/openblas-pthread/ includedir=/usr/include/x86_64-linux-gnu/openblas-pthread/ openblas_config= USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 NO_CBLAS= NO_LAPACK= NO_LAPACKE=1 NO_AFFINITY=1 USE_OPENMP=0 generic MAX_THREADS=64 version=0.3.7 extralib=-lm -lpthread -lgfortran -lm -lpthread -lgfortran Name: openblas Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version Version: ${version} URL: https://github.com/xianyi/OpenBLAS Libs: -L${libdir} -lopenblas Libs.private: ${extralib} Cflags: -I${includedir}
The problem is elsewhere...
archive/issue_comments_432816.json:
{
"body": "<div id=\"comment:38\" align=\"right\">comment:38</div>\n\nWell, this pretty much looks like a Debian bug. The point of installing `openblas.pc` into a hidden from `pkg-config` directory only makes sense if they plan to install \"competing\" versions of this file in different locations...",
"created_at": "2019-12-13T23:30:05Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432816",
"user": "https://github.com/dimpase"
}
Well, this pretty much looks like a Debian bug. The point of installing openblas.pc
into a hidden from pkg-config
directory only makes sense if they plan to install "competing" versions of this file in different locations...
archive/issue_comments_432817.json:
{
"body": "<div id=\"comment:39\" align=\"right\">comment:39</div>\n\nReplying to [@dimpase](#comment%3A38):\n> Well, this pretty much looks like a Debian bug. The point of installing `openblas.pc` into a hidden from `pkg-config` directory only makes sense if they plan to install \"competing\" versions of this file in different locations...\n\nThis is now [Debian bug 946698 ](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946698). For what it's worth...",
"created_at": "2019-12-14T00:05:56Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432817",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @dimpase:
Well, this pretty much looks like a Debian bug. The point of installing
openblas.pc
into a hidden frompkg-config
directory only makes sense if they plan to install "competing" versions of this file in different locations...
This is now Debian bug 946698 . For what it's worth...
archive/issue_comments_432818.json:
{
"body": "<div id=\"comment:40\" align=\"right\">comment:40</div>\n\nFor me, this fixes the problem.\n\n```diff\ndiff --git a/build/pkgs/numpy/lapack_conf.py b/build/pkgs/numpy/lapack_conf.py\nindex d127d08def..f1bc559cfa 100644\n--- a/build/pkgs/numpy/lapack_conf.py\n+++ b/build/pkgs/numpy/lapack_conf.py\n@@ -8,7 +8,7 @@ conf_file.write('[ALL]\\n')\n conf_file.write('library_dirs = '+ os.environ['SAGE_LOCAL']+ '/lib\\n')\n conf_file.write('include_dirs = '+ os.environ['SAGE_LOCAL']+ '/include\\n')\n \n-pc_blas = pkgconfig.parse('cblas blas')\n+pc_blas = pkgconfig.parse('blas')\n pc_lapack = pkgconfig.parse('lapack')\n \n if not (os.environ['UNAME'] == 'Darwin'):\n```\nIf I run `./sage --python`:\n\n```pycon\n>>> import pkgconfig\n>>> pkgconfig.parse('blas')\ndefaultdict(<class 'list'>, {'include_dirs': ['/usr/include/x86_64-linux-gnu'], 'libraries': ['openblas'], 'define_macros': []})\n>>> pkgconfig.parse('cblas blas')\ndefaultdict(<class 'list'>, {'define_macros': []})\n```\nI don't know why the space-separated list doesn't work. It is supposed to, according to the documentation. As far as I can tell, it doesn't find a cblas package, and maybe that confuses it. (it = `pkgconfig.parse`)",
"created_at": "2019-12-14T00:23:51Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432818",
"user": "https://github.com/jhpalmieri"
}
For me, this fixes the problem.
diff --git a/build/pkgs/numpy/lapack_conf.py b/build/pkgs/numpy/lapack_conf.py
index d127d08def..f1bc559cfa 100644
--- a/build/pkgs/numpy/lapack_conf.py
+++ b/build/pkgs/numpy/lapack_conf.py
@@ -8,7 +8,7 @@ conf_file.write('[ALL]\n')
conf_file.write('library_dirs = '+ os.environ['SAGE_LOCAL']+ '/lib\n')
conf_file.write('include_dirs = '+ os.environ['SAGE_LOCAL']+ '/include\n')
-pc_blas = pkgconfig.parse('cblas blas')
+pc_blas = pkgconfig.parse('blas')
pc_lapack = pkgconfig.parse('lapack')
if not (os.environ['UNAME'] == 'Darwin'):
If I run ./sage --python
:
>>> import pkgconfig
>>> pkgconfig.parse('blas')
defaultdict(<class 'list'>, {'include_dirs': ['/usr/include/x86_64-linux-gnu'], 'libraries': ['openblas'], 'define_macros': []})
>>> pkgconfig.parse('cblas blas')
defaultdict(<class 'list'>, {'define_macros': []})
I don't know why the space-separated list doesn't work. It is supposed to, according to the documentation. As far as I can tell, it doesn't find a cblas package, and maybe that confuses it. (it = pkgconfig.parse
)
archive/issue_comments_432819.json:
{
"body": "<div id=\"comment:41\" align=\"right\">comment:41</div>\n\nI originally followed the model of the gentoo ebuild for figuring out the needed blas/cblas bits. Of course if you standardise on openblas this is not so needed.\n\nDebian and now gentoo have this model where you have just `libblas.so`, `libcblas.so` and `liblapack.so` and what is underneath can be changed at runtime. So you don't need to know the implementation. On the other hand numpy has this detection model trying to figure what implementation you may have to figure the correct libraries. It used to be that something different would be built depending on implementation but not anymore. Honestly trying to figure which blas/lapack you are using leads to madness :( which is why we steered towards having standard named .pc files. And historically we shaved some bits from numpy's detection machinery.\n\nOn my TODO list is to switch my sage-on-gentoo from openblas to mkl. The runtime switch means that it should be quick and easy.\n\nThe stuff about `pkgconfig.parse` should be reported as a bug. Although we should check we have currently the latest version first.",
"created_at": "2019-12-14T00:39:11Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432819",
"user": "https://github.com/kiwifb"
}
I originally followed the model of the gentoo ebuild for figuring out the needed blas/cblas bits. Of course if you standardise on openblas this is not so needed.
Debian and now gentoo have this model where you have just libblas.so
, libcblas.so
and liblapack.so
and what is underneath can be changed at runtime. So you don't need to know the implementation. On the other hand numpy has this detection model trying to figure what implementation you may have to figure the correct libraries. It used to be that something different would be built depending on implementation but not anymore. Honestly trying to figure which blas/lapack you are using leads to madness :( which is why we steered towards having standard named .pc files. And historically we shaved some bits from numpy's detection machinery.
On my TODO list is to switch my sage-on-gentoo from openblas to mkl. The runtime switch means that it should be quick and easy.
The stuff about pkgconfig.parse
should be reported as a bug. Although we should check we have currently the latest version first.
archive/issue_comments_432820.json:
{
"body": "<div id=\"comment:42\" align=\"right\">comment:42</div>\n\nwith up-to-date pkgconfig (version 1.5.1)\nI get \n\n```\n$ ./sage --python\nPython 3.7.3 (default, Dec 13 2019, 17:59:09) \n[GCC 8.3.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import pkgconfig\n>>> pkgconfig.parse('blas')\ndefaultdict(<class 'list'>, {'include_dirs': ['/usr/include/x86_64-linux-gnu'], 'libraries': ['openblas']})\n>>> pkgconfig.parse('cblas blas')\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py\", line 248, in parse\n _raise_if_not_exists(package)\n File \"/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py\", line 103, in _raise_if_not_exists\n raise PackageNotFoundError(package)\npkgconfig.pkgconfig.PackageNotFoundError: cblas not found\n>>> \n```\nThat is, after the update the script might just error out (`cblas` need not be present)",
"created_at": "2019-12-14T01:51:01Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432820",
"user": "https://github.com/dimpase"
}
with up-to-date pkgconfig (version 1.5.1) I get
$ ./sage --python
Python 3.7.3 (default, Dec 13 2019, 17:59:09)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkgconfig
>>> pkgconfig.parse('blas')
defaultdict(<class 'list'>, {'include_dirs': ['/usr/include/x86_64-linux-gnu'], 'libraries': ['openblas']})
>>> pkgconfig.parse('cblas blas')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 248, in parse
_raise_if_not_exists(package)
File "/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
raise PackageNotFoundError(package)
pkgconfig.pkgconfig.PackageNotFoundError: cblas not found
>>>
That is, after the update the script might just error out (cblas
need not be present)
archive/issue_comments_432821.json:
{
"body": "<div id=\"comment:43\" align=\"right\">comment:43</div>\n\nReplying to [@dimpase](#comment%3A42):\n> with up-to-date pkgconfig (version 1.5.1)\n> I get \n> \n> ```\n> $ ./sage --python\n> Python 3.7.3 (default, Dec 13 2019, 17:59:09) \n> [GCC 8.3.0] on linux\n> Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n> >>> import pkgconfig\n> >>> pkgconfig.parse('blas')\n> defaultdict(<class 'list'>, {'include_dirs': ['/usr/include/x86_64-linux-gnu'], 'libraries': ['openblas']})\n> >>> pkgconfig.parse('cblas blas')\n> Traceback (most recent call last):\n> File \"<stdin>\", line 1, in <module>\n> File \"/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py\", line 248, in parse\n> _raise_if_not_exists(package)\n> File \"/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py\", line 103, in _raise_if_not_exists\n> raise PackageNotFoundError(package)\n> pkgconfig.pkgconfig.PackageNotFoundError: cblas not found\n> >>> \n> ```\n> That is, after the update the script might just error out (`cblas` need not be present) \n\nYes. So I think for that part\n1. upgrade `pkgconfig`\n2. put a `try`-`expect` block in the script\nfirst we try with both, if the right exception is raised we try only `blas` and if that errors too, something is wrong and we should bail out.",
"created_at": "2019-12-14T02:07:35Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432821",
"user": "https://github.com/kiwifb"
}
Replying to @dimpase:
with up-to-date pkgconfig (version 1.5.1) I get
$ ./sage --python Python 3.7.3 (default, Dec 13 2019, 17:59:09) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pkgconfig >>> pkgconfig.parse('blas') defaultdict(<class 'list'>, {'include_dirs': ['/usr/include/x86_64-linux-gnu'], 'libraries': ['openblas']}) >>> pkgconfig.parse('cblas blas') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 248, in parse _raise_if_not_exists(package) File "/home/dimpase/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists raise PackageNotFoundError(package) pkgconfig.pkgconfig.PackageNotFoundError: cblas not found >>>
That is, after the update the script might just error out (
cblas
need not be present)
Yes. So I think for that part
- upgrade
pkgconfig
- put a
try
-expect
block in the script first we try with both, if the right exception is raised we try onlyblas
and if that errors too, something is wrong and we should bail out.
archive/issue_comments_432822.json:
{
"body": "<div id=\"comment:44\" align=\"right\">comment:44</div>\n\nI've opened #28883 for pkgconfig upgrade. \n\nI should also add cblas to the list of link the branch here is installing.",
"created_at": "2019-12-14T02:27:50Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432822",
"user": "https://github.com/dimpase"
}
I've opened #28883 for pkgconfig upgrade.
I should also add cblas to the list of link the branch here is installing.
archive/issue_comments_432823.json:
{
"body": "Dependencies: **#28883**",
"created_at": "2019-12-14T02:27:50Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432823",
"user": "https://github.com/dimpase"
}
Dependencies: #28883
archive/issue_comments_432824.json:
{
"body": "<div id=\"comment:45\"></div>\n\nBranch pushed to git repo; I updated commit sha1. This was a forced push. New commits:\n<table><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/e5c91dbb4d313d43f05cf3d33fc1758ac089613d\"><code>e5c91db</code></a></td><td><code>update pkgconfig to v1.5.1. See trac #28883</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/1720b38cdca1aa6c436a4b579545c227d3a313fc\"><code>1720b38</code></a></td><td><code>a bare minumim openblas config</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/925266bfb2e8446e4fadd09eea86d7c04534eed6\"><code>925266b</code></a></td><td><code>use openblas.pc for blas and lapack, don't require atlas is to be used</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/b89df80e245766884e59d78accfe809e240ad2ba\"><code>b89df80</code></a></td><td><code>move blas handling to build/pkgs/</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed\"><code>6341576</code></a></td><td><code>create cblas.pc link, too, not only blas and lapack</code></td></tr></table>\n",
"created_at": "2019-12-14T10:00:43Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432824",
"user": "https://github.com/sagetrac-git"
}
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
e5c91db | update pkgconfig to v1.5.1. See trac #28883 |
1720b38 | a bare minumim openblas config |
925266b | use openblas.pc for blas and lapack, don't require atlas is to be used |
b89df80 | move blas handling to build/pkgs/ |
6341576 | create cblas.pc link, too, not only blas and lapack |
archive/issue_comments_432825.json:
{
"body": "Changed commit from **[`cb725d3`](https://github.com/sagemath/sagetrac-mirror/commit/cb725d388640d1791778cb5788cdc2ee9482581e)** to **[`6341576`](https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed)**",
"created_at": "2019-12-14T10:00:43Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432825",
"user": "https://github.com/sagetrac-git"
}
Changed commit from cb725d3
to 6341576
archive/issue_events_379284.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-14T11:09:57Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20work",
"label_color": "ffff00",
"label_name": "needs work",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379284"
}
archive/issue_events_379285.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-14T11:09:57Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379285"
}
archive/issue_comments_432826.json:
{
"body": "<div id=\"comment:47\" align=\"right\">comment:47</div>\n\nPossibly dumb question: why are we looking for `openblas` rather than for `blas` and `lapack` ?\n\nFrom my systemwide Debian pkg-confi (afrter a reboot):\n\n```\ncharpent@zen-book-flip:/usr/local/sage-9$ pkg-config --libs --cflags openblas\nPackage openblas was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openblas.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'openblas' found\ncharpent@zen-book-flip:/usr/local/sage-9$ pkg-config --libs --cflags blas\n-I/usr/include/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/openblas -lblas\ncharpent@zen-book-flip:/usr/local/sage-9$ pkg-config --libs --cflags lapack\n-I/usr/include/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/openblas -llapack\n```\n\n[ Snip... ]",
"created_at": "2019-12-14T16:16:35Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432826",
"user": "https://github.com/EmmanuelCharpentier"
}
Possibly dumb question: why are we looking for openblas
rather than for blas
and lapack
?
From my systemwide Debian pkg-confi (afrter a reboot):
charpent@zen-book-flip:/usr/local/sage-9$ pkg-config --libs --cflags openblas
Package openblas was not found in the pkg-config search path.
Perhaps you should add the directory containing `openblas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openblas' found
charpent@zen-book-flip:/usr/local/sage-9$ pkg-config --libs --cflags blas
-I/usr/include/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/openblas -lblas
charpent@zen-book-flip:/usr/local/sage-9$ pkg-config --libs --cflags lapack
-I/usr/include/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/openblas -llapack
[ Snip... ]
archive/issue_comments_432827.json:
{
"body": "<div id=\"comment:48\" align=\"right\">comment:48</div>\n\nit seems to be Debian (testing/unstable) bug.",
"created_at": "2019-12-14T16:31:18Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432827",
"user": "https://github.com/dimpase"
}
it seems to be Debian (testing/unstable) bug.
archive/issue_comments_432828.json:
{
"body": "<div id=\"comment:49\" align=\"right\">comment:49</div>\n\n\"generic\" blas and lapack may be very different from what Sage needs, it is a tough call to test whether everything needed is there.",
"created_at": "2019-12-14T16:43:58Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432828",
"user": "https://github.com/dimpase"
}
"generic" blas and lapack may be very different from what Sage needs, it is a tough call to test whether everything needed is there.
archive/issue_comments_432829.json:
{
"body": "<div id=\"comment:50\" align=\"right\">comment:50</div>\n\nWell... Starting from #28883, I created a local branch in which I merged #27870, then `make openblas-clean`, then `./bootstrap`, then `./configure`.\n\nWhen I started make, the first thing it did was to recompile openblas...\n\nAnd, sure enough, my `config.log` contains:\n\n```\nconfigure:11316: === checking whether to install the openblas SPKG ===\nconfigure:11334: checking BLAS library\nconfigure:11353: result: openblas\nconfigure:11395: checking for OPENBLAS\nconfigure:11402: $PKG_CONFIG --exists --print-errors \"openblas >= 0.3.5\"\nPackage openblas was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openblas.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'openblas' found\nconfigure:11405: $? = 1\nconfigure:11419: $PKG_CONFIG --exists --print-errors \"openblas >= 0.3.5\"\nPackage openblas was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openblas.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'openblas' found\nconfigure:11422: $? = 1\nconfigure:11436: result: no\nNo package 'openblas' found\n```",
"created_at": "2019-12-14T16:58:26Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432829",
"user": "https://github.com/EmmanuelCharpentier"
}
Well... Starting from #28883, I created a local branch in which I merged #27870, then make openblas-clean
, then ./bootstrap
, then ./configure
.
When I started make, the first thing it did was to recompile openblas...
And, sure enough, my config.log
contains:
configure:11316: === checking whether to install the openblas SPKG ===
configure:11334: checking BLAS library
configure:11353: result: openblas
configure:11395: checking for OPENBLAS
configure:11402: $PKG_CONFIG --exists --print-errors "openblas >= 0.3.5"
Package openblas was not found in the pkg-config search path.
Perhaps you should add the directory containing `openblas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openblas' found
configure:11405: $? = 1
configure:11419: $PKG_CONFIG --exists --print-errors "openblas >= 0.3.5"
Package openblas was not found in the pkg-config search path.
Perhaps you should add the directory containing `openblas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openblas' found
configure:11422: $? = 1
configure:11436: result: no
No package 'openblas' found
archive/issue_comments_432830.json:
{
"body": "<div id=\"comment:51\" align=\"right\">comment:51</div>\n\n#28883 has nothing to do with testing Debian distro bug that you reported, it is meant for MacOS problem reported by John.\n\nIf you want to try to use the `openblas.pc` you have, you can do\n\n```\nexport PKG_CONFIG_PATH=\"/usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig\"\nmake openblas-clean\n./configure # - and check the output - for openblas not being installed\n```\nif this worked you can try building, i.e. `make` or `make build`...",
"created_at": "2019-12-14T17:40:38Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432830",
"user": "https://github.com/dimpase"
}
#28883 has nothing to do with testing Debian distro bug that you reported, it is meant for MacOS problem reported by John.
If you want to try to use the openblas.pc
you have, you can do
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig"
make openblas-clean
./configure # - and check the output - for openblas not being installed
if this worked you can try building, i.e. make
or make build
...
archive/issue_comments_432831.json:
{
"body": "<div id=\"comment:52\" align=\"right\">comment:52</div>\n\nIt's true I usually use MacOS, but for this ticket I've been using an Ubuntu virtual machine, so #28883 is relevant.",
"created_at": "2019-12-14T17:53:01Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432831",
"user": "https://github.com/jhpalmieri"
}
It's true I usually use MacOS, but for this ticket I've been using an Ubuntu virtual machine, so #28883 is relevant.
archive/issue_comments_432832.json:
{
"body": "<div id=\"comment:53\" align=\"right\">comment:53</div>\n\nReplying to [@jhpalmieri](#comment%3A52):\n> It's true I usually use MacOS, but for this ticket I've been using an Ubuntu virtual machine, so #28883 is relevant.\n\nright, indeed. Anyway, #28883 is meant to fix a problem with building numpy with already configured external openblas, rather than a configuration problem of newer Debians.",
"created_at": "2019-12-14T18:11:36Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432832",
"user": "https://github.com/dimpase"
}
Replying to @jhpalmieri:
It's true I usually use MacOS, but for this ticket I've been using an Ubuntu virtual machine, so #28883 is relevant.
right, indeed. Anyway, #28883 is meant to fix a problem with building numpy with already configured external openblas, rather than a configuration problem of newer Debians.
archive/issue_comments_432833.json:
{
"body": "<div id=\"comment:54\" align=\"right\">comment:54</div>\n\nReplying to [@dimpase](#comment%3A51):\n> #28883 has nothing to do with testing Debian distro bug that you reported, it is meant for MacOS problem reported by John.\n> \n> If you want to try to use the `openblas.pc` you have, you can do\n> \n> ```\n> export PKG_CONFIG_PATH=\"/usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig\"\n> make openblas-clean\n> ./configure # - and check the output - for openblas not being installed\n> ```\n> if this worked you can try building, i.e. `make` or `make build`...\n\nThis *seems* to have worked. Now `make`ing. Don't hold your breath...\n\n**EDIT :** `make` went directly to building the docs, which seems fishy : I expected it to recompile openblas-dependent packages (among them R). But these binaries somehow have caught the change :\n\n```\ncharpent@zen-book-flip:/usr/local/sage-9$ ./sage -R\n\nR version 3.6.1 (2019-07-05) -- \"Action of the Toes\"\n\n[ Snip ... ]\n\n> sessionInfo()\nR version 3.6.1 (2019-07-05)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Debian GNU/Linux bullseye/sid\n\nMatrix products: default\nBLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.7.so\n\n[ re-Snip... ]\n\n```\n\nSo it seems to work.\n\nIn your opinion (prbably better than mine), is the need to set PKG_CONFIG_PATH enough to block a `positive review` ?\n\nAnyway, `ptestlong` underway...",
"created_at": "2019-12-14T18:41:41Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432833",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @dimpase:
#28883 has nothing to do with testing Debian distro bug that you reported, it is meant for MacOS problem reported by John.
If you want to try to use the
openblas.pc
you have, you can doexport PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig" make openblas-clean ./configure # - and check the output - for openblas not being installed
if this worked you can try building, i.e.
make
ormake build
...
This seems to have worked. Now make
ing. Don't hold your breath...
EDIT : make
went directly to building the docs, which seems fishy : I expected it to recompile openblas-dependent packages (among them R). But these binaries somehow have caught the change :
charpent@zen-book-flip:/usr/local/sage-9$ ./sage -R
R version 3.6.1 (2019-07-05) -- "Action of the Toes"
[ Snip ... ]
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux bullseye/sid
Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.7.so
[ re-Snip... ]
So it seems to work.
In your opinion (prbably better than mine), is the need to set PKG_CONFIG_PATH enough to block a positive review
?
Anyway, ptestlong
underway...
archive/issue_comments_432834.json:
{
"body": "<div id=\"comment:55\" align=\"right\">comment:55</div>\n\nHow can a bug in Debian, which can be worked around by setting appropriately `PKG_CONFIG_PATH`, be a blocker to this? It cannot work for all the broken systems out there :-)\n\nE.g. Homebrew (on MacOS) also installs openblas somewhere strange, with a need to set `PKG_CONFIG_PATH` (it tells you this, actually).",
"created_at": "2019-12-14T18:57:31Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432834",
"user": "https://github.com/dimpase"
}
How can a bug in Debian, which can be worked around by setting appropriately PKG_CONFIG_PATH
, be a blocker to this? It cannot work for all the broken systems out there :-)
E.g. Homebrew (on MacOS) also installs openblas somewhere strange, with a need to set PKG_CONFIG_PATH
(it tells you this, actually).
archive/issue_events_379286.json:
{
"actor": "https://github.com/EmmanuelCharpentier",
"created_at": "2019-12-14T20:29:47Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379286"
}
archive/issue_events_379287.json:
{
"actor": "https://github.com/EmmanuelCharpentier",
"created_at": "2019-12-14T20:29:47Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/positive%20review",
"label_color": "dfffc0",
"label_name": "positive review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379287"
}
archive/issue_comments_432835.json:
{
"body": "<div id=\"comment:56\" align=\"right\">comment:56</div>\n\nReplying to [@dimpase](#comment%3A55):\n> How can a bug in Debian, which can be worked around by setting appropriately `PKG_CONFIG_PATH`, be a blocker to this? It cannot work for all the broken systems out there :-)\n> \n> E.g. Homebrew (on MacOS) also installs openblas somewhere strange, with a need to set `PKG_CONFIG_PATH` (it tells you this, actually).\n\nOkay.\n\nAnyway, `ptestlong` gets two permanent failures (and no transient):\n\n```\ncharpent@zen-book-flip:/usr/local/sage-9$ sage -t --long --warn-long 178.2 src/sage/numerical/backends/glpk_backend.pyx # 1 doctest failed\nRunning doctests with ID 2019-12-14-21-20-56-a860b5d2.\nGit branch: t/27870/packages/openblas/openblasconf\nUsing --optional=build,dochtml,memlimit,sage\nDoctesting 1 file.\nsage -t --long --warn-long 178.2 src/sage/numerical/backends/glpk_backend.pyx\n**********************************************************************\nFile \"src/sage/numerical/backends/glpk_backend.pyx\", line 2287, in sage.numerical.backends.glpk_backend.GLPKBackend.print_ranges\nFailed example:\n p.print_ranges()\nExpected:\n glp_print_ranges: optimal basic solution required\n 1\nGot:\n 1\n**********************************************************************\n1 item had failures:\n 1 of 13 in sage.numerical.backends.glpk_backend.GLPKBackend.print_ranges\n [554 tests, 1 failure, 3.70 s]\n----------------------------------------------------------------------\nsage -t --long --warn-long 178.2 src/sage/numerical/backends/glpk_backend.pyx # 1 doctest failed\n----------------------------------------------------------------------\nTotal time for all tests: 3.8 seconds\n cpu time: 3.6 seconds\n cumulative wall time: 3.7 seconds\n```\n\n```\ncharpent@zen-book-flip:/usr/local/sage-9$ sage -t --long --warn-long 178.2 src/sage/libs/glpk/error.pyx # 1 doctest failed\nRunning doctests with ID 2019-12-14-21-21-18-8e3dc9e1.\nGit branch: t/27870/packages/openblas/openblasconf\nUsing --optional=build,dochtml,memlimit,sage\nDoctesting 1 file.\nsage -t --long --warn-long 178.2 src/sage/libs/glpk/error.pyxThos failures have already been reported for the same machine \n**********************************************************************\nFile \"src/sage/libs/glpk/error.pyx\", line 100, in sage.libs.glpk.error.setup_glpk_error_handler\nFailed example:\n res = p.solve()\nExpected:\n 0: obj = ...\nGot:\n <BLANKLINE>\n**********************************************************************\n1 item had failures:\n 1 of 11 in sage.libs.glpk.error.setup_glpk_error_handler\n [12 tests, 1 failure, 0.72 s]\n----------------------------------------------------------------------\nsage -t --long --warn-long 178.2 src/sage/libs/glpk/error.pyx # 1 doctest failed\n----------------------------------------------------------------------\nTotal time for all tests: 0.7 seconds\n cpu time: 0.4 seconds\n cumulative wall time: 0.7 seconds\n```\n\nThose failures were already reported (in [sage-release](https://groups.google.com/d/msg/sage-release/p3mnazZ58HQ/0neeoSraBQAJ)) for the same machine and the same version of (Python 3-based) 9.0.beta9. Therefore, they do do not seem to be related to the current patch.\n\n==> `positive_review`, subject to better-informed advice...",
"created_at": "2019-12-14T20:29:47Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432835",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @dimpase:
How can a bug in Debian, which can be worked around by setting appropriately
PKG_CONFIG_PATH
, be a blocker to this? It cannot work for all the broken systems out there :-)E.g. Homebrew (on MacOS) also installs openblas somewhere strange, with a need to set
PKG_CONFIG_PATH
(it tells you this, actually).
Okay.
Anyway, ptestlong
gets two permanent failures (and no transient):
charpent@zen-book-flip:/usr/local/sage-9$ sage -t --long --warn-long 178.2 src/sage/numerical/backends/glpk_backend.pyx # 1 doctest failed
Running doctests with ID 2019-12-14-21-20-56-a860b5d2.
Git branch: t/27870/packages/openblas/openblasconf
Using --optional=build,dochtml,memlimit,sage
Doctesting 1 file.
sage -t --long --warn-long 178.2 src/sage/numerical/backends/glpk_backend.pyx
**********************************************************************
File "src/sage/numerical/backends/glpk_backend.pyx", line 2287, in sage.numerical.backends.glpk_backend.GLPKBackend.print_ranges
Failed example:
p.print_ranges()
Expected:
glp_print_ranges: optimal basic solution required
1
Got:
1
**********************************************************************
1 item had failures:
1 of 13 in sage.numerical.backends.glpk_backend.GLPKBackend.print_ranges
[554 tests, 1 failure, 3.70 s]
----------------------------------------------------------------------
sage -t --long --warn-long 178.2 src/sage/numerical/backends/glpk_backend.pyx # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 3.8 seconds
cpu time: 3.6 seconds
cumulative wall time: 3.7 seconds
charpent@zen-book-flip:/usr/local/sage-9$ sage -t --long --warn-long 178.2 src/sage/libs/glpk/error.pyx # 1 doctest failed
Running doctests with ID 2019-12-14-21-21-18-8e3dc9e1.
Git branch: t/27870/packages/openblas/openblasconf
Using --optional=build,dochtml,memlimit,sage
Doctesting 1 file.
sage -t --long --warn-long 178.2 src/sage/libs/glpk/error.pyxThos failures have already been reported for the same machine
**********************************************************************
File "src/sage/libs/glpk/error.pyx", line 100, in sage.libs.glpk.error.setup_glpk_error_handler
Failed example:
res = p.solve()
Expected:
0: obj = ...
Got:
<BLANKLINE>
**********************************************************************
1 item had failures:
1 of 11 in sage.libs.glpk.error.setup_glpk_error_handler
[12 tests, 1 failure, 0.72 s]
----------------------------------------------------------------------
sage -t --long --warn-long 178.2 src/sage/libs/glpk/error.pyx # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 0.7 seconds
cpu time: 0.4 seconds
cumulative wall time: 0.7 seconds
Those failures were already reported (in sage-release) for the same machine and the same version of (Python 3-based) 9.0.beta9. Therefore, they do do not seem to be related to the current patch.
==> positive_review
, subject to better-informed advice...
archive/issue_comments_432836.json:
{
"body": "<div id=\"comment:58\" align=\"right\">comment:58</div>\n\nWorks for me with conda.",
"created_at": "2019-12-15T01:17:29Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432836",
"user": "https://github.com/isuruf"
}
Works for me with conda.
archive/issue_comments_432837.json:
{
"body": "Reviewer: **Isuru Fernando**",
"created_at": "2019-12-15T01:17:29Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432837",
"user": "https://github.com/isuruf"
}
Reviewer: Isuru Fernando
archive/issue_events_379288.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-15T11:46:11Z",
"event": "demilestoned",
"issue": "https://github.com/sagemath/sage/issues/27870",
"milestone_number": null,
"milestone_title": "sage-9.1",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379288"
}
archive/issue_events_379289.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-15T11:46:11Z",
"event": "milestoned",
"issue": "https://github.com/sagemath/sage/issues/27870",
"milestone_number": null,
"milestone_title": "sage-9.0",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379289"
}
archive/issue_comments_432838.json:
{
"body": "<div id=\"comment:60\" align=\"right\">comment:60</div>\n\nReplying to [@EmmanuelCharpentier](#comment%3A39):\n> Replying to [@dimpase](#comment%3A38):\n> > Well, this pretty much looks like a Debian bug. The point of installing `openblas.pc` into a hidden from `pkg-config` directory only makes sense if they plan to install \"competing\" versions of this file in different locations...\n> \n> \n> This is now [Debian bug 946698 ](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946698). For what it's worth...\n\nFWIW, this Debian bug is [claimed](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946698). to have been fixed. In about 45 hours... Pffew !",
"created_at": "2019-12-16T09:47:39Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432838",
"user": "https://github.com/EmmanuelCharpentier"
}
Replying to @EmmanuelCharpentier:
Replying to @dimpase:
Well, this pretty much looks like a Debian bug. The point of installing
openblas.pc
into a hidden frompkg-config
directory only makes sense if they plan to install "competing" versions of this file in different locations...This is now Debian bug 946698 . For what it's worth...
FWIW, this Debian bug is claimed. to have been fixed. In about 45 hours... Pffew !
archive/issue_comments_432839.json:
{
"body": "Changed branch from **[u/dimpase/packages/openblas/openblasconf](https://github.com/sagemath/sagetrac-mirror/tree/u/dimpase/packages/openblas/openblasconf)** to **[`6341576`](https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed)**",
"created_at": "2019-12-20T22:46:06Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432839",
"user": "https://github.com/vbraun"
}
Changed branch from u/dimpase/packages/openblas/openblasconf to 6341576
archive/issue_events_379290.json:
{
"actor": "https://github.com/vbraun",
"created_at": "2019-12-20T22:46:06Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/positive%20review",
"label_color": "dfffc0",
"label_name": "positive review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379290"
}
archive/issue_events_379291.json:
{
"actor": "https://github.com/vbraun",
"created_at": "2019-12-20T22:46:06Z",
"event": "closed",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379291"
}
archive/issue_comments_432840.json:
{
"body": "<div id=\"comment:62\" align=\"right\">comment:62</div>\n\nThis ticket breaks build on OSX:\n\n```\n************************************************************************\nTraceback (most recent call last):\n File \"setup.py\", line 72, in <module>\n from module_list import ext_modules, library_order\n File \"/Users/buildbot-sage/slave/sage_git/build/src/module_list.py\", line 42, in <module>\n zlib_pc = pkgconfig.parse('zlib')\n File \"/Users/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py\", line 248, in parse\n _raise_if_not_exists(package)\n File \"/Users/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py\", line 103, in _raise_if_not_exists\n raise PackageNotFoundError(package)\npkgconfig.pkgconfig.PackageNotFoundError: zlib not found\n************************************************************************\nError building the Sage library\n************************************************************************\n```",
"created_at": "2019-12-22T15:16:26Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432840",
"user": "https://github.com/vbraun"
}
This ticket breaks build on OSX:
************************************************************************
Traceback (most recent call last):
File "setup.py", line 72, in <module>
from module_list import ext_modules, library_order
File "/Users/buildbot-sage/slave/sage_git/build/src/module_list.py", line 42, in <module>
zlib_pc = pkgconfig.parse('zlib')
File "/Users/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 248, in parse
_raise_if_not_exists(package)
File "/Users/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
raise PackageNotFoundError(package)
pkgconfig.pkgconfig.PackageNotFoundError: zlib not found
************************************************************************
Error building the Sage library
************************************************************************
archive/issue_comments_432841.json:
{
"body": "Changed commit from **[`6341576`](https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed)** to none",
"created_at": "2019-12-22T15:16:26Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432841",
"user": "https://github.com/vbraun"
}
Changed commit from 6341576
to none
archive/issue_events_379292.json:
{
"actor": "https://github.com/vbraun",
"created_at": "2019-12-22T15:16:26Z",
"event": "reopened",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379292"
}
archive/issue_comments_432842.json:
{
"body": "<div id=\"comment:63\" align=\"right\">comment:63</div>\n\none needs details such as whether you build zlib or use zlib from the system, whether Python gets correctly built zlib module, etc.\n\nWhat does happen if you do\n\n```\n./sage --python\n>>> import zlib\n```",
"created_at": "2019-12-22T15:23:18Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432842",
"user": "https://github.com/dimpase"
}
one needs details such as whether you build zlib or use zlib from the system, whether Python gets correctly built zlib module, etc.
What does happen if you do
./sage --python
>>> import zlib
archive/issue_comments_432843.json:
{
"body": "<div id=\"comment:64\" align=\"right\">comment:64</div>\n\nShould be the fault of the dependency at #28883",
"created_at": "2019-12-22T15:28:29Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432843",
"user": "https://github.com/vbraun"
}
Should be the fault of the dependency at #28883
archive/issue_events_379293.json:
{
"actor": "https://github.com/vbraun",
"created_at": "2019-12-22T15:28:29Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379293"
}
archive/issue_comments_432844.json:
{
"body": "<div id=\"comment:65\" align=\"right\">comment:65</div>\n\nWell, we do need a newer pkgconfig from #28883 here, and I really have no idea what breaks for you at #28883. Did you try `make distclean` ?",
"created_at": "2019-12-22T15:35:56Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432844",
"user": "https://github.com/dimpase"
}
Well, we do need a newer pkgconfig from #28883 here, and I really have no idea what breaks for you at #28883. Did you try make distclean
?
archive/issue_comments_432845.json:
{
"body": "<div id=\"comment:66\" align=\"right\">comment:66</div>\n\nOn Catalina, there is no zlib in /usr/lib/pkgconfig and we don't build our own zlib with #27870.\n\n```\nbuildbot-sage@osx build % ./sage -sh -c 'pkgconf --cflags zlib'\n\nPackage zlib was not found in the pkg-config search path.\nPerhaps you should add the directory containing `zlib.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'zlib', required by 'world', not found\n```\nAll builds from scratch.",
"created_at": "2019-12-22T15:40:19Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432845",
"user": "https://github.com/vbraun"
}
On Catalina, there is no zlib in /usr/lib/pkgconfig and we don't build our own zlib with #27870.
buildbot-sage@osx build % ./sage -sh -c 'pkgconf --cflags zlib'
Package zlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `zlib.pc'
to the PKG_CONFIG_PATH environment variable
Package 'zlib', required by 'world', not found
All builds from scratch.
archive/issue_events_379294.json:
{
"actor": "https://github.com/vbraun",
"created_at": "2019-12-22T16:01:07Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379294"
}
archive/issue_events_379295.json:
{
"actor": "https://github.com/vbraun",
"created_at": "2019-12-22T16:01:07Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/positive%20review",
"label_color": "dfffc0",
"label_name": "positive review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379295"
}
archive/issue_comments_432846.json:
{
"body": "<div id=\"comment:67\" align=\"right\">comment:67</div>\n\nIs the fault of #28883",
"created_at": "2019-12-22T16:01:07Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432846",
"user": "https://github.com/vbraun"
}
Is the fault of #28883
archive/issue_comments_432847.json:
{
"body": "Changed branch from **[`6341576`](https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed)** to **[u/dimpase/packages/openblas/openblasconf](https://github.com/sagemath/sagetrac-mirror/tree/u/dimpase/packages/openblas/openblasconf)**",
"created_at": "2019-12-22T16:06:43Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432847",
"user": "https://github.com/vbraun"
}
Changed branch from 6341576
to u/dimpase/packages/openblas/openblasconf
archive/issue_comments_432848.json:
{
"body": "Commit: **[`6341576`](https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed)**",
"created_at": "2019-12-22T16:06:43Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432848",
"user": "https://github.com/vbraun"
}
Commit: 6341576
archive/issue_comments_432849.json:
{
"body": "<div id=\"comment:68\"></div>\n\nNew commits:\n<table><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/e5c91dbb4d313d43f05cf3d33fc1758ac089613d\"><code>e5c91db</code></a></td><td><code>update pkgconfig to v1.5.1. See trac #28883</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/1720b38cdca1aa6c436a4b579545c227d3a313fc\"><code>1720b38</code></a></td><td><code>a bare minumim openblas config</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/925266bfb2e8446e4fadd09eea86d7c04534eed6\"><code>925266b</code></a></td><td><code>use openblas.pc for blas and lapack, don't require atlas is to be used</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/b89df80e245766884e59d78accfe809e240ad2ba\"><code>b89df80</code></a></td><td><code>move blas handling to build/pkgs/</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed\"><code>6341576</code></a></td><td><code>create cblas.pc link, too, not only blas and lapack</code></td></tr></table>\n",
"created_at": "2019-12-22T16:06:43Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432849",
"user": "https://github.com/vbraun"
}
New commits:
e5c91db | update pkgconfig to v1.5.1. See trac #28883 |
1720b38 | a bare minumim openblas config |
925266b | use openblas.pc for blas and lapack, don't require atlas is to be used |
b89df80 | move blas handling to build/pkgs/ |
6341576 | create cblas.pc link, too, not only blas and lapack |
archive/issue_events_379296.json:
{
"actor": "https://github.com/sagetrac-git",
"created_at": "2019-12-28T07:41:07Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/positive%20review",
"label_color": "dfffc0",
"label_name": "positive review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379296"
}
archive/issue_events_379297.json:
{
"actor": "https://github.com/sagetrac-git",
"created_at": "2019-12-28T07:41:07Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379297"
}
archive/issue_comments_432850.json:
{
"body": "<div id=\"comment:69\"></div>\n\nBranch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:\n<table><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/f74f5545d2a931f37247185de292689dd9800d35\"><code>f74f554</code></a></td><td><code>update pkgconfig to v1.5.1. See trac #28883</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/fb8f4e51d258ce6cfa8e4b221ff67c94cf80467e\"><code>fb8f4e5</code></a></td><td><code>allow absent zlib.pc</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/b3a8891127194583a8a8e9ac145324f877491848\"><code>b3a8891</code></a></td><td><code>a bare minumim openblas config</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/c031c9ea33b2e6210d571b6939c5faf2e0ed4f84\"><code>c031c9e</code></a></td><td><code>use openblas.pc for blas and lapack, don't require atlas is to be used</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/b49f79eca2bde8ce3ce134dbdc7f01172bd9293c\"><code>b49f79e</code></a></td><td><code>move blas handling to build/pkgs/</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/81bf522a5a417e236f9b9ee4f05256126b5b47cb\"><code>81bf522</code></a></td><td><code>create cblas.pc link, too, not only blas and lapack</code></td></tr></table>\n",
"created_at": "2019-12-28T07:41:07Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432850",
"user": "https://github.com/sagetrac-git"
}
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:
f74f554 | update pkgconfig to v1.5.1. See trac #28883 |
fb8f4e5 | allow absent zlib.pc |
b3a8891 | a bare minumim openblas config |
c031c9e | use openblas.pc for blas and lapack, don't require atlas is to be used |
b49f79e | move blas handling to build/pkgs/ |
81bf522 | create cblas.pc link, too, not only blas and lapack |
archive/issue_comments_432851.json:
{
"body": "Changed commit from **[`6341576`](https://github.com/sagemath/sagetrac-mirror/commit/634157628ac3f7292e7065eae462bb6b80db7aed)** to **[`81bf522`](https://github.com/sagemath/sagetrac-mirror/commit/81bf522a5a417e236f9b9ee4f05256126b5b47cb)**",
"created_at": "2019-12-28T07:41:07Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432851",
"user": "https://github.com/sagetrac-git"
}
Changed commit from 6341576
to 81bf522
archive/issue_comments_432852.json:
{
"body": "<div id=\"comment:70\" align=\"right\">comment:70</div>\n\ntrivial rebase over updated #28883",
"created_at": "2019-12-28T07:42:22Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432852",
"user": "https://github.com/dimpase"
}
trivial rebase over updated #28883
archive/issue_events_379298.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-28T07:42:22Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/needs%20review",
"label_color": "7fff00",
"label_name": "needs review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379298"
}
archive/issue_events_379299.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2019-12-28T07:42:22Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/positive%20review",
"label_color": "dfffc0",
"label_name": "positive review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379299"
}
archive/issue_events_379300.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2020-01-01T14:36:29Z",
"event": "demilestoned",
"issue": "https://github.com/sagemath/sage/issues/27870",
"milestone_number": null,
"milestone_title": "sage-9.0",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379300"
}
archive/issue_events_379301.json:
{
"actor": "https://github.com/dimpase",
"created_at": "2020-01-01T14:36:29Z",
"event": "milestoned",
"issue": "https://github.com/sagemath/sage/issues/27870",
"milestone_number": null,
"milestone_title": "sage-9.1",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379301"
}
archive/issue_comments_432853.json:
{
"body": "<div id=\"comment:72\" align=\"right\">comment:72</div>\n\nCurrently doesn't detect system openblas on Cygwin (which just gets installed as the generic libblas when you install it). Not sure why yet. I won't hold up this ticket over it but if I can find a quick fix I might like to do that.",
"created_at": "2020-01-08T14:38:03Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432853",
"user": "https://github.com/embray"
}
Currently doesn't detect system openblas on Cygwin (which just gets installed as the generic libblas when you install it). Not sure why yet. I won't hold up this ticket over it but if I can find a quick fix I might like to do that.
archive/issue_comments_432854.json:
{
"body": "<div id=\"comment:73\" align=\"right\">comment:73</div>\n\nwhat does `pkg-config --modversion openblas` say?",
"created_at": "2020-01-08T14:51:12Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432854",
"user": "https://github.com/dimpase"
}
what does pkg-config --modversion openblas
say?
archive/issue_comments_432855.json:
{
"body": "<div id=\"comment:74\" align=\"right\">comment:74</div>\n\nReplying to [@embray](#comment%3A72):\n> Currently doesn't detect system openblas on Cygwin (which just gets installed as the generic libblas when you install it). Not sure why yet. I won't hold up this ticket over it but if I can find a quick fix I might like to do that.\n\nI see; it's simply that Cygwin does not install an openblas.pc. That's annoying. I'll see if I can get that fixed upstream. In the meantime we can just leave this as-is.\n\nI think as a broader improvement to the current situation it's worth recognizing that the spkg-install for \"atlas\" actually does two things:\n\n* If you have the old `SAGE_ATLAS_LIB` environment variable set it will just detect and use any old generic BLAS it can find in th given path; it doesn't care if it's actually ATLAS or not.\n* Otherwise it contains steps for specifically building and installing ATLAS from source.\n\nThese two cases seem to be quite at odds with each-other, and the naming of `SAGE_ATLAS_LIB` is misleading.\n\nI think what we should do is this (in a separate ticket):\n\n* Deprecate use of `SAGE_ATLAS_LIB`; it can still work for now but display a deprecation message if it is set sage is configured with `--with-blas=atlas`.\n\n* Clean up the atlas SPKG a bit so it's only responsible for installing ATLAS if requested.\n\n* Add a generic package called just \"blas\" (we could keep openblas as the default though). The spkg-configure.m4 for blas would implement the `--with-blas` flag, and also extend it to take an optional argument of a path (e.g. instead of `--with-blas=openblas` or `--with-blas=atlas` one can pass something like `--with-blas=/usr/lib`. This latter case would have essentially functionality as the current `SAGE_ATLAS_LIB` (maybe a little better): use that path to search for a generic blas library; maybe also check that it contains some known symbols.\n * This is nice, because if you use the `--with-blas=<path>` option you don't get any SPKGs installed for blas, emphasizing that some generic blas on the system is being used.",
"created_at": "2020-01-08T15:02:53Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432855",
"user": "https://github.com/embray"
}
Replying to @embray:
Currently doesn't detect system openblas on Cygwin (which just gets installed as the generic libblas when you install it). Not sure why yet. I won't hold up this ticket over it but if I can find a quick fix I might like to do that.
I see; it's simply that Cygwin does not install an openblas.pc. That's annoying. I'll see if I can get that fixed upstream. In the meantime we can just leave this as-is.
I think as a broader improvement to the current situation it's worth recognizing that the spkg-install for "atlas" actually does two things:
- If you have the old
SAGE_ATLAS_LIB
environment variable set it will just detect and use any old generic BLAS it can find in th given path; it doesn't care if it's actually ATLAS or not. - Otherwise it contains steps for specifically building and installing ATLAS from source.
These two cases seem to be quite at odds with each-other, and the naming of SAGE_ATLAS_LIB
is misleading.
I think what we should do is this (in a separate ticket):
-
Deprecate use of
SAGE_ATLAS_LIB
; it can still work for now but display a deprecation message if it is set sage is configured with--with-blas=atlas
. -
Clean up the atlas SPKG a bit so it's only responsible for installing ATLAS if requested.
-
Add a generic package called just "blas" (we could keep openblas as the default though). The spkg-configure.m4 for blas would implement the
--with-blas
flag, and also extend it to take an optional argument of a path (e.g. instead of--with-blas=openblas
or--with-blas=atlas
one can pass something like--with-blas=/usr/lib
. This latter case would have essentially functionality as the currentSAGE_ATLAS_LIB
(maybe a little better): use that path to search for a generic blas library; maybe also check that it contains some known symbols.- This is nice, because if you use the
--with-blas=<path>
option you don't get any SPKGs installed for blas, emphasizing that some generic blas on the system is being used.
- This is nice, because if you use the
archive/issue_comments_432856.json:
{
"body": "<div id=\"comment:75\" align=\"right\">comment:75</div>\n\niirc, SAGE_ATLAS_LIB is used for two rather different purposes. So there is some cleaning up due.",
"created_at": "2020-01-08T15:23:09Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432856",
"user": "https://github.com/dimpase"
}
iirc, SAGE_ATLAS_LIB is used for two rather different purposes. So there is some cleaning up due.
archive/issue_comments_432857.json:
{
"body": "<div id=\"comment:76\" align=\"right\">comment:76</div>\n\nReplying to [@dimpase](#comment%3A75):\n> iirc, SAGE_ATLAS_LIB is used for two rather different purposes. So there is some cleaning up due.\n\nThe only use of it I could find was in `build/pkgs/atlas/spkg-install.py`. If set, the directory it's set to is searched (in a fairly flimsy manner) for files that look blas-ish, although in one case it does explicitly look for an existing ATLAS install (if any functionality like this is to be kept it should be moved to `atlas/spkg-configure.m4`). If anything is found it creates some symlinks to the found libraries into `SAGE_LOCAL` (this should go away), and also generates some .pc files (also probably can go away and handled more like you did with zlib...)",
"created_at": "2020-01-08T16:24:24Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432857",
"user": "https://github.com/embray"
}
Replying to @dimpase:
iirc, SAGE_ATLAS_LIB is used for two rather different purposes. So there is some cleaning up due.
The only use of it I could find was in build/pkgs/atlas/spkg-install.py
. If set, the directory it's set to is searched (in a fairly flimsy manner) for files that look blas-ish, although in one case it does explicitly look for an existing ATLAS install (if any functionality like this is to be kept it should be moved to atlas/spkg-configure.m4
). If anything is found it creates some symlinks to the found libraries into SAGE_LOCAL
(this should go away), and also generates some .pc files (also probably can go away and handled more like you did with zlib...)
archive/issue_comments_432858.json:
{
"body": "Changed branch from **[u/dimpase/packages/openblas/openblasconf](https://github.com/sagemath/sagetrac-mirror/tree/u/dimpase/packages/openblas/openblasconf)** to **[`81bf522`](https://github.com/sagemath/sagetrac-mirror/commit/81bf522a5a417e236f9b9ee4f05256126b5b47cb)**",
"created_at": "2020-01-09T23:44:36Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432858",
"user": "https://github.com/vbraun"
}
Changed branch from u/dimpase/packages/openblas/openblasconf to 81bf522
archive/issue_events_379302.json:
{
"actor": "https://github.com/vbraun",
"created_at": "2020-01-09T23:44:36Z",
"event": "unlabeled",
"issue": "https://github.com/sagemath/sage/issues/27870",
"label": "https://github.com/sagemath/sage/labels/positive%20review",
"label_color": "dfffc0",
"label_name": "positive review",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379302"
}
archive/issue_events_379303.json:
{
"actor": "https://github.com/vbraun",
"commit_id": "896120d9fd47fbfa563126db5a0aee07f741450c",
"commit_repository": "https://github.com/sagemath/sage",
"created_at": "2020-01-09T23:44:36Z",
"event": "closed",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/27870#event-379303"
}
archive/issue_comments_432859.json:
{
"body": "<div id=\"comment:78\" align=\"right\">comment:78</div>\n\nApparently my rather old Ubuntu lacks a `PKG_CONFIG_VAR` macro, so since this ticket I get:\n\n```\n$ ./bootstrap\nrm -rf config configure build/make/Makefile-auto.in\nbootstrap:69: installing 'config/config.rpath'\nconfigure.ac:328: installing 'config/compile'\nconfigure.ac:113: installing 'config/config.guess'\nconfigure.ac:113: installing 'config/config.sub'\nconfigure.ac:68: installing 'config/install-sh'\nconfigure.ac:68: installing 'config/missing'\nconfigure.ac:453: error: possibly undefined macro: AC_CONFIG_COMMANDS\n If this token and others are legitimate, please use m4_pattern_allow.\n See the Autoconf documentation.\nconfigure:17006: error: possibly undefined macro: PKG_CHECK_VAR\nconfigure:17007: error: possibly undefined macro: AC_CONFIG_LINKS\nconfigure:17012: error: possibly undefined macro: AC_MSG_WARN\n```\n\n(I don't know why it complains first about `AC_CONFIG_COMMANDS` since that's standard autoconf, but it seems likely the problem is stemming from `PKG_CHECK_VAR` being missing.)\n\nI'm going to look into it.",
"created_at": "2020-01-13T13:37:01Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432859",
"user": "https://github.com/embray"
}
Apparently my rather old Ubuntu lacks a PKG_CONFIG_VAR
macro, so since this ticket I get:
$ ./bootstrap
rm -rf config configure build/make/Makefile-auto.in
bootstrap:69: installing 'config/config.rpath'
configure.ac:328: installing 'config/compile'
configure.ac:113: installing 'config/config.guess'
configure.ac:113: installing 'config/config.sub'
configure.ac:68: installing 'config/install-sh'
configure.ac:68: installing 'config/missing'
configure.ac:453: error: possibly undefined macro: AC_CONFIG_COMMANDS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:17006: error: possibly undefined macro: PKG_CHECK_VAR
configure:17007: error: possibly undefined macro: AC_CONFIG_LINKS
configure:17012: error: possibly undefined macro: AC_MSG_WARN
(I don't know why it complains first about AC_CONFIG_COMMANDS
since that's standard autoconf, but it seems likely the problem is stemming from PKG_CHECK_VAR
being missing.)
I'm going to look into it.
archive/issue_comments_432860.json:
{
"body": "Changed commit from **[`81bf522`](https://github.com/sagemath/sagetrac-mirror/commit/81bf522a5a417e236f9b9ee4f05256126b5b47cb)** to none",
"created_at": "2020-01-13T13:37:01Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432860",
"user": "https://github.com/embray"
}
Changed commit from 81bf522
to none
archive/issue_comments_432861.json:
{
"body": "<div id=\"comment:79\" align=\"right\">comment:79</div>\n\nyou must have a past-EOL Ubuntu, I gather.",
"created_at": "2020-01-13T13:48:48Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432861",
"user": "https://github.com/dimpase"
}
you must have a past-EOL Ubuntu, I gather.
archive/issue_comments_432862.json:
{
"body": "<div id=\"comment:80\" align=\"right\">comment:80</div>\n\nReplying to [@embray](#comment%3A74):\n> Replying to [@embray](#comment%3A72):\n> * Add a generic package called just \"blas\" (we could keep openblas as the default though). The spkg-configure.m4 for blas would implement the `--with-blas` flag, and also extend it to take an optional argument of a path (e.g. instead of `--with-blas=openblas` or `--with-blas=atlas` one can pass something like `--with-blas=/usr/lib`. This latter case would have essentially functionality as the current `SAGE_ATLAS_LIB` (maybe a little better): use that path to search for a generic blas library; maybe also check that it contains some known symbols.\n\nPerhaps the idea of a \"generic package\" is overcomplicated for now. Although it's something I've wanted to try to do in the past (#23465) but as a first pass detection of a \"generic blas\" can live in the spkg-configure.m4 for openblas (sort of as we do with gmp/mpir).",
"created_at": "2020-01-13T14:17:41Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432862",
"user": "https://github.com/embray"
}
Replying to @embray:
Replying to @embray:
- Add a generic package called just "blas" (we could keep openblas as the default though). The spkg-configure.m4 for blas would implement the
--with-blas
flag, and also extend it to take an optional argument of a path (e.g. instead of--with-blas=openblas
or--with-blas=atlas
one can pass something like--with-blas=/usr/lib
. This latter case would have essentially functionality as the currentSAGE_ATLAS_LIB
(maybe a little better): use that path to search for a generic blas library; maybe also check that it contains some known symbols.
Perhaps the idea of a "generic package" is overcomplicated for now. Although it's something I've wanted to try to do in the past (#23465) but as a first pass detection of a "generic blas" can live in the spkg-configure.m4 for openblas (sort of as we do with gmp/mpir).
archive/issue_comments_432863.json:
{
"body": "<div id=\"comment:81\" align=\"right\">comment:81</div>\n\nOn the third-hand, because of the way the Sage build uses .pc files for cblas and lapack, and the fact that both the openblas and atlas SPKGs install these .pc files into SAGE_LOCAL, I understand now that even when we detect a system openblas, this ticket uses `AC_CONFIG_LINKS` to create those .pc files as symlinks directly into `$SAGE_LOCAL`.\n\nI don't really like this, because part of my long-term goals has been to make it so that running `configure` doesn't create and write *anything* to `$SAGE_LOCAL` (this preference is in service to issues like #21532). I'm okay with it for now as a temporary solution, but it does seem like a step backwards.\n\nI'm going to see if I can come up with an alternative solution to this...",
"created_at": "2020-01-13T15:06:18Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/27870",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/27870#issuecomment-432863",
"user": "https://github.com/embray"
}
On the third-hand, because of the way the Sage build uses .pc files for cblas and lapack, and the fact that both the openblas and atlas SPKGs install these .pc files into SAGE_LOCAL, I understand now that even when we detect a system openblas, this ticket uses AC_CONFIG_LINKS
to create those .pc files as symlinks directly into $SAGE_LOCAL
.
I don't really like this, because part of my long-term goals has been to make it so that running configure
doesn't create and write anything to $SAGE_LOCAL
(this preference is in service to issues like #21532). I'm okay with it for now as a temporary solution, but it does seem like a step backwards.
I'm going to see if I can come up with an alternative solution to this...