Tiny patch for error reporting of bundled extension configuration

Discussions on installation issues go here.

Moderator: Moderators

mkoeppe
Posts: 17
Joined: 27 Jun 2016, 19:44

Tiny patch for error reporting of bundled extension configuration

Postby mkoeppe » 05 Aug 2016, 18:46

We had a misconfiguration in shared libraries, which caused the bundled extension configuration to fail with the following output:

Code: Select all

bundled extension bliss ... /tmp/polymake_21906_configure: error while loading shared libraries: libgmp.so.16: cannot open shared object file: No such file or directory bundled extension cdd ... /tmp/polymake_21906_configure: error while loading shared libraries: libgmp.so.16: cannot open shared object file: No such file or directory
Our misconfiguration is now solved, but I think these errors should rather show up in the bundled log. I attach a patch.

Code: Select all

diff --git a/perllib/Polymake/Configure.pm b/perllib/Polymake/Configure.pm index fc3f08a..fa121ee 100644 --- a/perllib/Polymake/Configure.pm +++ b/perllib/Polymake/Configure.pm @@ -422,7 +422,7 @@ sub compile_test_program { # Run the program previously build with `build_test_program'. sub run_test_program { - `$tempdir/polymake_${$}_configure` + `$tempdir/polymake_${$}_configure 2>&1` } END {
(also available as a commit on https://github.com/mkoeppe/polymake/tree/sage-package)

By the way, it would be great if the tempfiles that configure creates were kept around when there's an error. This would make debugging easier.

User avatar
gawrilow
Main Author
Posts: 308
Joined: 25 Dec 2010, 17:40

Re: Tiny patch for error reporting of bundled extension configuration

Postby gawrilow » 05 Aug 2016, 21:05

I think these errors should rather show up in the bundled log.
A good idea. We'll include your patch into the master branch.
it would be great if the tempfiles that configure creates were kept around when there's an error.
Also a good idea but not by default; lacking third-party library prerequisite for some bundled extension may be the reason for a failure, but for the user it could be an expected behavior, as they know in advance that they won't need it anyway. We'll add an option --debug or --keep-tempfiles and mention it in the message where unconfigured bundled extensions are listed.


Return to “Installing polymake”

cron