[gdal-dev] Build GDAL on MAC fail: undefined 'locale_t'

Керим Хемраев kerim.khemraev at mail.ru
Sun May 22 10:28:36 PDT 2022


Hi,
 
I build GDAL as part of superbuild of my project.
I have no problems to build it on Windows and Linux but when building on MACOS (10.15.7 Catalina) I get error:
GDAL/ogr/ogrsf_frmts/geojson/libjson/json_tokener.c:268:2: 
error: use of undeclared identifier 'locale_t'
        locale_t oldlocale = uselocale(NULL);
 
I’m newbie to MACOS but using small cmake script and `find_path` function I know that both `locale.h` and `xlocale.h` exist.
The script is sort of:
find_path(dir NAMES "locale.h")
message("locale dir: ${dir}")
find_path(xdir NAMES "xlocale.h")
message("xlocale dir: ${xdir}")
 
and the output:
locale dir: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include
xlocale dir: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include
 
Though I have three SDK’s and all of them have `locale.h` and `xlocale.h`.
I hope somebody knows what is the problem and how to solve it
 
Regards,
Kerim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220522/3757312b/attachment.htm>


More information about the gdal-dev mailing list