Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

broken on arm? #130

Closed
cbm755 opened this issue Jan 19, 2016 · 9 comments · Fixed by #177
Closed

broken on arm? #130

cbm755 opened this issue Jan 19, 2016 · 9 comments · Fixed by #177

Comments

@cbm755
Copy link
Collaborator

cbm755 commented Jan 19, 2016

I'm packaging for Fedora, seems fine on x86 but tests fail on arm. I don't have a shell account, so hard to debug.

https://kojipkgs.fedoraproject.org//work/tasks/2208/12612208/build.log

Looks like it fails on all texinfo :(

Sniippet of the log:

+ octave -H -q --no-window-system --no-site-file --path /builddir/build/BUILD/doctest-0.4.1/inst --path /builddir/build/BUILD/doctest-0.4.1/src --eval 'r=doctest({"doctest","test/","test/examples/"}); exit(~r);'
Doctest v0.4.1: this is Free Software without warranty, see source.
doctest ................................................ PASS   10/10  
test_class ............................................. PASS    2/2   
@test_class/test_class ................................. PASS    2/2   
@test_class/test_method ................................ PASS    1/1   
test_classdef .......................................... NO TESTS
@test_classdef/amethod ................................. NO TESTS
@test_classdef/test_classdef ........................... NO TESTS
test_shadow ............................................ PASS    1/1   
@test_shadow/test_shadow ............................... PASS    1/1   
test_angle_brackets.m .................................. PASS    2/2   
test_ans.m ............................................. PASS    5/5   
/tmp/octave-help-iEud23:94: unexpected @
/tmp/octave-help-iEud23:97: unexpected @
/tmp/octave-help-iEud23:103: unexpected @
/tmp/octave-help-iEud23:106: unexpected @
/tmp/octave-help-iEud23:112: unexpected @
/tmp/octave-help-iEud23:115: unexpected @
/tmp/octave-help-iEud23:121: unexpected @
/tmp/octave-help-iEud23:124: unexpected @
/tmp/octave-help-iEud23:130: unexpected @
/tmp/octave-help-iEud23:133: unexpected @
/tmp/octave-help-iEud23:139: unexpected @
/tmp/octave-help-iEud23:142: unexpected @
test_ans.texinfo ....................................... PASS    1/1   
test_blank_match.m ..................................... PASS    1/1   
/tmp/octave-help-jcTnsf:94: unexpected @
/tmp/octave-help-jcTnsf:100: unexpected @
/tmp/octave-help-jcTnsf:106: unexpected @
/tmp/octave-help-jcTnsf:112: unexpected @
/tmp/octave-help-jcTnsf:118: unexpected @
/tmp/octave-help-jcTnsf:123: unexpected @
test_comments.texinfo .................................. EXTRACTION ERROR
    malformed @example blocks
test_compare_backspace.m ............................... PASS    1/1   

----------- 8< -----------------

test_skip.m ............................................ PASS    3/3   
/tmp/octave-help-Z3h2dP:95: unexpected @
/tmp/octave-help-Z3h2dP:98: unexpected @
/tmp/octave-help-Z3h2dP:104: unexpected @
/tmp/octave-help-Z3h2dP:107: unexpected @
/tmp/octave-help-Z3h2dP:113: unexpected @
/tmp/octave-help-Z3h2dP:118: unexpected @
/tmp/octave-help-Z3h2dP:125: unexpected @
/tmp/octave-help-Z3h2dP:128: unexpected @
test_skip_comments.texinfo ............................. NO TESTS
test_skip_if.m ......................................... PASS    4/4   
test_skip_if_multiple.m ................................ PASS    5/5   
/tmp/octave-help-DP5F2N:94: unexpected @
/tmp/octave-help-DP5F2N:100: unexpected @
test_skip_malformed.texinfo ............................ EXTRACTION ERROR
    malformed @example blocks
test_skip_only_one.m ................................... NO TESTS
test_skip_unless.m ..................................... PASS    4/4   
/tmp/octave-help-5jqcD6:96: unexpected @
/tmp/octave-help-5jqcD6:103: unexpected @
test_var.texinfo ....................................... EXTRACTION ERROR
    malformed @example blocks
test_warning.m ......................................... PASS    1/1   
test_whitespace.m ...................................... PASS    8/8   
/tmp/octave-help-Ip3pF0:94: unexpected @
/tmp/octave-help-Ip3pF0:99: unexpected @
/tmp/octave-help-Ip3pF0:105: unexpected @
/tmp/octave-help-Ip3pF0:110: unexpected @
/tmp/octave-help-Ip3pF0:116: unexpected @
/tmp/octave-help-Ip3pF0:121: unexpected @
test_windows_eol.texinfo ............................... EXTRACTION ERROR
    malformed @example blocks
test_xfail.m ........................................... PASS    3/3   
/tmp/octave-help-LvAnB9:95: unexpected @
/tmp/octave-help-LvAnB9:98: unexpected @
test_xfail.texinfo ..................................... EXTRACTION ERROR
    malformed @example blocks
test_xfail_if.m ........................................ PASS    6/6   
test_xfail_if_multiple.m ............................... PASS    7/7   
test_xfail_unless.m .................................... PASS    6/6   
greet.m ................................................ PASS    1/1   
Summary:
   PASS   83/83  
32/42 targets passed, 6 without tests, 10 with extraction errors.
error: Bad exit status from /var/tmp/rpm-tmp.io1OW9 (%check)
@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 19, 2016

I used to have a chroot on an android tablet, but I don't think its working right now...

@oheim
Copy link
Collaborator

oheim commented Jan 19, 2016

Let makeinfo write its version info into the build log. Maybe it is heavily outdated.

@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 19, 2016

thanks will try. It should be texinfo 6.0 (because its Fedora rawhide, https://apps.fedoraproject.org/packages/texinfo).

While I think of it, we have a bunch of test/*.texinfo files that are probably not valid texinfo: no header etc. I should fix that sometime.

@oheim
Copy link
Collaborator

oheim commented Jan 19, 2016

While I think of it, we have a bunch of test/*.texinfo files that are probably not valid texinfo: no header etc. I should fix that sometime.

I thought this was okay and these are handled by __makeinfo__ in Octave, but you should better check (since this might be an explanation for the build failure).

@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 20, 2016

I'll try to track it down a bit.

So far, I've learned:

+ makeinfo --version
texi2any (GNU texinfo) 6.0
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

And some simple __makeinfo__ seems to work fine:

+ octave -H -q --no-window-system --no-site-file --eval 's=sprintf("hello\n@example\nex\n@end example\nthe end\n"),[ret,st]=__makeinfo__(s,"plain text")'
s = hello
@example
ex
@end example
the end
ret = hello
     ex
   the end
st = 0

@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 20, 2016

Seems to be related to the Mark the occurrence of “@example” and “@end example” bit, which is doubling the @.

Does not happen on x86. @oheim had previously noted regexprep might be buggy. I'll try some more tests and see if I can workaround it.

So far, escaping as \@ doesn't help.

Mark the occurrence of “@example” and “@end example” to be able to find
example blocks after conversion from texi to plain text.  Also consider
indentation, so we can later correctly unindent the example's content.
str = 
Make sure var macro can be used:
@@example
@###### EXAMPLE START ######
@group
@var{ABC} = 6
@result{} @var{ABC} = 6
@var{aBc} = 7
@result{} @var{aBc} = 7
@end group
@###### EXAMPLE STOP ######
@@end example
special comments "@c doctest: cmd" are translated
str = 
Make sure var macro can be used:
@@example
@###### EXAMPLE START ######
@group
@var{ABC} = 6
@result{} @var{ABC} = 6
@var{aBc} = 7
@result{} @var{aBc} = 7
@end group
@###### EXAMPLE STOP ######
@@end example
*** BEFORE makeinfo call ***
/tmp/octave-help-AHZhK8:96: unexpected @
/tmp/octave-help-AHZhK8:103: unexpected @
*** AFTER makeinfo call ***
str = Make sure var macro can be used:
   @example
   ###### EXAMPLE START ######
   ABC = 6 => ABC = 6 ABC = 7 => ABC = 7
   ###### EXAMPLE STOP ###### @end example
err = 0
test/test_var.texinfo .................................. EXTRACTION ERROR

@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 20, 2016

I have a workaround.

@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 20, 2016

Here is a close-to-MNWE for the problem:

s=sprintf("hello\n@example\nex\n@end example\nthe end\n")
str = regexprep(s, "^([ \t]*)(\@example)(.*)$", "$1\@example$3\n$1###### EXAMPLE START ######", "lineanchors", "dotexceptnewline", "emptymatch")'

On Fedora's arm koji server (architecture: armhfp), this doubles the first @ sign:

str = hello
@@example
@###### EXAMPLE START ######
ex
@end example
the end

whereas on x86 it correctly gives:

str = hello
@example
@###### EXAMPLE START ######
ex
@end example
the end

cbm755 added a commit that referenced this issue Jan 20, 2016
We repeat `@example` instead of trying to use the token given
by the regexp.  Some some reason on armh7p, the token doubles-up
the `@` sign.  Just in case, we also escape the `@` signs to `\@`
(although I don't think this helped).

Fixes #130.
@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 4, 2018

Unfortunately, I'm hitting this or something very similar again on ARM (trying to build 0.6.0 for Fedora). The workaround no longer works.

I've filed upstream https://savannah.gnu.org/bugs/index.php?52810

I will do a different workaround, not using regexprep.

@cbm755 cbm755 reopened this Jan 4, 2018
cbm755 added a commit that referenced this issue Jan 4, 2018
This fixes #130.  Again.  To workaround, we avoid using regexprep and
instead get the tokens with regexp and do the substitution ourselves.
Leave the regexprep code commented out with a link to the newly-submitted
upstream bug.  This can be undone once a fix lands upstream.
Prep for a new release with a minor version bump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants