Score:0

How should I rebuild MuPDF from official focal source avoiding "lcms2mt.h: No such file or directory" message?

zw flag

I was trying to update my own answer here at AskUbuntu because of a comment below it.

What I have done:

  1. Created fresh 20.04.3 LTS VM with all updates

  2. Enabled all deb-src repositories in /etc/apt/sources.list by

    sudo sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list
    sudo apt-get update
    
  3. Installed all needed build-dependencies by

    sudo apt-get build-dep mupdf
    
  4. Downloaded source code of MuPDF by

    cd ~/Downloads
    apt-get source mupdf
    
  5. Tried to compile the sources by

    cd mupdf-1.16.1+ds1/
    make
    

    and here I get the following error message

         ...
         CC build/release/source/fitz/color-lcms.o
     source/fitz/color-lcms.c:36:10: fatal error: lcms2mt.h: No such file or directory
     36 | #include "lcms2mt.h"
     |          ^~~~~~~~~~~
     compilation terminated.
     make: *** [Makefile:126: build/release/source/fitz/color-lcms.o] Error 1
    

And what is interesting:

  1. the mentioned lcms2mt.h is not contained in any deb-package.
  2. on the same system apt-get source -b mupdf succeeds.
Knud Larsen avatar
by flag
v1.19.0 ? Ubuntu 20.04 has v1.16.0 ?. No issues with either → The deb build files seem *not* to use the missing thirdparty headers → `$ apt-get -b source mupdf`: The 5 packages.deb are built. (I used Ubuntu 21.10 for v1.19.0). ..... Other method: `git clone https://github.com/ArtifexSoftware/mupdf.git && cd mupdf/ && git submodule update --init --recursive`: Provides thirdparty///{~1492 headers}. ..... `$ make`: No issues.
N0rbert avatar
zw flag
Oh, thanks, very useful. It was a typo - really the folder is named *mupdf-1.16.1+ds1* on 20.04 LTS. @KnudLarsen Could you please repeat all my above steps on 20.04 LTS as they are written without involving github?
Knud Larsen avatar
by flag
Ubuntu 20.04.3: I did "step 1 - 4" OK, step 5 fails, missing lcms2mt.h, lcms2mt_plugin.h, jbig2.h and probably more. .... Hence "apt-get **-b** source mupdf", i.e. option **-b** will build mupdf using the ~30? build files in `mupdf-1.16.1+ds1/debian/`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.