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

rake test failed #1503

Closed
takahashim opened this issue Jun 11, 2020 · 11 comments
Closed

rake test failed #1503

takahashim opened this issue Jun 11, 2020 · 11 comments

Comments

@takahashim
Copy link
Collaborator

最新のRe:VIEWのソースでrake testするとエラーになります。
TeXLiveのバージョンか何かが原因なんでしょうか?

$ rake test
/Users/maki/.rbenv/versions/2.7.0/bin/ruby test/run_test.rb
Loaded suite test
Started
.....................................................................................................................................................................................................
.....................................................................................................................................................................................................
...............................................WARN review-idgxmlmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007fef989063b8>)
WARN review-idgxmlmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007fef989060c0>)
WARN review-idgxmlmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007fef98905e90>)
.........................................................................................................skip test_inline_idx_yomi (cannot find MeCab)
.............................................
..................................................................................skip test_inline_idx_yomi (cannot find MeCab)
......................................................................................................INFO review-pdfmaker: compiling pre01.tex
WARN review-pdfmaker: pre01.re:0: not found MeCab
INFO review-pdfmaker: compiling ch01.tex
WARN review-pdfmaker: ch01.re:0: not found MeCab
INFO review-pdfmaker: compiling part2.tex
WARN review-pdfmaker: part2.re:0: not found MeCab
INFO review-pdfmaker: compiling ch02.tex
WARN review-pdfmaker: ch02.re:0: not found MeCab
WARN review-pdfmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007f9043a4a508>)
WARN review-pdfmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007f9043a4a1c0>)
WARN review-pdfmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007f9043a49f68>)
INFO review-pdfmaker: compiling ch03.tex
WARN review-pdfmaker: ch03.re:0: not found MeCab
INFO review-pdfmaker: compiling appA.tex
WARN review-pdfmaker: appA.re:0: not found MeCab
INFO review-pdfmaker: compiling bib.tex
WARN review-pdfmaker: bib.re:0: not found MeCab
INFO review-pdfmaker: extractbb ball.png cover-b5.ai cover.jpg fractal.png img3-1.png inlineicon.jpg logic.png logic2.png puzzle.jpg table.jpg
DEBUG review-pdfmaker: erb processes layout.tex.erb
DEBUG review-pdfmaker: erb processes config.erb
INFO review-pdfmaker: lualatex -interaction=nonstopmode -file-line-error -halt-on-error __REVIEW_BOOK__.tex
ERROR review-pdfmaker: failed to run command: lualatex -interaction=nonstopmode -file-line-error -halt-on-error __REVIEW_BOOK__.tex

Error log:
This is LuaTeX, Version 1.10.0 (TeX Live 2019) 
 restricted system commands enabled.
(./__REVIEW_BOOK__.tex
LaTeX2e <2018-12-01>

luaotfload | main : initialization completed in 0.131 seconds
(./review-jlreq.cls
Document Class: review-jlreq 2019/11/11 Re:VIEW pLaTeX class modified for jlreq
. cls
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/local/texlive/2019/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2019/texmf-dist/tex/latex/everypage/everypage.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/jlreq/jlreq.cls
Document Class: jlreq 2019/05/07 jlreq
(/usr/local/texlive/2019/texmf-dist/tex/latex/everyhook/everyhook.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/svn-prov/svn-prov.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2019/texmf-dist/tex/latex/filehook/filehook.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty)
(/usr/local/texlive/2019/texmf-dist/tex/luatex/luatexja/luatexja.sty
(/usr/local/texlive/2019/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
(/usr/local/texlive/2019/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
(/usr/local/texlive/2019/texmf-dist/tex/luatex/ctablestack/ctablestack.sty))
(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/infwarerr/infwarerr.sty)
(/usr/local/texlive/2019/texmf-dist/tex/generic/iftex/iftex.sty)

LaTeX Warning: You have requested, on input line 186, version
               `2019/11/07' of package iftex,
               but only version
               `2013/04/04 v0.2 Provides if(tex) conditional for PDFTeX, XeTeX,
 and LuaTeX'
               is available.

/usr/local/texlive/2019/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty:189: Und
efined control sequence.
l.189 \ifluatex
             
 275 words of node memory still in use:
   1 dir, 3 kern, 1 glyph, 1 attribute, 34 glue_spec, 1 attribute_list, 4 if_st
ack nodes
   avail lists: 2:7,3:1,4:1
/usr/local/texlive/2019/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty:189:  ==
> Fatal error occurred, no output PDF file produced!
Transcript written on __REVIEW_BOOK__.log.

F
=====================================================================================================================================================================================================
     125:       $stderr.puts 'skip test_pdfmaker_cmd_syntax_jlreq_ebook_lualatex'
     126:       return true
     127:     end
  => 128:     common_buildpdf('syntax-book', 'review-jlreq', 'config-jlreq-lualatex.yml', 'syntax-book.pdf')
     129:   end
     130: end
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:128:in `test_pdfmaker_cmd_syntax_jlreq_ebook_lualatex'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:30:in `common_buildpdf'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:30:in `chdir'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:35:in `block in common_buildpdf'
Failure: test_pdfmaker_cmd_syntax_jlreq_ebook_lualatex(PDFMakerCmdTest): <false> is not true.
=====================================================================================================================================================================================================
.........................................................................................................................................WARN review-textmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007fc3d6989bc0>)
WARN review-textmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007fc3d69898a0>)
WARN review-textmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007fc3d69899b8>)
............................................................
..........................................................................
Finished in 57.500856 seconds.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1047 tests, 1892 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
99.9045% passed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18.21 tests/s, 32.90 assertions/s
Coverage report generated for Unit Tests to /Users/maki/tmp/r4/review/coverage. 12863 / 15716 LOC (81.85%) covered.
SimpleCov failed with exit 1
rake aborted!
Command failed with status (1): [/Users/maki/.rbenv/versions/2.7.0/bin/ruby...]
/Users/maki/tmp/r4/review/Rakefile:25:in `block in <top (required)>'
Tasks: TOP => test
(See full trace by running task with --trace)
@munepi
Copy link
Contributor

munepi commented Jun 11, 2020

@takahashim
$ rake test を実行しているTeX環境に対して、以下の2つの点が気になりました。

LuaTeXバイナリとLaTeX2e kernelのバージョン

This is LuaTeX, Version 1.10.0 (TeX Live 2019) 
 restricted system commands enabled.
(./__REVIEW_BOOK__.tex
LaTeX2e <2018-12-01>

のTeX環境はどのようにインストールされましたでしょうか?
TeX Live公式からTeX Live環境を構築すると、 TeX Live 2018 frozen, TeX Live 2019 frozenにおける LuaTeXとLaTeX2e kernelのバージョンは以下のようになります。

TeX Live 2018 frozen

This is LuaTeX, Version 1.07.0 (TeX Live 2018) 
 restricted system commands enabled.
(./test-lualatex.tex
LaTeX2e <2018-12-01>

TeX Live 2019 frozen

This is LuaTeX, Version 1.10.0 (TeX Live 2019) 
 restricted system commands enabled.
(./test-lualatex.tex
LaTeX2e <2020-02-02> patch level 5

iftex.sty のバージョン

LaTeX Warning: You have requested, on input line 186, version
               `2019/11/07' of package iftex,
               but only version
               `2013/04/04 v0.2 Provides if(tex) conditional for PDFTeX, XeTeX,
 and LuaTeX' is available.

TeX Live公式からTeX Live環境を構築すると、 TeX Live 2018 frozen, TeX Live 2019 frozenにおける iftex.sty のバージョンは以下のようになります。

  • TeX Live 2018 frozen: 2013/04/04 v0.2 Provides if(tex) conditional for PDFTeX, XeTeX, and LuaTeX
  • TeX Live 2019 frozen: 2019/11/07 v1.0c TeX engine tests
  • TeX Live 2020 current: 2020/03/06 v1.0d TeX engine tests

@takahashim
Copy link
Collaborator Author

インストール方法は覚えていないんですが…。何か調べ方はありますか?

@kmuto
Copy link
Owner

kmuto commented Jun 12, 2020

$ cd samples/syntax-book
$ REVIEW_TEMPLATE=review-jlreq REVIEW_CONFIG_FILE=config-jlreq-lualatex.yml REVIEW_PDF_OPTIONS=--debug rake pdf

でsyntax-book-pdfに__REVIEW_BOOK__.logがあって、その最後にパッケージ一覧が付いてそうですがいかがでしょう?
あと手元だと

(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)



(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX detected.
)

のようにifluatex.styファイルが読み込まれますね。はて。

@takahashim
Copy link
Collaborator Author

上記コマンド実行後、__REVIEW_BOOK__.log の最後は以下の通りでした。

Here is how much of LuaTeX's memory you used:
 1941 strings out of 494291
 100000,106986 words of node,token memory allocated
 275 words of node memory still in use:
   1 dir, 3 kern, 1 glyph, 1 attribute, 34 glue_spec, 1 attribute_list, 4 if_sta
ck nodes
   avail lists: 2:7,3:1,4:1
 6144 multiletter control sequences out of 65536+600000
 14 fonts using 591799 bytes
 54i,0n,38p,849b,144s stack positions out of 5000i,500n,10000p,200000b,100000s
/usr/local/texlive/2019/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty:189:  ==>
 Fatal error occurred, no output PDF file produced!

Re:VIEWというより私のTeXLive環境の問題なんでしょうか。ううむ。

@kmuto
Copy link
Owner

kmuto commented Jun 12, 2020

あらそうか、\listfilesの前にエラーになっちゃうのか。
うーん、\ifluatexにかかるような変更はRe:VIEW側のcls/styでは何もしてないので、なんか環境が壊れてる感じがしますね…。

@takahashim
Copy link
Collaborator Author

気を取り直してinstall-tlでTeXLive 2020をインストールして試していますが、まだ通っていません。
もうちょっとエラー時の挙動をなんとかするべき?

$ rake test
/Users/maki/.rbenv/versions/2.7.0/bin/ruby test/run_test.rb
Loaded suite test
Started
.....................................................................................................................................................................................................
.....................................................................................................................................................................................................
...............................................WARN review-idgxmlmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007ffa0d97ab30>)
WARN review-idgxmlmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007ffa0d97a888>)
WARN review-idgxmlmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007ffa0d97a590>)
.........................................................................................................skip test_inline_idx_yomi (cannot find MeCab)
.............................................
..................................................................................skip test_inline_idx_yomi (cannot find MeCab)
.....................................................................................................F
=====================================================================================================================================================================================================
     115:       $stderr.puts 'skip test_pdfmaker_cmd_syntax_jlreq_ebook'
     116:       return true
     117:     end
  => 118:     common_buildpdf('syntax-book', 'review-jlreq', 'config-jlreq.yml', 'syntax-book.pdf')
     119:   end
     120: 
     121:   def test_pdfmaker_cmd_syntax_jlreq_ebook_lualatex
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:118:in `test_pdfmaker_cmd_syntax_jlreq_ebook'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:27:in `common_buildpdf'
Failure: test_pdfmaker_cmd_syntax_jlreq_ebook(PDFMakerCmdTest): <false> is not true.
=====================================================================================================================================================================================================
F
=====================================================================================================================================================================================================
     125:       $stderr.puts 'skip test_pdfmaker_cmd_syntax_jlreq_ebook_lualatex'
     126:       return true
     127:     end
  => 128:     common_buildpdf('syntax-book', 'review-jlreq', 'config-jlreq-lualatex.yml', 'syntax-book.pdf')
     129:   end
     130: end
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:128:in `test_pdfmaker_cmd_syntax_jlreq_ebook_lualatex'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:27:in `common_buildpdf'
Failure: test_pdfmaker_cmd_syntax_jlreq_ebook_lualatex(PDFMakerCmdTest): <false> is not true.
=====================================================================================================================================================================================================
F
=====================================================================================================================================================================================================
     105:       $stderr.puts 'skip test_pdfmaker_cmd_syntax_jsbook_ebook'
     106:       return true
     107:     end
  => 108:     common_buildpdf('syntax-book', 'review-jsbook', 'config.yml', 'syntax-book.pdf')
     109:   end
     110: 
     111:   def test_pdfmaker_cmd_syntax_jlreq_ebook
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:108:in `test_pdfmaker_cmd_syntax_jsbook_ebook'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:27:in `common_buildpdf'
Failure: test_pdfmaker_cmd_syntax_jsbook_ebook(PDFMakerCmdTest): <false> is not true.
=====================================================================================================================================================================================================
F
=====================================================================================================================================================================================================
     85:       $stderr.puts 'skip test_pdfmaker_cmd_syntax_jsbook_print'
     86:       return true
     87:     end
  => 88:     common_buildpdf('syntax-book', 'review-jsbook', 'config-print.yml', 'syntax-book.pdf')
     89:   end
     90: 
     91:   def test_pdfmaker_cmd_syntax_jsbook_print_buildonly
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:88:in `test_pdfmaker_cmd_syntax_jsbook_print'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:27:in `common_buildpdf'
Failure: test_pdfmaker_cmd_syntax_jsbook_print(PDFMakerCmdTest): <false> is not true.
=====================================================================================================================================================================================================
F
=====================================================================================================================================================================================================
      95:       $stderr.puts 'skip test_pdfmaker_cmd_syntax_jsbook_print_buildonly'
      96:       return true
      97:     end
  =>  98:     common_buildpdf('syntax-book', 'review-jsbook', 'config-print.yml', 'syntax-book.pdf', '-y ch01')
      99:   end
     100: 
     101:   def test_pdfmaker_cmd_syntax_jsbook_ebook
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:98:in `test_pdfmaker_cmd_syntax_jsbook_print_buildonly'
/Users/maki/tmp/r4/review/test/test_pdfmaker_cmd.rb:27:in `common_buildpdf'
Failure: test_pdfmaker_cmd_syntax_jsbook_print_buildonly(PDFMakerCmdTest): <false> is not true.
=====================================================================================================================================================================================================
......................................................................................................................................WARN review-textmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007f82b1881360>)
WARN review-textmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007f82b1881090>)
WARN review-textmaker: warning: duplicate ID: inlineicon (#<ReVIEW::Book::Index::Item:0x00007f82b1880e60>)
...............................................................
.......................................................................
Finished in 36.404259 seconds.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1047 tests, 1883 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
99.5224% passed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
28.76 tests/s, 51.72 assertions/s
Coverage report generated for Unit Tests to /Users/maki/tmp/r4/review/coverage. 12862 / 15716 LOC (81.84%) covered.
SimpleCov failed with exit 1
rake aborted!
Command failed with status (1): [/Users/maki/.rbenv/versions/2.7.0/bin/ruby...]
/Users/maki/tmp/r4/review/Rakefile:25:in `block in <top (required)>'
Tasks: TOP => test
(See full trace by running task with --trace)

ちなみに cd samples/syntax-book && REVIEW_TEMPLATE=review-jsbook REVIEW_CONFIG_FILE=config.yml rake pdf は普通に通るようです。

@munepi
Copy link
Contributor

munepi commented Jun 12, 2020

インストール方法は覚えていないんですが…。何か調べ方はありますか?

以下の情報をかき集めることで、それとなく分かるかもしれません。

  • /usr/local/texlive/2019/texmf-var/web2c/tlmgr.log
  • /usr/local/texlive/2019/install-tl.log
  • /usr/local/texlive/2019/tlpkg/texlive.tlpdbの各パッケージの revision など
  • /usr/local/texlive/2019/texmf-var/web2c/luatex/lualatex.log

なんとなくですが、TeX Live 2019 pretest の段階で入れたのかもしれませんね。

@takahashim
Copy link
Collaborator Author

なるほど、ありがとうございます!
/usr/local/texlive/2019/install-tl.log によれば、

Trying to verify cryptographic signatures!
Loading http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2019 from: http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet (verified)
Platform: x86_64-darwin => 'MacOSX current (10.12-) on x86_64'
Distribution: net  (downloading)
Using URL: http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet
Directory for temporary files: /tmp/KiGZZRudyZ
Installer revision: 51840
Database revision: 51858
Settings:
  TEXDIR: "/usr/local/texlive/2019"
  TEXMFCONFIG: "~/Library/texlive/2019/texmf-config"
  TEXMFHOME: "~/Library/texmf"
(略)
Generating output for dvipdfmx...
Generating output for ps2pk...
Generating output for dvips...
Generating output for pdftex...

Files generated:
  /usr/local/texlive/2019/texmf-var/fonts/map/dvips/updmap:
       15796 2019-08-12 12:05:12 builtin35.map
       21269 2019-08-12 12:05:12 download35.map
      162338 2019-08-12 12:05:12 psfonts_pk.map
      373015 2019-08-12 12:05:12 psfonts_t1.map
      367304 2019-08-12 12:05:12 ps2pk.map
          14 2019-08-12 12:05:12 psfonts.map -> psfonts_t1.map
  /usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap:
      367311 2019-08-12 12:05:12 pdftex_dl14.map
      365646 2019-08-12 12:05:12 pdftex_ndl14.map
          15 2019-08-12 12:05:12 pdftex.map -> pdftex_dl14.map
  /usr/local/texlive/2019/texmf-var/fonts/map/dvipdfmx/updmap:
        8565 2019-08-12 12:05:12 kanjix.map

といった流れなので、去年の8月ごろにインストールしたようです。

@kmuto
Copy link
Owner

kmuto commented Jun 13, 2020

もともとのstyの話とは別ですが、syntax-book-pdfフォルダが残ったままテスト実行するとテストエラーになってしまうようです。

      builddir = File.join(@tmpdir1, config['bookname'] + '-pdf')
      assert !File.exist?(builddir)

としてるんだけど、どこかでロジックミスしているようなので後で確認します。


そうか、prepare_samplebookで全部コピーしてるからか。
#1504 で直しておきました。

@takahashim
Copy link
Collaborator Author

おお、なるほど。試してみます

@takahashim
Copy link
Collaborator Author

動きました! 結局こちらの環境の問題だったようですね。(どうやったら直るんだろう…というのはありますが)どうもお騒がせしました。

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

No branches or pull requests

3 participants