On Tue, Nov 12, 2024 at 04:27:21PM +0200, Eli Zaretskii wrote: > 4. Compilation error in api_to_perl.c: > > In file included from D:/usr/Perl/lib/CORE/perl.h:5056, > from main/api_to_perl.c:23: > D:/usr/Perl/lib/CORE/embedvar.h:58:23: error: expected ')' before '->' > token > 58 | #define PL_Mem (vTHX->IMem) > | ^~ > In file included from D:/usr/Perl/lib/CORE/perl.h:3277, > from main/api_to_perl.c:23: > D:/usr/Perl/lib/CORE/iperlsys.h:813:10: error: expected ')' before '->' > token > 813 | (*PL_Mem->pFree)(PL_Mem, (buf)) > | ^~ > Makefile:3749: recipe for target `main/libtexinfo_la-api_to_perl.lo' > failed
This happens early, but config.h is already in and, maybe more importantly, the headers shipped with gnulib are used in the compilation, which may have an effect here, so it may be worth it trying to separate better api_to_perl.c from the remaining of libtexinfo and avoiding using gnulib headers. It seems like automake do not support per-object cppflags, so there will have to be more convenience libraries split out of libtexinfo: https://www.gnu.org/software/automake/manual/html_node/Per_002dObject-Flags.html I'll try to come up with something on that front. For MiscXS and similar, in addition to trimming down gnulib, I think that it should be possible to separate better code using Perl and not using Perl, maybe it could help, I'll try to do some changes along that line. Then, separating completely code needing gnulib and code needing Perl could be possible and use convenience libraries to have different CPPFLAGS would be possible, though hopefully not needed. -- Pat