If I install the shared libraries to the system and bypass the wrapper script, running .libs/kpsewhich directly works well: $ cd Work/texk/kpathsea $ TEXMFCNF=../../../texk/kpathsea/tests/cnfline $ export TEXMFCNF $ .libs/kpsewhich --var-value=maxpr 200 $ .libs/kpsewhich --var-value=maxpr.kpsewhich 200 So it's probably something about the wrapper script.