mesonbuild / mesonbuild/wrapdb

icu: not configurable

Open
#950 21 comments 0 reactions 0 assignees View on GitHub
Dominant language
Meson
Stars
118
Forks
298
Avg merge
2d 2h
Merged PRs (30d)
24

Description

_note_ the doesn't-build part was resolved in #951

-----

Hi! I'm not new to ICU. but I'm pretty new to meson.

Trying to add ICU as a subproject… meson 0.63.0 on mac.

```
icu4c = subproject('icu', default_options: [ 'default_library=static', 'cpp_std=c++17'])

icu_uc = icu4c.get_variable('icuuc_dep')


executable(…
dependencies: [icu_uc],
)
```

Errors below. Now, is there a way I can set switches on the ICU subproject?

I'd set something like the following

```
# subprojects/icu/meson.build
add_project_arguments('-DUCONFIG_NO_BREAK_ITERATION=1', '-DUCONFIG_NO_LEGACY_CONVERSION=1', '-DUCONFIG_NO_FORMATTING=1', language: 'cpp')
add_project_arguments('-DU_ATTRIBUTE_DEPRECATED=', language: 'cpp')
```

… but these should be switchable by the caller.

-----

```
[1/417] Compiling C++ object subprojects/icu/source/common/libicuuc.72.dylib.p/ucnvhz.cpp.o
FAILED: subprojects/icu/source/common/libicuuc.72.dylib.p/ucnvhz.cpp.o
clang++ -arch x86_64 -Isubprojects/icu/source/common/libicuuc.72.dylib.p -Isubprojects/icu/source/common -I../../../subprojects/icu/source/common -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -DU_COMMON_IMPLEMENTATION -MD -MQ subprojects/icu/source/common/libicuuc.72.dylib.p/ucnvhz.cpp.o -MF subprojects/icu/source/common/libicuuc.72.dylib.p/ucnvhz.cpp.o.d -o subprojects/icu/source/common/libicuuc.72.dylib.p/ucnvhz.cpp.o -c ../../../subprojects/icu/source/common/ucnvhz.cpp
../../../subprojects/icu/source/common/ucnvhz.cpp:558:9: error: 'ucnv_safeClone_72' is deprecated [-Werror,-Wdeprecated-declarations]
ucnv_safeClone(((UConverterDataHZ*)cnv->extraInfo)->gbConverter, &localClone->subCnv, &size, status);
^
../../../subprojects/icu/source/common/unicode/urename.h:706:24: note: expanded from macro 'ucnv_safeClone'
#define ucnv_safeClone U_ICU_ENTRY_POINT_RENAME(ucnv_safeClone)
^
../../../subprojects/icu/source/common/unicode/uvernum.h:123:47: note: expanded from macro 'U_ICU_ENTRY_POINT_RENAME'
# define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
^
../../../subprojects/icu/source/common/unicode/uvernum.h:122:51: note: expanded from macro 'U_DEF2_ICU_ENTRY_POINT_RENAME'
# define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
^
../../../subprojects/icu/source/common/unicode/uvernum.h:121:50: note: expanded from macro 'U_DEF_ICU_ENTRY_POINT_RENAME'
# define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
^
:11:1: note: expanded from here
ucnv_safeClone_72
^
../../../subprojects/icu/source/common/unicode/ucnv.h:556:1: note: 'ucnv_safeClone_72' has been explicitly marked deprecated here
U_DEPRECATED UConverter * U_EXPORT2
^
../../../subprojects/icu/source/common/unicode/umachine.h:116:29: note: expanded from macro 'U_DEPRECATED'
#define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED
^
../../../subprojects/icu/source/common/unicode/umachine.h:96:52: note: expanded from macro 'U_ATTRIBUTE_DEPRECATED'
# define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
^
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the caller configuration and the proposed subprojects/icu/meson.build changes. Read how the ICU wrap exposes icuuc_dep and how project arguments are currently defined, then determine how the requested ICU switches could be controlled by the parent project. Done means the ICU subproject can be configured by callers without hard-coded options and still builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.