post git clone, i am trying to build the PDF documentation.
[strikr@victory nim]$ ./koch pdf
Adding to $PATH: /home/strikr/source-nim/nim/bin
bin/nim cc -r tools/nimweb.nim --pdf web/website.ini --putenv:nimversion=0.16.0
Hint: used config file '/home/strikr/source-nim/nim/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: nimweb [Processing]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: algorithm [Processing]
Hint: times [Processing]
Hint: posix [Processing]
Hint: ospaths [Processing]
Hint: parseopt [Processing]
Hint: parsecfg [Processing]
Hint: hashes [Processing]
Hint: etcpriv [Processing]
Hint: lexbase [Processing]
Hint: streams [Processing]
Hint: tables [Processing]
Hint: strtabs [Processing]
Hint: re [Processing]
Hint: pcre [Processing]
Hint: rtarrays [Processing]
Hint: htmlgen [Processing]
Hint: macros [Processing]
Hint: md5 [Processing]
Hint: osproc [Processing]
Hint: cpuinfo [Processing]
Hint: linux [Processing]
Hint: parsecsv [Processing]
Hint: xmltree [Processing]
nimweb.nim(357, 10) Hint: 'dir' is declared but not used [XDeclaredButNotUsed]
nimweb.nim(294, 6) Hint: 'nimweb.pathPart(d: string)' is declared but not used [XDeclaredButNotUsed]
nimweb.nim(377, 6) Hint: 'nimweb.genNewsLink(title: string)' is declared but not used [XDeclaredButNotUsed]
Hint: [Link]
Hint: operation successful (31347 lines compiled; 3.055 sec total; 56.645MiB; Debug Build) [SuccessX]
Hint: /home/strikr/source-nim/nim/tools/nimweb --pdf web/website.ini --putenv:nimversion=0.16.0 [Exec]
pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/Arch Linux)
kpathsea version 6.2.2
Copyright 2016 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.26; using libpng 1.6.28
Compiled with zlib 1.2.8; using zlib 1.2.11
Compiled with poppler version 0.50.0
bin/nim rst2tex --hint[Conf]:off --hint[Path]:off --hint[Processing]:off --putenv:nimversion=0.16.0 doc/manual.rst
pdflatex doc/manual.tex
external program failed
Error: execution of an external program failed: '/home/strikr/source-nim/nim/tools/nimweb --pdf web/website.ini --putenv:nimversion=0.16.0'
FAILURE
Any pointers ?
yes, arch linux is the platform and 'nim' sources were 'git clone'd directly from github https://github.com/nim-lang/nim instead of arch aur nim-git.
[strikr@victory ~]$ uname -a
Linux victory 4.9.5-1-ARCH #1 SMP PREEMPT Fri Jan 20 12:11:50 CET 2017 x86_64 GNU/Linux
[strikr@victory ~]$
please see
[strikr@victory nim]$ ls
bin/ config/ do_step2.sh* install_nimble.nims koch.nim.cfg manual.log readme.md tools/
build/ copying.txt do_step3.sh* install_tools.nims lib/ manual.out readme.txt web/
ci/ csources/ do_step4.sh* install.txt log.1 manual.toc tests/
compiler/ doc/ examples/ koch* log.txt missfont.log tinyc/
compiler.nimble do_step1.sh* icons/ koch.nim manual.aux nimcache/ todo.txt
wrote a bunch of trivial script files (do_step*.sh) for each build step
step1
[strikr@victory nim]$ cat do_step1.sh
git clone --depth 1 https://github.com/nim-lang/csources
step2
[strikr@victory nim]$ cat do_step2.sh
cd csources && sh build.sh
step3
[strikr@victory nim]$ cat do_step3.sh
bin/nim c koch
./koch boot -d:release
step4
[strikr@victory nim]$ cat do_step4.sh
./koch pdf
texlive-fontsextra is installed.
[strikr@victory ~]$ sudo pacman -S -s texlive-fontsextra
extra/texlive-fontsextra 2016.42286-1 (texlive-most) [installed]
TeX Live - all sorts of extra fonts
running pdflatex doc/manual.tex shows a missing font
...
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 ec-lmbxi10
mktexpk: don't know how to create bitmap font for ec-lmbxi10.
mktexpk: perhaps ec-lmbxi10 is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
!pdfTeX error: pdflatex (file ec-lmbxi10): Font ec-lmbxi10 at 720 not found
==> Fatal error occurred, no output PDF file produced!
the missfont.log file shows
mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 ec-lmbxi10
mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 ec-lmbxi10
mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 ec-lmbxi10
mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 ec-lmbxi10
mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 ec-lmbxi10
mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 ec-lmbxi10
a quick search with pacman shows that the font is installed as it is part of the texlive-core package.
[strikr@victory nim]$ sudo pacman -Q -l texlive-core |grep ec-lmbxi10
texlive-core /usr/share/texmf-dist/fonts/tfm/public/lm/ec-lmbxi10.tfm
@strikr Try removing the ~/.texlive directory. Apparently that solves some problems.
@axben AFAIK PDFs can only be generated by Latex using pdftex. You could probably just install latex and pdftex using something like msys2. You can also build the html docs using, koch web
i took the following approach to troubleshooting the situation.
Instead of running the command
./koch pdf
or
pdflatex doc/manual.tex
i tried the following steps
cd doc
latex manual.tex
dvips manual.dvi
ps2pdf manual.pdf
as the interim command of dvips executed it highlighted some issues with the font. The rendered postscript file when viewed, displayed some of the content of the page. This meant the missing fonts were not embedded/rendered in the document.
at this point in time, the question raised was, "is there a problem with the latex fonts installed on arch linux" ?
using this point as the reference of query, a link on arch linux forum was discovered https://bbs.archlinux.org/viewtopic.php?id=91655
SOLUTION
the following steps were undertaken.
* re-install texlive-fontsextra (sudo pacman -S texlive-fontsextra)
* cd ~/source-nim/nim
* git pull
* cd csources && sh build.sh
* bin/nim c koch
* ./koch boot -d:release
* ./koch pdf
At this point, nim is built and ready to use
bin/nim --version
Nim Compiler Version 0.16.0 (2017-01-24) [Linux: amd64]
Copyright (c) 2006-2017 by Andreas Rumpf
git hash: 0ead17bf0ecb12e32f64c050f8d28f6c22a59adb
active boot switches: -d:release
and the full documentation in PDF format is available.
find . -name "*.pdf"
./doc/manual.pdf
./doc/pdf/niminst.pdf
./doc/pdf/manual.pdf
./doc/pdf/tut2.pdf
./doc/pdf/gc.pdf
./doc/pdf/nimc.pdf
./doc/pdf/lib.pdf
./doc/pdf/tut1.pdf
SUMMARY If you are using Arch Linux and encounter issue with building the PDF documentation
Thanks for hcorion, araq for the assistance and encouragement with troubleshooting !