ros-infrastructure / rosindex

The source code for generating index.ros.org
https://index.ros.org
GNU General Public License v3.0
13 stars 24 forks source link

make build fails: lunr.rb:21:in `each_slice': invalid slice size #190

Closed max-krichenbauer closed 4 years ago

max-krichenbauer commented 4 years ago

Hello!

First a side note: git clone git@github.com:ros-infrastructure/rosindex.git --recursive fails with Permission denied (publickey). git clone https://github.com/ros-infrastructure/rosindex.git --recursive worked. But I don't think this is related to the issue:

I added repo_name_whitelist: [tiny_tf] to _config.yml to do some tests without having to fetch many packages. However, running make build produces the following output and results in failure:

mkdir -p _remotes
vcs import --input _data/remotes.yml --force _remotes
....
=== _remotes/ros2 (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
=== _remotes/rosdep (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
=== _remotes/rosdistro (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
=== _remotes/rosforks (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
bundle exec jekyll build --verbose --trace -d _site --config=_config.yml,index.yml
  Logging at level: debug
Configuration file: _config.yml
Configuration file: index.yml
         Requiring: /home/osboxes/rosindex/_plugins/docs_generator.rb
         Requiring: /home/osboxes/rosindex/_plugins/array_filters.rb
         Requiring: /home/osboxes/rosindex/_plugins/pre_configuration.rb
         Requiring: /home/osboxes/rosindex/_plugins/rosindex_generator.rb
         Requiring: /home/osboxes/rosindex/_plugins/redcarpet_toc.rb
         Requiring: jekyll-sitemap
            Source: /home/osboxes/rosindex
       Destination: _site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       EntryFilter: excluded /node_modules
       EntryFilter: excluded /Gemfile
       EntryFilter: excluded /README.md
       EntryFilter: excluded /docker
       EntryFilter: excluded /Makefile
       EntryFilter: excluded /Gemfile.lock
Scraping documentation pages from repositories...
/usr/bin/python3: No module named sphinx
Generating lunr index for documentation pages...
Traceback (most recent call last):
    23: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
    22: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
    21: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/jekyll:23:in `<main>'
    20: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/jekyll:23:in `load'
    19: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/exe/jekyll:15:in `<top (required)>'
    18: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    17: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    16: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    15: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    14: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    13: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
    12: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:36:in `process'
    11: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:65:in `build'
    10: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/command.rb:28:in `process_site'
     9: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:70:in `process'
     8: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:173:in `generate'
     7: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:173:in `each'
     6: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:175:in `block in generate'
     5: from /home/osboxes/rosindex/_plugins/docs_generator.rb:69:in `generate'
     4: from /home/osboxes/rosindex/_plugins/docs_generator.rb:69:in `to_a'
     3: from /home/osboxes/rosindex/_plugins/docs_generator.rb:69:in `each'
     2: from /home/osboxes/rosindex/_plugins/docs_generator.rb:69:in `each'
     1: from /home/osboxes/rosindex/_ruby_libs/lunr.rb:21:in `block in precompile_lunr_index'
/home/osboxes/rosindex/_ruby_libs/lunr.rb:21:in `each_slice': invalid slice size (ArgumentError)
Makefile:19: recipe for target 'build' failed
make: *** [build] Error 1

Thank you for you work and efforts!

Best regards, Max

hidmic commented 4 years ago

@max-krichenbauer you're missing dependencies:

/usr/bin/python3: No module named sphinx

Error handling could be better.

max-krichenbauer commented 4 years ago

Thanks @hidmic ! I installed the missing dependencies:

pip install Sphinx  sphinx-tabs

I also noticed that it should be nodejs-legacy instead of (or in addition to just) nodejs installed through apt.

However, the error remains (maybe the source of the error is different now but the message is the same):

mkdir -p _remotes
vcs import --input _data/remotes.yml --force _remotes
....
=== _remotes/ros2 (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
=== _remotes/rosdep (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
=== _remotes/rosdistro (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
=== _remotes/rosforks (git) ===
Cloning into '.'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
bundle exec jekyll build --verbose --trace -d _site --config=_config.yml,index.yml
  Logging at level: debug
Configuration file: _config.yml
Configuration file: index.yml
         Requiring: /home/osboxes/rosindex/_plugins/docs_generator.rb
         Requiring: /home/osboxes/rosindex/_plugins/array_filters.rb
         Requiring: /home/osboxes/rosindex/_plugins/pre_configuration.rb
         Requiring: /home/osboxes/rosindex/_plugins/rosindex_generator.rb
         Requiring: /home/osboxes/rosindex/_plugins/redcarpet_toc.rb
         Requiring: jekyll-sitemap
            Source: /home/osboxes/rosindex
       Destination: _site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       EntryFilter: excluded /node_modules
       EntryFilter: excluded /Gemfile
       EntryFilter: excluded /README.md
       EntryFilter: excluded /docker
       EntryFilter: excluded /Makefile
       EntryFilter: excluded /Gemfile.lock
Scraping documentation pages from repositories...
Running Sphinx v2.2.1
loading intersphinx inventory from http://docs.ros.org/independent/api/rosdistro/html/objects.inv...
loading intersphinx inventory from http://docs.ros.org/independent/api/catkin_pkg/html/objects.inv...
loading intersphinx inventory from http://docs.ros.org/independent/api/rosdep/html/objects.inv...
loading intersphinx inventory from http://docs.ros.org/independent/api/rospkg/html/objects.inv...
loading intersphinx inventory from http://docs.ros.org/independent/api/rosinstall/html/objects.inv...
loading intersphinx inventory from http://docs.ros.org/independent/api/jenkins_tools/html/objects.inv...
loading intersphinx inventory from http://docs.ros.org/independent/api/vcstools/html/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [json]: targets for 136 source files that are out of date
updating environment: [new config] 136 added, 0 changed, 0 removed
reading sources... [100%] index                                                                                                                                                                             
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index                                                                                                                                                                              
generating indices...  genindexdone
writing additional pages...  searchdone
copying images... [100%] Governance/lge.svg                                                                                                                                                                 
copying downloadable files... [100%] ../../Marketing/ros2-brochure-a4-web.pdf                                                                                                                               
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

You can now process the JSON files in _remotes/ros2/_build.
WARNING: Not copying tabs assets! Not compatible with json builder
Generating lunr index for documentation pages...
        Generating: DocPageGenerator finished in 28.035365104 seconds.
Using checkout path: /home/osboxes/rosindex/_plugins_data/checkout
processing rosdistro: hydro
Examining doc path: _remotes/rosdistro/doc/hydro
processing rosdistro: indigo
Examining doc path: _remotes/rosdistro/doc/indigo
processing rosdistro: jade
Examining doc path: _remotes/rosdistro/doc/jade
processing rosdistro: lunar
Examining doc path: _remotes/rosdistro/doc/lunar
processing rosdistro: ardent
Examining doc path: _remotes/rosdistro/doc/ardent
processing rosdistro: kinetic
 -- Adding repo tiny_tf instance: github-safijari-tiny_tf from uri: https://github.com/safijari/tiny_tf.git with version: master
Examining doc path: _remotes/rosdistro/doc/kinetic
processing rosdistro: melodic
Examining doc path: _remotes/rosdistro/doc/melodic
processing rosdistro: bouncy
Examining doc path: _remotes/rosdistro/doc/bouncy
processing rosdistro: crystal
Examining doc path: _remotes/rosdistro/doc/crystal
processing rosdistro: dashing
Examining doc path: _remotes/rosdistro/doc/dashing
 - Adding repositories for conman
 - Adding repositories for starmac-ros-pkg
 - Adding repositories for client_rosjava_jni
 - Adding repositories for cram_rosie
 - Adding repositories for ias_common
 - Adding repositories for ias_perception
 - Adding repositories for knowrob
 - Adding repositories for mapping
Found 10 repositories corresponding to 9 repo identifiers.
Fetching sources with 4 threads.
Updating repo / instance tiny_tf / github-safijari-tiny_tf from uri: https://github.com/safijari/tiny_tf.git
Scraping 10 known repos...
[00.00%] Scraping github-safijari-tiny_tf...
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: dashing
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: crystal
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: bouncy
 --- scraping version for tiny_tf instance: github-safijari-tiny_tf distro: melodic
         Requiring: redcarpet
         Requiring: rouge
         Requiring: rouge/plugins/redcarpet
 --- scraping version for tiny_tf instance: github-safijari-tiny_tf distro: kinetic
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: ardent
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: lunar
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: jade
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: indigo
 --- no version for tiny_tf instance: github-safijari-tiny_tf distro: hydro
Generating update report...
Found 2 packages total.
Generating package pages...
Generating repo list pages...
Generating package list pages...
Generating rosdep list pages...
Generating packages search index...
Precompiling lunr index for packages...
Traceback (most recent call last):
    23: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
    22: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
    21: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/jekyll:23:in `<main>'
    20: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/jekyll:23:in `load'
    19: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/exe/jekyll:15:in `<top (required)>'
    18: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    17: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    16: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    15: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    14: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    13: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
    12: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:36:in `process'
    11: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:65:in `build'
    10: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/command.rb:28:in `process_site'
     9: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:70:in `process'
     8: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:173:in `generate'
     7: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:173:in `each'
     6: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:175:in `block in generate'
     5: from /home/osboxes/rosindex/_plugins/rosindex_generator.rb:1463:in `generate'
     4: from /home/osboxes/rosindex/_plugins/rosindex_generator.rb:1463:in `to_a'
     3: from /home/osboxes/rosindex/_plugins/rosindex_generator.rb:1463:in `each'
     2: from /home/osboxes/rosindex/_plugins/rosindex_generator.rb:1463:in `each'
     1: from /home/osboxes/rosindex/_ruby_libs/lunr.rb:21:in `block in precompile_lunr_index'
/home/osboxes/rosindex/_ruby_libs/lunr.rb:21:in `each_slice': invalid slice size (ArgumentError)
Makefile:19: recipe for target 'build' failed
make: *** [build] Error 1

Any ideas?

max-krichenbauer commented 4 years ago

I found a work around by specifying skip_search_index: true in _config.yml, so I guess the error is related to that.

It still fails to build later though:

[...]
           Writing: /home/osboxes/rosindex/_site/stats/index.html
           Writing: /home/osboxes/rosindex/_site/stats/errors/index.html
           Writing: /home/osboxes/rosindex/_site/sitemap.xml
           Writing: /home/osboxes/rosindex/_site/robots.txt
Traceback (most recent call last):
    25: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
    24: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
    23: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/jekyll:23:in `<main>'
    22: from /home/osboxes/.rvm/gems/ruby-2.6.3/bin/jekyll:23:in `load'
    21: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/exe/jekyll:15:in `<top (required)>'
    20: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    19: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    18: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    17: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    16: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    15: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
    14: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:36:in `process'
    13: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:65:in `build'
    12: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/command.rb:28:in `process_site'
    11: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:73:in `process'
    10: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:208:in `write'
     9: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:330:in `each_site_file'
     8: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:330:in `each'
     7: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:331:in `block in each_site_file'
     6: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:331:in `each'
     5: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:332:in `block (2 levels) in each_site_file'
     4: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/site.rb:209:in `block in write'
     3: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/static_file.rb:101:in `write'
     2: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/static_file.rb:74:in `mtime'
     1: from /home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/static_file.rb:69:in `modified_time'
/home/osboxes/.rvm/gems/ruby-2.6.3/gems/jekyll-3.8.5/lib/jekyll/static_file.rb:69:in `stat': No such file or directory @ rb_file_s_stat - /home/osboxes/rosindex/_remotes/ros2/_build/_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css (Errno::ENOENT)
Makefile:19: recipe for target 'build' failed
make: *** [build] Error 1