[subset] multiple definition compilation errors on linking to another library
envgap__harfbuzz__harfbuzz-5683
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
cdbe72ca8bf2c077e91ae10c4e428e1183d7d5ec- Manifest
CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
harfbuzz/harfbuzz #5683 · read the original issue
I am receiving multiple definition errors on linking static build of harfbuzz-subset into my own library.
It would appear that while harfbuzz-subset links harfbuzz, both target also share a small number of source files (for harfbuzz-subset defined directly in CMakeLists, for harfbuzz listed in amalgamated harfbuzz.cc).
Snippet from CMakeLists.txt:
```
set (subset_project_sources
${PROJECT_SOURCE_DIR}/src/hb-number.cc
...
${PROJECT_SOURCE_DIR}/src/hb-ot-cff1-table.cc
${PROJECT_SOURCE_DIR}/src/hb-ot-cff2-table.cc
...
${PROJECT_SOURCE_DIR}/src/hb-static.cc
...
```
There must be something I am missing here as to the reasons why it is setup this way, right? Or?
I made my own fork which simply doesn't include these 4 files in harfbuzz-subset and it seems to both compile and work fine then ...04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]