Hi,
On Fri, 7 Oct 2022 14:38:58 +0200 Roderich Schupp
<roderich.sch...@gmail.com> wrote:
On Wed, 5 Oct 2022 18:51:27 +0200 Roderich Schupp
<roderich.sch...@gmail.com> wrote:
> the problem is the compile command:
>
> /usr/bin/cc -I/<<PKGBUILDDIR>> -g -O2 ... -Wall -I
> -I/usr/include/vte-2.91 -I/usr/include/glib-2.0 ...
>
> The "-I" after "-Wall" gobbles up the following "-I/usr/include/vte-2.9" as
> option value. This adds a non-existent directory to the include search path,
> but gcc doesn't complain about this unless you run it with "-v".
>
> The lone "-I" is also present in a successful build (w/pkg-config), cf.
In fact, pkg-config and pkgconf return the same set of --cflags for
all modules involved here,
but in a different order (and pkgconf deduplicates flags). Neither
returns the lone "-I".
The "-I" is most likely the result of the following line in src/CMakeLists.txt:
SET(TERMIT_CFLAGS "-I${LUA_INCLUDE_DIR}")
LUA_INCLUDE_DIR is probably a typo - pkg_search_module(LUA ...) sets
LUA_INCLUDE_DIRS (note the trailing S). The SET is also superfluous as
later on LUA_CFLAGS (set by pkg_search_module(LUA ...) )
is appended to TERMIT_CFLAGS with
FOREACH(cflag ${VTE_CFLAGS} ${GTK_CFLAGS} ${LUA_CFLAGS})
SET(TERMIT_CFLAGS "${TERMIT_CFLAGS} ${cflag}")
ENDFOREACH(cflag)
Thanks for the analysis — this has already been fixed upstream:
https://github.com/nonstop/termit/commit/da3ffae3ee6bcf3c4df566cfb4e93483ac1b2d64
--
Cheers,
Andrej