mesonbuild / mesonbuild/wrapdb
icu: Include file not found
- Dominant language
- Meson
- Stars
- 118
- Forks
- 298
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 24
Description
## environment
- Linux
```sh
$ sudo docker container run -it debian:bookworm
$ apt update && apt install meson
$ g++ --version
g++ (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ meson --version
1.0.1
```
- Windows
```cmd
> scoop install meson
> meson --version
1.5.1
> cl
Microsoft(R) C/C++ Optimizing Compiler Version 19.41.34120 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
```
## structure
```
.
|-- foo.cpp
|-- meson.build
`-- subprojects
`-- icu.wrap
```
- meson.build
```meson
project(
'foo',
'cpp',
version: '0.1',
default_options: ['warning_level=3', 'cpp_std=c++14'],
)
icu = subproject('icu')
icuuc = icu.get_variable('icuuc_dep')
icuio = icu.get_variable('icuio_dep')
icui18n = icu.get_variable('icui18n_dep')
exe = executable('foo', 'foo.cpp', dependencies: [icuuc, icuio, icui18n])
```
- foo.cpp
```cpp
#include
#include // icuio header
int main() {
auto s = icu::UnicodeString::fromUTF8(u8"あいうえお");
std::cout << s << std::endl;
}
```
## actual behavior
```sh
$ meson setup build
$ meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /root/foo/build
ninja: Entering directory `/root/foo/build'
[1/2] Compiling C++ object foo.p/foo.cpp.o
FAILED: foo.p/foo.cpp.o
c++ -Ifoo.p -I. -I.. -Isubprojects/icu/source/common -I../subprojects/icu/source/common -Isubprojects/icu/source/i18n -I../subprojects/icu/source/i18n -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++14 -O0 -g -MD -MQ foo.p/foo.cpp.o -MF foo.p/foo.cpp.o.d -o foo.p/foo.cpp.o -c ../foo.cpp
../foo.cpp:3:10: fatal error: unicode/ustream.h: No such file or directory
3 | #include // icuio header
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the root meson.build, foo.cpp, and subprojects/icu.wrap, then reproduce the failure with `meson setup build` and `meson compile -C build` in the stated Linux or Windows environment. Done means the ICU subproject exposes the include path needed for `unicode/ustream.h` and the sample compiles successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100