undeclared variable $__last_help

Questions and problems about using polymake go here.
ren
Posts: 38
Joined: 03 May 2011, 15:21

undeclared variable $__last_help

Postby ren » 05 Jun 2017, 14:19

I just freshly built polymake 3.1, however I get the following error when I try to run it:

Code: Select all

ren@lukas:~/polymake$ polymake Welcome to polymake version 3.1 Copyright (c) 1997-2017 Ewgenij Gawrilow, Michael Joswig (TU Berlin) [...] Loading applications now...polymake: ERROR: Error in rules embedded in a C++ client: reference to an undeclared variable $__last_help at Polymake::Core::Application=ARRAY(0x480aff0) line 1.
Starting polymake with '--no-config' option works fine, but the error above shows up as soon as I try to import an extension of mine. I definitely think that the error is connected to the extension I am trying to import, but grep claims it does not contain the string '__last_help'.

Any tips on what might cause the error is much appreciated (did anything change regarding extensions in the last release?). I have uploaded the extension (it is the one Simon wrote for me some months ago).
Attachments
yueshasse.tar.gz
(4.54 KiB) Downloaded 279 times

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

Re: undeclared variable $__last_help

Postby gawrilow » 06 Jun 2017, 00:15

This is an internal variable automatically injected by the rule file transformer. Most probably some embedded user function definition is malformed, or Simon used some feature untested before and indeed revealed a bug. I'll look at it asap.

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

Re: undeclared variable $__last_help

Postby gawrilow » 06 Jun 2017, 02:43

The reason for the failure is the empty documentation string in the perl glue definition of compute_kspans. You should either provide some user-friendly text:

Code: Select all

UserFunction4perl("# this function computes this and that" "# @param Matrix lattice_points ..." "# ...", &compute_kspans, "compute_kspans(...)");
or define it as Function4Perl.

Admittedly, the error message is of no great help for understanding the problem. Unfortunately, UserFunction4perl is a macro concatenating the documentation string with the signature and some other obscure stuff, so it's difficult to write a proper assertion in the code which would also detect strings of non-zero length but consisting solely of white spaces (they would trigger the same failure)... I'll try to think out some check for the future. For now, just fix the comments.


Return to “Helpdesk”