[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: |
Fri, 6 Sep 2024 15:03:52 -0400 (EDT) |
Follow-up Comment #21, bug #66143 (group groff):
So, me again: I found the problem! I called make with CPPFLAGS=-v, which
displays the exact command line that is executed, in both my environments
(homebrew and outside).
Inside the homebrew environment, there is a single additional include path
added: /opt/homebrew/include
And lo and behold:
ls -ahl /opt/homebrew/include/ | grep uchar
lrwxr-xr-x 1 svenschober admin 41B Feb 13 2023 uchardet ->
../Cellar/uchardet/0.0.8/include/uchardet
_That_ is a symlink to the other place, where uchardet is installed, and more
importantly, _that_ is why an include of the form `<uchardet/uchardet.h>` is
working: `/opt/homebrew/include/uchardet/uchardet.h` is existant.
But not when that include path is missing.
I can add that path via:
../configure --without-x --with-uchardet CPPFLAGS="-I/opt/homebrew/include"
But, I ask myself, why this is not necessary in the homebrew env.
I found the following:
env | grep include
HOMEBREW_INCLUDE_PATHS=/opt/homebrew/opt/readline/include:/opt/homebrew/opt/sqlite/include
HOMEBREW_ISYSTEM_PATHS=/opt/homebrew/include:/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
It seems, they set a variable called HOMEBREW_ISYSTEM_PATHS. But how configure
gets to pick that up is still a riddle to me.
But doesn't this mean, my point still stands: the whole pkg-config business is
superfluous, as long as the cpp source references `<uchardet/uchardet.h>`?
I always understood the c/c++ inclusion mechanism to be simply a matter of
trying all include dirs, one by one and append the inclusion path. If there is
no match, we get the error I am getting. But I could be wrong.
I did some further digging and found another project using uchardet via
uchardets website:
https://github.com/mpv-player/mpv/blob/0eb5e914d9699b6f7fb91ee383dedadc491b0d7d/misc/charset_conv.c#L67
They also include it without the directory. In this old branch of another
project the same:
https://gitlab.gnome.org/World/gedit/libgedit-tepl/-/blob/tepl-3-0/tepl/tepl-file-loader.c
But, I also found counter examples (using the qualified form):
https://github.com/wang-bin/QtAV/blob/8bb780215bcd4a16d098a2a913d01f83b16193d7/config.tests/uchardet/main.cpp#L21
and
https://github.com/eranif/codelite/blob/345332fca8ae6d29ca6615dccec81d92525bd6f1/LiteEditor/cl_editor.cpp#L102
In summary, I don't know. I now know how to fix my build problem, but I have a
hunch, that removing the directory prefix would be a portability win.
Otherwise, why use pkg-config then after all?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66143>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
Message not available
Message not available
Message not available
Message not available
Message not available
Message not available
Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [bug #66143] build of current master (c9b3c99) fails on MacOS 14.6.1,
Sven Schober <=
Message not available
Message not available
Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [bug #66143] build doesn't find Homebrew uchardet on MacOS 14.6.1, G. Branden Robinson, 2024/09/07
Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [bug #66143] build doesn't find Homebrew uchardet on MacOS 14.6.1, G. Branden Robinson, 2024/09/08
Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [bug #66143] build doesn't find Homebrew uchardet on MacOS 14.6.1, G. Branden Robinson, 2024/09/08