Bundled freetype : icu dependency via Harfbuzz is not reflected in BUILD.gn ? |
||
Issue description
HarfBuzz depends on ICU. Now that bundled FreeType depends on HarfBuzz (and vice versa),
shouldn't freetype's BUILD.gn have dependency on ICU specified as well?
The bottom line is that libfreetype.so.6 needs to be rebuilt when ICU changes, but
currently it does not seem to be (with a component build).
When building components_unittests to test ICU 60RC, I came across this issue. Because of ICU name-versioning, ICU symbols have a version number suffix ( e.g. "_59", "_60"). libfreetype.so has
uscript_getScript_59 but it's not present in libicuuc.so (built from ICU 60). Instead,
it has uscript_getScript_60.
ninja -C out/rel components_unittests -j 1000
ninja: Entering directory `out/rel'
[22693/23086] ACTION //tools/v8_context_snapshot:generate_v8_context_snapshot(//build/toolchain/linux:clang_x64)
FAILED: v8_context_snapshot.bin
python ../../build/gn_run_binary.py ./v8_context_snapshot_generator --output_file=v8_context_snapshot.bin
././v8_context_snapshot_generator: symbol lookup error: /usr/local/google/home/jungshik/cr/t/src/out/rel/./libfreetype.so.6: undefined symbol: uscript_getShortName_59
./v8_context_snapshot_generator failed with exit code 127
[22698/23086] CXX obj/components/browser_sync/unit_tests/profile_sync_service_autofill_unittest.o
ninja: build stopped: subcommand failed.
~/cr/t/src$ git grep uscript_getShortNam
third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp: return hb_script_from_string(uscript_getShortName(script), -1);
third_party/harfbuzz-ng/src/hb-icu.cc: return hb_script_from_string (uscript_getShortName (script), -1);
ui/gfx/render_text_harfbuzz.cc: return hb_script_from_string(uscript_getShortName(script), -1);
~/cr/t/src$ nm out/rel/libfreetype.so.6 | grep uscript_get
U uscript_getScript_59
U uscript_getShortName_59
libfreetype.so.6 was built on Sep 28 before I tried testing ICU 60 RC.
~/cr/t/src$ ls -l out/rel/libfreetype.so.6
-rwxr-x--- 1442656 Sep 28 23:31 out/rel/libfreetype.so.6
,
Oct 23 2017
Does this help: https://chromium-review.googlesource.com/c/chromium/src/+/696241 FreeType and HarfBuzz are now built together. Perhaps this target should depend on ICU?
,
Oct 23 2017
I don't think FreeType directly depends on ICU, I think the issues you were running into may have had more to do with the way the libfreetype.so.6 was built. We're now building a libfreetype_harfbuzz.so to avoid circular dependencies, and the issue you're seeing above is confusing because the old component build statically linked most of HarfBuzz into libfreetype.so.6. If the issue persists in the new build setup, I would be interested to know.
,
Oct 23 2017
> https://chromium-review.googlesource.com/c/chromium/src/+/696241 Thanks. Yup, I had seen that CL, which is why I thought at first we needed to change the dependency somehow. Then (comment 1), I realized that that might be just an artifact of me having "old" (built previously before the above CL) libfreetype.so around in my build output directory. Perhaps, what's important in what Ben wrote is "was built". > the issues you were running into may have had more to do with the way the libfreetype.so.6 was built. The only minor concern I have is that other may come across a similar issue (the old libfreetype.so around in their build output directory resulted in 'symbol not found' errors). Perhaps, most will not because they may have already built 'FT + HB' together multiple times. Buildbots were all fine. And, if necessary, a brief PSA will do, I guess.
,
Oct 24 2017
After removing the old copy of libfreetype.so in my build output directory, I've never had this problem again. |
||
►
Sign in to add a comment |
||
Comment 1 by js...@chromium.org
, Oct 23 2017