setting up lualatex paths with local texlive

I have two installations of texlive: the one provided by my distro (gentoo linux) and the "full" texlive distribution installed to a subdirectory of /home/[user]/.

I'm working on a project that depends on finding custom .sty files within its own paths, and depending on whether I use the system lualatex or my local one, I get conflicting results, and neither of which compiles successfully.

In the two code examples below, [ROOT] refers to the root subdirectory of the project infrastructure and [user] refers to the subdirectory of /home/[user]/ where I have the "full" texlive installed locally. The switch --target=cantatas.three is locally defined by the project and refers to a specific subgroup of the project to be compiled. kaysermake.cls is the project's locally defined class file, and can be found by kpsewhich (see below).

Using "local" texlive:

[ROOT] $~/tex-local/texlive/2017/bin/x86_64-linux/lualatex --shell-escape make.tex --target=cantatas.three This is LuaTeX, Version 1.07.0 (TeX Live 2018) system commands enabled. (./make.tex LaTeX2e <2018-04-01> patch level 4 (using write cache: ~/.texlive2018/texmf-var/luatex-cache/generic)( using read cache: ~/carrier1/tex-local/texlive/2017/texmf-var/luate x-cache/generic ~/.texlive2018/texmf-var/luatex-cache/generic) luaotfload | main : initialization completed in 0.100 seconds ! LaTeX Error: File kaysermake.cls' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: cls) Enter file name: x  Using system texlive:  [ROOT]$ lualatex --shell-escape make.tex --target=cantatas.three
This is LuaTeX, Version 1.0.4 (TeX Live 2017)
system commands enabled.
(./make.tex
LaTeX2e <2017/01/01> patch level 3
(using write cache: ~/.texlive/texmf-var/luatex-cache/generic)(usin

luaotfload | main : initialization completed in 0.110 seconds
Babel <3.10> and hyphenation patterns for 1 language(s) loaded.
[SNIP, but it did find kaysermake.cls]
)) (/usr/share/texmf-site/tex/generic/pgf/utilities/pgffor.code.tex
~/texmf/tex/luatex/latex/kaysermake.lua:56: module '/config/luaconfig.lua' not foun
d:
no file '/usr/local/lib/lua/5.2//config/luaconfig.so'
no file './/config/luaconfig.so'
stack traceback:
[C]: in function 'require'
~/texmf/tex/luatex/latex/kaysermake.lua:56: in main chunk
[C]: in function 'require'
[\directlua]:1: in main chunk.
l.16 ...ectlua{ kayser = require("kaysermake.lua") }

? x


searching for kaysermake.cls with kpsewhich:

[ROOT] $kpsewhich -debug=32 kaysermake.cls [SNIP] kdebug:search([kaysermake.cls]) => ~/texmf/tex/luatex/latex/kaysermake.cls ~/texmf/tex/luatex/latex/kaysermake.cls  So, what can I do here to make sure that the "full" texlive installation can find the local .cls files? Is there a .cnf file I should edit? What is the syntax for adding entries to a .cnf file? Thanks for the help! Addendum: I have used the following test file "lualatex-tester.tex": \documentclass{article} \begin{document} \directlua{ p = io.popen('/usr/bin/git --version') result = p:read('*a') print() print(result) p:close() } \end{document}  and the command '[ROOT]$ ~/tex-local/texlive/2017/bin/x86_64-linux/lualatex --shell-escape lualatex-tester.tex', to get the following output:

$~/carrier1/tex-local/texlive/2017/bin/x86_64-linux/lualatex --shell-escape lualatex-tester.tex This is LuaTeX, Version 1.07.0 (TeX Live 2018) system commands enabled. (./lualatex-tester.tex LaTeX2e <2018-04-01> patch level 4 (using write cache: ~/.texlive2018/texmf-var/luatex-cache/generic)( using read cache: ~/carrier1/tex-local/texlive/2017/texmf-var/luate x-cache/generic ~/.texlive2018/texmf-var/luatex-cache/generic) luaotfload | main : initialization completed in 0.099 seconds (~/carrier1/tex-local/texlive/2017/texmf-dist/tex/latex/base/articl e.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (~/carrier1/tex-local/texlive/2017/texmf-dist/tex/latex/base/size10 .clo(save: ~/.texlive2018/texmf-var/luatex-cache/generic/fonts/otl/ lmroman10-regular.lua)(save: ~/.texlive2018/texmf-var/luatex-cache/ generic/fonts/otl/lmroman10-regular.luc))) (./lualatex-tester.aux) git version 2.17.0 (./lualatex-tester.aux)) 362 words of node memory still in use: 2 hlist, 1 vlist, 1 rule, 2 glue, 4 attribute, 45 glue_spec, 4 attribute_lis t, 2 write nodes avail lists: 2:7,3:1,4:1,5:4,7:1,8:1,9:1 warning (pdf backend): no pages of output. Transcript written on lualatex-tester.log.  However, if I replace "/usr/bin/git" with just "git" in the popen statement, the same command fails with the "sh: all: command not found" error posted above. According to my colleague, this shows some odd behavior, in that it seems unable to find git unless I specify the absolute path. What might be going wrong here? • As it is a texlive 2018 tlmgr conf auxtree add path/to/local/texmf should normally work. See the documentation of tlmgr. – Ulrike Fischer May 24 '18 at 8:38 • would that path, in my case, be ~/carrier1/tex-local/texlive/2017/? Or some other path? – user242047 May 24 '18 at 15:12 • ~/texmf/ as this is the texmf-tree with your local class. Perhaps you need to replace ~ by its extension. – Ulrike Fischer May 24 '18 at 15:18 • This returned: $ ~/carrier1/tex-local/texlive/2017/bin/x86_64-linux/tlmgr conf auxtree add ~/texmf/ tlmgr: unknown conf arg: auxtree (try tlmgr or texmf or updmap or auxtrees) tlmgr: An error has occurred. See above messages. Exiting.  except I wrote out the ~ part. – user242047 May 24 '18 at 15:27
• you want to adjust the texlive 2018 so why on earth do you use the texlive 2017 tlmgr? Also the error message tells you to try auxtrees` with an s at the end. – Ulrike Fischer May 24 '18 at 15:29