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

check-symbols tests fail on 5.3.1 #3850

Closed
andreasstieger opened this issue Oct 20, 2022 · 8 comments
Closed

check-symbols tests fail on 5.3.1 #3850

andreasstieger opened this issue Oct 20, 2022 · 8 comments

Comments

@andreasstieger
Copy link

New test failure in 5.3.1:

[   93s]  28/418 harfbuzz:src / check-symbols                           FAIL             0.14s   exit status 1
[...]
[   93s]   EXPORTS
[   93s] + hb_subset_accelerator_t::user_data_key()::key
[   93s]   hb_subset_input_create_or_fail
[...]
[  104s] Summary of Failures:
[  104s] 
[  104s]  28/418 harfbuzz:src / check-symbols                           FAIL             0.14s   exit status 1
@andreasstieger
Copy link
Author

@garretrieger looks like this is from #3842

@behdad
Copy link
Member

behdad commented Oct 20, 2022

What compiler?

@andreasstieger
Copy link
Author

from full log gcc 12.2.1

[   33s] The Meson build system
[   33s] Version: 0.63.3
[   33s] Source dir: /home/abuild/rpmbuild/BUILD/harfbuzz-5.3.1
[   33s] Build dir: /home/abuild/rpmbuild/BUILD/harfbuzz-5.3.1/x86_64-suse-linux
[   33s] Build type: native build
[   33s] Project name: harfbuzz
[   33s] Project version: 5.3.1
[   33s] C compiler for the host machine: cc (gcc 12.2.1 "cc (SUSE Linux) 12.2.1 20220830 [revision e927d1cf141f221c5a32574bde0913307e140984]")
[   33s] C linker for the host machine: cc ld.bfd 2.39.0.20220810-1
[   33s] C++ compiler for the host machine: c++ (gcc 12.2.1 "c++ (SUSE Linux) 12.2.1 20220830 [revision e927d1cf141f221c5a32574bde0913307e140984]")
[   33s] C++ linker for the host machine: c++ ld.bfd 2.39.0.20220810-1
[   33s] Host machine cpu family: x86_64
[   33s] Host machine cpu: x86_64

@heftig
Copy link
Contributor

heftig commented Oct 20, 2022

Same issue on Arch Linux, GCC 12.2.0. Only happens when building with LTO (meson -D b_lto=true).

@heftig
Copy link
Contributor

heftig commented Oct 20, 2022

The symbol also appears in the dynamic symbol table of libharfbuzz-subset for a non-LTO build, but the test does not complain.

@heftig
Copy link
Contributor

heftig commented Oct 20, 2022

  • With LTO, the symbol is a global BSS data symbol (B in nm).
  • Without LTO, the symbol is a unique global symbol (u in nm).

Adjusting the check-symbols.py script to consider u symbols exported also makes the check fail for a non-LTO build:

diff --git a/src/check-symbols.py b/src/check-symbols.py
index 11ca28dc7..d0b8bd3c8 100755
--- a/src/check-symbols.py
+++ b/src/check-symbols.py
@@ -31,7 +31,7 @@ for soname in ['harfbuzz', 'harfbuzz-subset', 'harfbuzz-icu', 'harfbuzz-gobject'
 		symprefix = '_' if suffix == 'dylib' else ''
 
 		EXPORTED_SYMBOLS = [s.split ()[2]
-				    for s in re.findall (r'^.+ [BCDGIRST] .+$', subprocess.check_output (nm.split() + [so]).decode ('utf-8'), re.MULTILINE)
+				    for s in re.findall (r'^.+ [BCDGIRSTu] .+$', subprocess.check_output (nm.split() + [so]).decode ('utf-8'), re.MULTILINE)
 				    if not re.match (r'.* %s(%s)\b' % (symprefix, IGNORED_SYMBOLS), s)]
 
 		# run again c++filt also if is available

The manpage for GNU nm says:

There are however a few lowercase symbols that are shown for special global symbols (u, v and w).

So maybe these all should be considered "exported".

@behdad
Copy link
Member

behdad commented Oct 20, 2022

Thanks. I'm working on a fix.

@behdad behdad closed this as completed in b0b7a65 Oct 20, 2022
@behdad
Copy link
Member

behdad commented Oct 20, 2022

Fixed. Thank you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants