Installing culmus-latex on Ubuntu 11.10

After someone complained to me that he can’t install culmus-latex on Ubuntu 11.10, I decided to check the issue. Apparently culmus-latex can’t be installed as-is on Ubuntu 11.10 (and probably other new versions of Debian and Ubuntu). The problem have been reported in few places such as Whatsup, but as I don’t frequent the forum lately, I wasn’t aware of it. Skip bellow if you’re just interested in the workaround.

Technical Details

The problem manifests itself as:

sudo make install
... snipped for brevity ...
mktexlsr: Done.
updmap-sys --enable Map=culmus.map
updmap: This is updmap, version $Id: updmap 14402 2009-07-23 17:09:15Z karl $
updmap: using transcript file `/var/lib/texmf/web2c/updmap.log'
updmap: initial config file is `/var/lib/texmf/web2c/updmap.cfg'
make: *** [install] Error 2

But if you look at updmap’s manpage there is no documentation for the return codes. Also there is no explicit place where it exits with return code 2 in the code. After some straceing I found the culprit in the combination of the set -e in the top of /usr/bin/updmap and the function pickLocalFile in /usr/share/tex-common/debianize-upddmap which overrides certain behaviors in updmap. The pickLocalFile uses the following lines

localfile=""
localfile="`ls $debDirname/*local*cfg 2>/dev/null`"
if [ -n "$localfile" ]; then

To check if there is a local configuration file under /etc/texmf/updmap.d. If such file doesn’t exist, instead of creating one (as the maintainers of debianize-updmap intended) it fails due to the set -e in /usr/bin/updmap. Thus updmap exists with error code 2, instead of completing the installation.

Meanwhile, until the bug is fixed, there is a simple workaround

Workaround

Before installing, execute

sudo touch /etc/texmf/updmap.d/10local.cfg

And now the regular sudo make install installation should finish successfully.

As the problem is a result of a Debian bug, I don’t expect to release a new version of culmus-latex, instead I’ll report the bug to the Debian team.

13 thoughts on “Installing culmus-latex on Ubuntu 11.10”

  1. Thanks!

    Confirming: on Ubuntu 12.04, after touching, “sudo make” suddenly works. However, “sudo make install” still halts with an error:

    updmap-sys –enable Map=culmus.map
    updmap: This is updmap, version $Id: updmap 14402 2009-07-23 17:09:15Z karl $
    updmap: using transcript file `/var/lib/texmf/web2c/updmap.log’
    updmap: initial config file is `/var/lib/texmf/web2c/updmap.cfg’
    make: *** [install] Error 1

    I wonder…

    Peleg.

  2. Update: removing the file (10local) after “sudo make” and touching it again before “sudo make install” does the work (it seems).

  3. On ubuntu 12.04, the installation seems fine after Peleg’s advice, but tring to compile hebrew document returns:

    (/usr/share/texmf-texlive/tex/generic/0babel/hebrew.ldf
    
    Package babel Warning: No hyphenation patterns were loaded for
    (babel)                the language `Hebrew'
    (babel)                I will use the patterns loaded for \language=0 instead.
    
    )) (/usr/share/texmf-texlive/tex/generic/babel/he8enc.def)
    No file newfile1.aux.
    [1{/home/ronen/.texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./newfile1.aux)
    
    kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720 rfrank
    mktexpk: don't know how to create bitmap font for rfrank.
    kpathsea: Appending font creation commands to missfont.log.
     )
    !pdfTeX error: pdflatex (file rfrank): Font rfrank at 720 not found
     ==> Fatal error occurred, no output PDF file produced!
    
  4. Thanks a lot this work great on Kubuntu 12.04!!!
    There is one error when I do sudo make install but I can read PDF file
    thanks!!!

  5. @Diego: It’s good to know that it works on Kubuntu 12.04. I can confirm that the solution kept working for me when I’ve upgraded to 12.04 as well. What was the error you said that happened?

    @Ronen: I haven’t had the time to test it yet, I’m currently making a fresh install of 12.04 in order to test what you and Peleg reported. But my guess it’s related to updmap failing for some reason.

  6. Guy, thank you very much the fonts! Installation went fine using your workaround, but I have a problem with dvipdfmf – it fails with the following error:


    pathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 DavidCLM-Medium.pfa
    mktexpk: don't know how to create bitmap font for DavidCLM-Medium.pfa.

    I’ve tried googling this but it still does not work for me.

    Running dvips and then ps2pdf is working however.

    For the reference:

    kpsewhich culmus.map
    /usr/share/texmf-texlive/fonts/map/dvips/culmus.map

    But dvipdfmx still fails.

  7. I’m not entirely sure, but it may be related to the fact that the fonts are Type1 and not Metafonts so it doesn’t know how to convert them to bitmaps.

    But why do you go the excruciating way of producing dvi or ps and then pdf? Why don’t you simply use pdflatex?

  8. Thank you so much, this just saved my day…
    (and thesis btw ^^)

  9. Hey Guy, thanks, this did solve the problem, however, I don’t understand what caused it to begin with.
    Would you mind replying with an explanation to the source of the problem?

  10. As I explained in the post, the Debian developers used a flag that causes the updmap script to fail on every error. When one of the configuration files is missing (which is the default case) that errors causes the installation to fail, while the original script would have handled the error.

  11. I had problems with using Hebrew fonts, even after doing the above steps and installing culmus. The solution was to install it not in /usr/share/texmf-texlive but /usr/share/texmf/
    e.g manually copy the fonts to
    /usr/share/texmf/
    sudo mktexlsr
    sudo updmap-sys –enable Map=culmus.map

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.