Ctags: rst2man: error: no existe esa opción: --syntax-highlight

Creado en 15 dic. 2019  ·  15Comentarios  ·  Fuente: universal-ctags/ctags

Error de instalación de debian8
without-doc param se ha ido

Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at f7513be Merge pull request #2373 from pragmaware/fix-bug-2364-attempt-2
==> ./autogen.sh
==> ./configure --prefix=home/ouyangsong/.linuxbrew/Cellar/universal-ctags/HEAD-f7513be
==> make
Last 15 lines from /data02/home/ouyangsong/.cache/Homebrew/Logs/universal-ctags/03.make:
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5771: recipe for target 'man/tags.5' failed
make[1]: *** [man/tags.5] Error 2
Usage
=====
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5769: recipe for target 'man/ctags.1' failed
make[1]: *** [man/ctags.1] Error 2
make[1]: Leaving directory '/tmp/universal-ctags-20191215-3061613-15gdbok'
Makefile:1266: recipe for target 'all' failed
make: *** [all] Error 2
BUILDSYS|git operation|workflow|test harness

Comentario más útil

No sé linuxbrew. Sin embargo, el comportamiento es comprensible.
Creo que el proceso de construcción de una herramienta de este tipo no debería depender del entorno personalizado por su usuario.

De todos modos, solucioné este problema en el n. ° 2375. Lo fusionaré después de fusionar # 2376.

Todos 15 comentarios

Su rst2man puede ser demasiado mayor.
Ver https://sourceforge.net/p/docutils/patches/141/

Creo que este es un problema del sistema de compilación de ctags.

Instalo los últimos docutils y el alias rst2man en el último rst2man, todavía no funciona.

$ pip install --user --upgrade docutils
$ alias rst2man=//home/ouyangsong/.local/bin/rst2man.py
$ rst2man --version
rst2man.py (Docutils 0.15.2 [release], Python 2.7.9, on linux2)

alias solo funciona en tu shell. ¿Qué tal crear un enlace simbólico?

el rst2man predeterminado está en /usr/bin , pero no tengo root.
Intento agregar $ PATH, todavía no funciona. @ k-takata quiere decir que el rst2man se está ejecutando es un subproceso, por lo que en el subproceso el rst2man es demasiado antiguo.

Lo siento, entendí mal tu problema.
Me gustaría saber la salida de rst2man --version y rst2man --help | grep highlight .

Aquí hay un ejemplo:

[yamato@slave]~/var/ctags-github/man% rst2man --version
rst2man --version
rst2man (Docutils 0.14, Python 2.7.15, on linux2)
[yamato@slave]~/var/ctags-github/man% rst2man --help | grep highlight
rst2man --help | grep highlight
--syntax-highlight=<format>

Supongo que su rst2man no tiene --syntax-highlight.
Si mi suposición es correcta, el siguiente parche puede solucionar el problema.

diff --git a/man/Makefile b/man/Makefile
index ec43caa2..42d911d4 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -25,7 +25,9 @@ RST2PDF  = rst2pdf

 # rst2man had a bug about code-block:: handling.
 # https://sourceforge.net/p/docutils/patches/141
-RST2MAN_FLAGS = --syntax-highlight=none
+RST2MAN_FLAGS = $(shell if $(RST2MAN) --help | grep -q -e --syntax-highlight; then \
+               echo --syntax-highlight=none; \
+           fi)
 RST2HTML_FLAGS =
 RST2PDF_FLAGS =

@masatake sí, tu conjetura es correcta. el rst2man en /usr/bin no tiene resaltado de sintaxis.

$ rst2man --help | grep -q -e --syntax-highlight
$ /usr/bin/rst2man --version
rst2man (Docutils 0.8.1 [release], Python 2.7.9, on linux2)

no tengo root para crear un enlace simbólico o actualizarlo, así que uso linuxbrew instale las dependencias de ctags, luego sigo https://github.com/universal-ctags/ctags/blob/master/docs/autotools.rst para instalar en $HOME/.local , finalmente hazlo.
Pero es extraño que linuxbrew no use el rst2man en $HOME/.local sino que use /usr/bin/rst2man después de crear un enlace simbólico "$ HOME / .local / bin / rst2man -> $ HOME / .local / bin / rst2man.py "y agregue $ PATH. Supongo que linuxbrew usa un subproceso de shell que no usa mi $ PATH

No sé linuxbrew. Sin embargo, el comportamiento es comprensible.
Creo que el proceso de construcción de una herramienta de este tipo no debería depender del entorno personalizado por su usuario.

De todos modos, solucioné este problema en el n. ° 2375. Lo fusionaré después de fusionar # 2376.

Fusioné # 2375. @songouyang , ¿podrías intentarlo de nuevo?

@masatake lo intento de nuevo y fallé. Creo que tal vez arregle la opción rst2man en man / makefile, pero olvide esta línea en makefile.
https://github.com/universal-ctags/ctags/blob/ba26b8a744ab7af3842ba219d75c5dc845ba583e/Makefile.am#L232

==> make
Last 15 lines from /data02/home/ouyangsong/.cache/Homebrew/Logs/universal-ctags/03.make:
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5773: recipe for target 'man/ctags-incompatibilities.7' failed
make[1]: *** [man/ctags-incompatibilities.7] Error 2
Usage
=====
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5773: recipe for target 'man/ctags-optlib.7' failed
make[1]: *** [man/ctags-optlib.7] Error 2
make[1]: Leaving directory '/tmp/universal-ctags-20191217-3629840-z9svqb'
Makefile:1266: recipe for target 'all' failed
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/universal-ctags/homebrew-universal-ctags/issues
5768 .1.rst.1:
5769         $(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
5770 .5.rst.5:
5771         $(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
5772 .7.rst.7:
5773         $(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
1264 RST2MAN_OPTIONS = --syntax-highlight=none
1265 all: $(BUILT_SOURCES) config.h
1266         $(MAKE) $(AM_MAKEFLAGS) all-am

¡Gracias!
Haré una solicitud de extracción más.

¿Podrías intentarlo de nuevo?

@masatake está bien ahora, gracias👍

Gracias por probar (y la sugerencia crítica).

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

fabiensabatie picture fabiensabatie  ·  3Comentarios

cweagans picture cweagans  ·  13Comentarios

EvanCarroll picture EvanCarroll  ·  14Comentarios

trevordmiller picture trevordmiller  ·  9Comentarios

alphaCTzo7G picture alphaCTzo7G  ·  7Comentarios