Build failure due to conflicting config.h files for mflua

Daniel Nachun daniel.nachun at
Thu May 26 00:08:11 CEST 2022

(My apologies but my mail client is misbehaving.  This should be
proper plain text)

We’ve recently encountered a build failure while building TeXLive from
source in Hombrew.  The root cause appears to be that
added the file “texk/web2c/mfluadir/potrace/config.h” which shares its
name with “texk/web2c/w2c/config.h”.

The ordering of the CPPFLAGS in “texk/web2c/” is
“$(DEFAULT_INCLUDES) $(INCLUDES) $(libmfluapotrace_a_CPPFLAGS)” which
resolves to “-I. -I./w2c -I./mfluadir/potrace”, which unfortunately
will pick up “w2c/config.h” before “mfluadir/potrace/config.h”.

I believe this is the wrong file, and “w2c/config.h” includes
“kpathsea/config.h” which is not in the “web2c” directory and causes
the build to fail.

We circumvented this problem in Homebrew by changing
“$(DEFAULT_INCLUDES) $(INCLUDES) $(libmfluapotrace_a_CPPFLAGS)” to
“$(libmfluapotrace_a_CPPFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES)” in the so that “mfluadir/potrace/config.h” is found before
“w2c/config.h”.  However I think a better solution here would be to
just rename “mfluadir/potrace/config.h” to something like
“mfluadir/potrace/potrace_config.h”.  I am happy to send out a patch
that changes this along with the relevant include statements in the
other files in “mfluadir/potrace”, but I wanted to get some idea of
whether this makes sense to do.  It’s possible that this has not
caused failures in other systems because the inclusion of config.h by
files in “mfluadir/potrace” is conditional on “HAVE_CONFIG_H” being
defined, which does happen for us in Homebrew but may not occur in
other environments.

Daniel Nachun

More information about the tex-live mailing list.