Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate OT name table parsing symbols in Chromium build #4203

Closed
drott opened this issue Apr 24, 2023 · 6 comments
Closed

Duplicate OT name table parsing symbols in Chromium build #4203

drott opened this issue Apr 24, 2023 · 6 comments
Labels
Chrome Chrome/Chromium project related issues and requests

Comments

@drott
Copy link
Collaborator

drott commented Apr 24, 2023

In doing a larger HarfBuzz roll in Chromium, I get a duplicate symbol linking failure, and a conflict between symbols built from hb-subset.cc and hb-ot-name.cc. I don't have an immediate fix suggestions, I assume these may need to be moved to a source file and built separately, instead of the header includes?

Error:

ld.lld: error: duplicate symbol: _hb_ot_name_language_for_ms_code(unsigned int)
>>> defined at hb-ot-name.cc
>>>            obj/third_party/harfbuzz-ng/harfbuzz_source/hb-ot-name.o:(_hb_ot_name_language_for_ms_code(unsigned int))
>>> defined at hb-subset.cc
>>>            obj/third_party/harfbuzz-ng/harfbuzz_source/hb-subset.o:(.text+0x0)

ld.lld: error: duplicate symbol: _hb_ot_name_language_for_mac_code(unsigned int)
>>> defined at hb-ot-name.cc
>>>            obj/third_party/harfbuzz-ng/harfbuzz_source/hb-ot-name.o:(_hb_ot_name_language_for_mac_code(unsigned int))
>>> defined at hb-subset.cc
>>>            obj/third_party/harfbuzz-ng/harfbuzz_source/hb-subset.o:(.text+0x0)

I experimentally reverted the change that moved the name table logic to OT/name/name.hh f89fa6d - but that, as mostly expected, did not change anything.

@drott drott added the Chrome Chrome/Chromium project related issues and requests label Apr 24, 2023
@drott
Copy link
Collaborator Author

drott commented Apr 24, 2023

CC @matthiasclasen

@behdad
Copy link
Member

behdad commented Apr 24, 2023

I wonder why we don't get this in our builds though.

@behdad
Copy link
Member

behdad commented Apr 24, 2023

cc @qxliu76

@behdad
Copy link
Member

behdad commented Apr 24, 2023

I wonder why we don't get this in our builds though.

That's because we compile these two files into separate libraries.

@behdad
Copy link
Member

behdad commented Apr 24, 2023

The solution is to move _hb_ot_name_language_for_ms_code into hb-static.cc again. I think it used to be there.

@behdad
Copy link
Member

behdad commented Apr 24, 2023

I believe this is the commit that broke this: 7b5f0dd

@behdad behdad closed this as completed in 4129061 Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chrome Chrome/Chromium project related issues and requests
Projects
None yet
Development

No branches or pull requests

2 participants