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

auditwheel leaves undefined symbols #431

Closed
reynoldsnlp opened this issue Jun 5, 2023 · 1 comment
Closed

auditwheel leaves undefined symbols #431

reynoldsnlp opened this issue Jun 5, 2023 · 1 comment

Comments

@reynoldsnlp
Copy link

My library depends on libicu and the cibuildwheel build process completes without errors, including running fairly extensive tests. However, after installing the the produced wheel on a new machine, the module cannot be imported:

ImportError: /tmp/hfst_artifact/wheelhouse/unzipped/hfst/_libhfst.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZTIN6icu_508ByteSinkE

The cibuildwheel logs do not seem to have any notable information:

      + sh -c 'auditwheel repair -w /tmp/cibuildwheel/repaired_wheel /tmp/cibuildwheel/built_wheel/hfst-3.15.4.0b4-cp310-cp310-linux_x86_64.whl'
  INFO:auditwheel.main_repair:Repairing hfst-3.15.4.0b4-cp310-cp310-linux_x86_64.whl
  INFO:auditwheel.wheeltools:Previous filename tags: linux_x86_64
  INFO:auditwheel.wheeltools:New filename tags: manylinux_2_17_x86_64, manylinux2014_x86_64
  INFO:auditwheel.wheeltools:Previous WHEEL info tags: cp310-cp310-linux_x86_64
  INFO:auditwheel.wheeltools:New WHEEL info tags: cp310-cp310-manylinux_2_17_x86_64, cp310-cp310-manylinux2014_x86_64
  INFO:auditwheel.main_repair:
  Fixed-up wheel written to /tmp/cibuildwheel/repaired_wheel/hfst-3.15.4.0b4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

readelf and ldd do not list anything about icu:

$ readelf -d hfst/_libhfst.cpython-310-x86_64-linux-gnu.so

Dynamic section at offset 0xaa9c000 contains 30 entries:
  Tag        Type                         Name/Value
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../hfst.libs]
 0x0000000000000001 (NEEDED)             Shared library: [libreadline-2c5f7b8d.so.6.2]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000c (INIT)               0x1e5000
 0x000000000000000d (FINI)               0x777764
 0x0000000000000019 (INIT_ARRAY)         0x91a900
 0x000000000000001b (INIT_ARRAYSZ)       696 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x91abb8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x2443028
 0x0000000000000005 (STRTAB)             0x2571220
 0x0000000000000006 (SYMTAB)             0x155d8
 0x000000000000000a (STRSZ)              1149557 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x931000
 0x0000000000000002 (PLTRELSZ)           108456 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1c99e8
 0x0000000000000007 (RELA)               0x179738
 0x0000000000000008 (RELASZ)             328368 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x1795f8
 0x000000006fffffff (VERNEEDNUM)         5
 0x000000006ffffff0 (VERSYM)             0x173934
 0x000000006ffffff9 (RELACOUNT)          3811
 0x0000000000000000 (NULL)               0x0

$ ldd hfst/_libhfst.cpython-310-x86_64-linux-gnu.so
	linux-vdso.so.1 (0x00007fff5ddf8000)
	libreadline-2c5f7b8d.so.6.2 => /tmp/hfst_artifact/wheelhouse/unzipped/hfst/../hfst.libs/libreadline-2c5f7b8d.so.6.2 (0x00007f518f800000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f518f5d6000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f518faa8000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f518fa88000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f518fa81000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f518f3ae000)
	libtinfo-10270e32.so.5.9 => /tmp/hfst_artifact/wheelhouse/unzipped/hfst/../hfst.libs/libtinfo-10270e32.so.5.9 (0x00007f518f000000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f519222e000)

How can I ensure that the icu dependency remains intact?

@reynoldsnlp
Copy link
Author

I added the libraries I needed to extra_link_args in setup.py.

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

1 participant