Update of bug #66143 (group groff): Status: None => Need Info
_______________________________________________________ Follow-up Comment #13: Hi Sven, [comment #11 comment #11:] > So, I now installed a debian bookworm distribution in a VM and checked: pkg-config is behaving the same on that system: > > grep -IR UCHARDET_CFLAGS Makefile > UCHARDET_CFLAGS = -I/usr/include/uchardet > preconv_CPPFLAGS = $(AM_CPPFLAGS) $(UCHARDET_CFLAGS) > > But, I think, that the build is working currently is a coincidence, as uchardet.h is installed under /usr/include/uchardet/; with /usr/include being a default search path (correct?). > > To test my assumption, I applied my "patch" (removing the 'uchardet' directory prefix from the include statement) to the current sources and rebuilt on debian and it still worked just fine. > > This suggests, in my interpretation at least, that the pkg-config provided CFLAGS is not used during a default build currently at all. All I can really tell you is that _groff_ itself doesn't have any logic to determine values for `UCHARDET_CFLAGS` and `UCHARDET_LIBS`: we rely upon a stock Autoconf macro for that. Specifically, we use `PKG_CHECK_MODULES`. https://git.savannah.gnu.org/cgit/groff.git/tree/m4/groff.m4?h=1.23.0#n1854 You should have a "config.status" file at the top of your build directory. Here's what mine says about these variables. $ grep UCHARDET_ ./build/config.status S["UCHARDET_LIBS"]="-luchardet" S["UCHARDET_CFLAGS"]="-I/usr/include/uchardet" If the variable assignments are wrong for your system, then it seems likely that either the Autoconf macro is somehow wrong, or the uchardet package shipped (by Homebrew?) is misconfigured and produces the wrong output. A major point of pkg-config's design, as I understand it, is to delegate the emission of compiler and linker flags to the library package itself rather than trying to detect such things via experimentation (as Autoconf historically has done), since the packager of the library is in the best position to know what these flags should be. My system says this: $ pkg-config --cflags uchardet -I/usr/include/uchardet $ pkg-config --libs uchardet -luchardet Do the same commands on your system produce correct results? _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66143> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature