backtracking / bibtex2html

Other
95 stars 27 forks source link

Fails to install with opam2 (because of sandboxing?) #25

Closed Armael closed 3 years ago

Armael commented 5 years ago

I'm trying to install bibtex2html using opam2, and it fails with the following error log:

``` ocamlc.opt -c options.mli ocamlopt.opt -c options.ml ocamlopt.opt -c html.ml ocamlc.opt -c latexmacros.mli ocamlopt.opt -c latexmacros.ml ocamllex.opt latexscan.mll 376 states, 6131 transitions, table size 26780 bytes 4414 additional bytes used for bindings ocamlopt.opt -c latexscan.ml ocamllex.opt bbl_lexer.mll 92 states, 740 transitions, table size 3512 bytes ocamlopt.opt -c bbl_lexer.ml ocamlc.opt -c bibtex.mli ocamlopt.opt -c bibtex.ml ocamlyacc bibtex_parser.mly ocamlc.opt -c bibtex_parser.mli ocamlopt.opt -c bibtex_parser.ml ocamllex.opt bibtex_lexer.mll 36 states, 325 transitions, table size 1516 bytes 1304 additional bytes used for bindings ocamlopt.opt -c bibtex_lexer.ml ocamlc.opt -c readbib.mli ocamlopt.opt -c readbib.ml ocamlc.opt -c expand.mli ocamlopt.opt -c expand.ml ocamlc.opt -c bibfilter.mli ocamlopt.opt -c bibfilter.ml ocamlc.opt -c biboutput.mli ocamlopt.opt -c biboutput.ml echo "let version = \""1.99"\"" > version.ml echo 'let date = "'"mer. févr. 6 17:21:14 CET 2019"'"' >> version.ml ocamlc.opt -c version.mli ocamlopt.opt -c version.ml ocamlc.opt -c translate.mli ocamlopt.opt -c translate.ml ocamlc.opt -c copying.mli ocamlopt.opt -c copying.ml ocamlopt.opt -c main.ml ocamlopt.opt -o bibtex2html str.cmxa options.cmx html.cmx latexmacros.cmx latexscan.cmx bbl_lexer.cmx bibtex.cmx bibtex_parser.cmx bibtex_lexer.cmx readbib.cmx expand.cmx bibfilter.cmx biboutput.cmx version.cmx translate.cmx copying.cmx main.cmx strip bibtex2html ocamllex.opt latex_accents.mll 261 states, 608 transitions, table size 3998 bytes ocamlc.opt -c latex_accents.mli ocamlopt.opt -c latex_accents.ml ocamlc.opt -c condition.mli ocamlopt.opt -c condition.ml ocamlyacc condition_parser.mly ocamlc.opt -c condition_parser.mli ocamlopt.opt -c condition_parser.ml ocamllex.opt condition_lexer.mll 69 states, 1647 transitions, table size 7002 bytes ocamlc.opt -c condition_lexer.mli ocamlopt.opt -c condition_lexer.ml ocamlc.opt -c parse_condition.mli ocamlopt.opt -c parse_condition.ml ocamlopt.opt -c bib2bib.ml ocamlopt.opt -o bib2bib str.cmxa options.cmx bibtex.cmx bibtex_lexer.cmx bibtex_parser.cmx readbib.cmx latex_accents.cmx condition.cmx condition_parser.cmx condition_lexer.cmx parse_condition.cmx bibfilter.cmx latexmacros.cmx latexscan.cmx expand.cmx html.cmx biboutput.cmx version.cmx copying.cmx bib2bib.cmx strip bib2bib printf "\\\newcommand{\\\version}{1.99}" > version.tex pdflatex manual.tex This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Arch Linux) (preloaded format=pdflatex) restricted \write18 enabled. kpathsea: Running mktexfmt pdflatex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: /etc/texmf/web2c/fmtutil.cnf mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /home/armael/.texlive/texmf-config/web2c/fmtutil.cnf /usr/bin/mktexfmt: mkdir(/home/armael/.texlive/texmf-var/web2c/) failed: Read-only file system at /usr/share/tlpkg/TeXLive/TLUtils.pm line 913. I can't find the format file `pdflatex.fmt'! make: *** [Makefile:291: manual.pdf] Error 1 ```

I suspect the "Read-only file system" errors are due to sandboxing, introduced with opam 2, which doesn't allow a package to write outside of its installation directory.

Armael commented 3 years ago

It seems this is caused by the compilation of the (latex) manual, which for some reason tries to create .texlive/texmf-var/web2c/. A possible workaround is to disable building the manual, by editing the opam file to run the configure script with the --enable-doc=no option.

backtracking commented 3 years ago

Thanks for the suggestion. I made a PR. See https://github.com/ocaml/opam-repository/pull/17623

Armael commented 3 years ago

Thanks!

Armael commented 3 years ago

Thanks again for the opam-repository PR! I can confirm that it now works on my computer.