I have TeX Live version 2013.30973-7 running on ArchLinux. I want to use a patched version of pdftex to create valid PDF/A-1b documents.

I have an issue using the patched version after compilation. I followed this and this instructions. However, I am stuck at the point when trying to create the format files:

pdftex2 -ini -translate-file=cp227.tcx '*pdfetex.ini'
pdflatex2 -ini -translate-file=cp227.tcx '*pdflatex.ini'

Output for first command (likewise for the other):

This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010) (INITEX)
 restricted \write18 enabled.
entering extended mode
! I can't find file `pdfetex.ini'.
<*> pdftex.ini

The files do exist in my texmf-dist tree and are found by kpsewhich:

# kpsewhich 'pdfetex.ini'

I also tried running the command with the full path and copying the files into the working directory, but nothing worked. When using the full path, it complained about the next file. Can someone point me to what I am missing?

Update 1: As suggested in the source and instructions, I used build-pdftex.sh to configure and compile pdftex. An interesting flag set in there is --without-system-kpathsea which I figured might be the reason why the compiled pdftex does not see what the system kpsewhich sees. Also other system libs are disabled, which are all explicitly enabled in the gentoo ebuild. Unfortunately, the compilation fails when switching to --with-system-kpathsea -- missing kpathsea header files.

I downloaded also the TeX Live 2013 source. TeX Live has an updated version of pdftex: The latest standalone version of pdftex is 1.40.11 (at least I do not find another) at Sarovar, while TeX Live 2013 has 1.40.14. Is pdftex now developed in TeX Live?

Update 2: I managed to compile (both patched and unpatched) pdftex 1.40.14 from TeX Live 2013, also using --with-system-kpathsea. However, when running the compiled pdftex, in any circumstances, the very same error occurs.

Update 3: pdftex is in fact developed at supelec.fr (see here). Further, when putting the binary to /usr/bin, the compiled version works fine (see here). For the local installation I am still unsure how to do it correctly.

  • Have you tried providing the full path name of the ini file, i.e., executing pdftex2 -ini -translate-file=cp227.tcx '/usr/share/texmf-dist/tex/plain/config/pdfetex.ini' (possibly without the "forward ticks," i.e., '?
    – Mico
    Dec 15, 2013 at 18:54
  • Thanks for the suggestion. It then complains for another file (I can't find file 'etex.src'). kpsewhich etex.src gives /usr/share/texmf-dist/tex/luatex/hyph-utf8/etex.src as its location. Interestingly, it does not complain for the line \input pdftexconfig.tex, which is before \input etex.src, whose file is also in another directory (/etc/texmf/tex/generic/config).
    – Florian Bw
    Dec 15, 2013 at 19:02
  • This won't solve this problem but I think if you are going to do this, it would be better to ditch the version of texlive from the official repos and install TeX Live from upstream under /usr/local. This has several advantages. First, it keeps anything you do out of pacman's way. Second, it means you have an installation which is truly vanilla and don't have to worry about differences in Arch's implementation when following instructions etc. It is pretty easy to install a dummy texlive package to keep pacman happy if you have an editor or something which requires it.
    – cfr
    Dec 18, 2013 at 23:43

1 Answer 1


Putting the correctly compiled executables to /usr/bin, everything works as expected. As I struggled quite a bit correctly compiling it, I think it will be useful to have an up-to-date guide to get pdftex from current sources. A big thank you to the helpful people at the tex live and tlbuild mailing lists. Here's the guide:

How to build and install pdftex/pdflatex from source

1.) Get the sources with rsync from Tex Live (change if you want version control):

rsync -a --delete --exclude=.svn tug.org::tldevsrc/Build/source source

2.) Patch pdftex in source/texk/web2c/pdftexdir, if you want.

3.) Build the sources using the following script (modified from 1 and 2):

#!/bin/bash -ex
# build-pdftex.sh: script to build pdftex from a subset of TeX Live sources

topDir=$(cd $(dirname $0) && pwd)

if [ ! -d $pdftexDir ]; then
    echo "$pdftexDir not found"
    exit -1
    --disable-cxx-runtime-hack  \
    --disable-all-pkgs      \
    --disable-ptex        \
    --enable-pdftex       \
    --disable-native-texlive-build \
    --without-mf-x-toolkit    \
    --without-x         \
    --disable-shared      \
    --disable-largefile     \
    --with-system-xpdf      \
    --with-system-zlib      \
    --with-system-pnglib    \
    --disable-multiplatform   \
    --with-system-kpathsea    \


rm -rf $buildDir && mkdir $buildDir && cd $buildDir

export CONFIG_SHELL=/bin/bash
$topDir/source/configure $CFG_OPTS "$@" 2>&1 | tee configure.log

# try to find gnu make; we may need it
if make -v 2>&1| grep "GNU Make" >/dev/null; then
    echo "Your make is a GNU-make; I will use that"
elif gmake -v >/dev/null 2>&1; then
    echo "You have a GNU-make installed as gmake; I will use that"
    echo "I can't find a GNU-make; I'll try to use make and hope that works."
    echo "If it doesn't, please install GNU-make."

$MAKE | tee make.log
(cd $buildDir/texk/web2c; $MAKE pdftex) 2>&1 | tee -a make.log

4.) Move the compiled pdftex to /usr/bin, and generate and install required format files Execute as su (su -)!

# mv-compiled-pdftex.sh

sudo cp build-pdftex/texk/web2c/pdftex /usr/bin/pdftex${SUFFIX}
sudo cp build-pdftex/texk/web2c/pdftex /usr/bin/pdflatex${SUFFIX}

PDFTEXFMTDIR=$(dirname $(sudo kpsewhich -engine=pdftex pdflatex.fmt) )
echo "Putting format files to $PDFTEXFMTDIR" # check that this is the location you want!

pdftex${SUFFIX} -ini -translate-file=cp227.tcx '*pdfetex.ini'
pdflatex${SUFFIX} -ini -translate-file=cp227.tcx '*pdflatex.ini'

sudo mv -v pdfetex.fmt ${PDFTEXFMTDIR}/pdftex${SUFFIX}.fmt
sudo mv -v pdflatex.fmt ${PDFTEXFMTDIR}/pdflatex${SUFFIX}.fmt

sudo texhash

Using this script, you will have the executables available as pdftex-newest and pdflatex-newest and working. For a local installation (~/texmf and ~/bin, have a look at this answer, and adapt the code I used here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .