bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #66143] build of current master (c9b3c99) fails on MacOS 14.6.1


From: Sven Schober
Subject: [bug #66143] build of current master (c9b3c99) fails on MacOS 14.6.1
Date: Thu, 5 Sep 2024 16:30:59 -0400 (EDT)

Follow-up Comment #20, bug #66143 (group groff):

Hi Branden!

Sorry to keep you so busy with my strange problem and or setup.

But at least _I_ am learning new stuff! I did not know about:
 

make V=1 preconv


That is great, and there are many situations, where I wish I had known this.

So, I went ahead and investigated the homebrew build process some more. Turns
it, there is a way to download the sources and get a shell *just* before the
recipe, or formula how they call it, is being executed. So, I could follow the
recipe manually and inspect what is happening.

First observation, the sources build untouched (surprise). This is what I
see:


…/tmp/groff-20240905-40241-pj7zgj/groff-1.23.0
$  touch src/preproc/preconv/preconv.cpp

…/tmp/groff-20240905-40241-pj7zgj/groff-1.23.0
$ make V=1 preconv
clang++ -DHAVE_CONFIG_H -I. -I./src/include  -I./src/include -I./lib
-I./src/include -I./lib -I/opt/homebrew/Cellar/uchardet/0.0.8/include/uchardet
  -g -O2 -MT src/preproc/preconv/preconv-preconv.o -MD -MP -MF
src/preproc/preconv/.deps/preconv-preconv.Tpo -c -o
src/preproc/preconv/preconv-preconv.o `test -f
'src/preproc/preconv/preconv.cpp' || echo
'./'`src/preproc/preconv/preconv.cpp
mv -f src/preproc/preconv/.deps/preconv-preconv.Tpo
src/preproc/preconv/.deps/preconv-preconv.Po
clang++  -g -O2   -o preconv src/preproc/preconv/preconv-preconv.o libgroff.a
-lm -liconv -L/opt/homebrew/Cellar/uchardet/0.0.8/lib -luchardet lib/libgnu.a


So, clang++ is the compiler and pkg-config output is added to the include
paths.

Then, I wanted to see which headers are really considered and learned about
the -H flag:


CPPLAGS=-H make V=1 CPPFLAGS=-H 2>&1 | grep uchardet
clang++ -DHAVE_CONFIG_H -I. -I./src/include  -I./src/include -I./lib
-I./src/include -I./lib -I/opt/homebrew/Cellar/uchardet/0.0.8/include/uchardet
-H  -g -O2 -MT src/preproc/preconv/preconv-preconv.o -MD -MP -MF
src/preproc/preconv/.deps/preconv-preconv.Tpo -c -o
src/preproc/preconv/preconv-preconv.o `test -f
'src/preproc/preconv/preconv.cpp' || echo
'./'`src/preproc/preconv/preconv.cpp
. /opt/homebrew/include/uchardet/uchardet.h
clang++  -g -O2   -o preconv src/preproc/preconv/preconv-preconv.o libgroff.a
-lm -liconv -L/opt/homebrew/Cellar/uchardet/0.0.8/lib -luchardet lib/libgnu.a


The line with the dot shows, that indeed the uchardet.h put on the include
path is taken.

Then, I inspected with my newly acquired V=1 skill, what is happening on my
machine (outside of the homebrew build and again with unaltered sources):


make V=1 preconv
g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I.. -I./src/include  -I../src/include
-I../lib -I./src/include -I./lib
-I/opt/homebrew/Cellar/uchardet/0.0.8/include/uchardet   -g -O2 -MT
src/preproc/preconv/preconv-preconv.o -MD -MP -MF
src/preproc/preconv/.deps/preconv-preconv.Tpo -c -o
src/preproc/preconv/preconv-preconv.o `test -f
'src/preproc/preconv/preconv.cpp' || echo
'../'`src/preproc/preconv/preconv.cpp
../src/preproc/preconv/preconv.cpp:30:10: fatal error: 'uchardet/uchardet.h'
file not found
#include <uchardet/uchardet.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/preproc/preconv/preconv-preconv.o] Error 1


AHA! The compiler is g++ (I remember that I installed it, when I was
experimenting with c++ modules some time ago)!

So, what happens when I switch this to clang++?:


make V=1 CXX=clang++ preconv
clang++ -DHAVE_CONFIG_H -I. -I.. -I./src/include  -I../src/include -I../lib
-I./src/include -I./lib -I/opt/homebrew/Cellar/uchardet/0.0.8/include/uchardet
  -g -O2 -MT src/preproc/preconv/preconv-preconv.o -MD -MP -MF
src/preproc/preconv/.deps/preconv-preconv.Tpo -c -o
src/preproc/preconv/preconv-preconv.o `test -f
'src/preproc/preconv/preconv.cpp' || echo
'../'`src/preproc/preconv/preconv.cpp
../src/preproc/preconv/preconv.cpp:30:10: fatal error: 'uchardet/uchardet.h'
file not found
#include <uchardet/uchardet.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/preproc/preconv/preconv-preconv.o] Error 1


So, this is now the time when I am slowly starting to doubt my sanity. I don't
see any differences in the invocations. The clang++ versions called outside
homebrew and inside are the same.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66143>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]