1 |
Hello, |
2 |
|
3 |
On Thu, 12 Dec 2019, Adam Carter wrote: |
4 |
>Kodi has been dead for a while; |
5 |
>/usr/lib64/kodi/kodi-x11: symbol lookup error: /usr/lib64/kodi/kodi-x11: |
6 |
>undefined symbol: |
7 |
>_ZN3fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE |
8 |
> |
9 |
>How do i go about troubleshooting this? |
10 |
|
11 |
First of all, decode that C++ symbol with c++filt: |
12 |
|
13 |
$ echo _ZN3fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE | c++filt |
14 |
char* fmt::v6::internal::sprintf_format<long double>(long double, fmt::v6::internal::buffer<char>&, fmt::v6::internal::sprintf_specs) |
15 |
|
16 |
Now, with a bit of guesswork and tabbing, |
17 |
$ grep -r sprintf_format /usr/include/fmt/ |
18 |
/usr/include/fmt/format.h:void sprintf_format(Double, internal::buffer &, core_format_specs); |
19 |
/usr/include/fmt/format.h: internal::sprintf_format(value, buffer, normalized_spec); |
20 |
/usr/include/fmt/format-inl.h:void sprintf_format(Double value, internal::buffer &buf, |
21 |
|
22 |
It looks like the middle one, from /usr/include/fmt/format.h, i.e. |
23 |
internal::sprintf_format is the culprit. And |
24 |
|
25 |
$ qfile /usr/include/fmt/format.h |
26 |
dev-libs/libfmt: /usr/include/fmt/format.h |
27 |
|
28 |
gives us the package it belongs to. Guessing from the symbol name, |
29 |
kodi wants v6 of that library. I've got dev-libs/libfmt-5.3.0:0/5 |
30 |
installed, and on a hunch, running "symgrep"[1] (or nm | grep) on the lib |
31 |
itself gives: |
32 |
|
33 |
$ symgrep internal::sprintf_format /usr/lib64/libfmt.so |
34 |
275: 00000000000108a0 283 FUNC WEAK DEFAULT 11 void fmt::v5::internal::sprintf_format<double>(double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs) |
35 |
305: 00000000000109c0 291 FUNC WEAK DEFAULT 11 void fmt::v5::internal::sprintf_format<long double>(long double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs) |
36 |
238: 00000000000108a0 283 FUNC WEAK DEFAULT 11 void fmt::v5::internal::sprintf_format<double>(double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs) |
37 |
244: 00000000000109c0 291 FUNC WEAK DEFAULT 11 void fmt::v5::internal::sprintf_format<long double>(long double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs) |
38 |
|
39 |
$ nm /usr/lib64/libfmt.so | c++filt | grep sprintf_format |
40 |
00000000000108a0 W void fmt::v5::internal::sprintf_format<double>(double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs) |
41 |
00000000000109c0 W void fmt::v5::internal::sprintf_format<long double>(long double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs) |
42 |
|
43 |
Ahhaa, we've got fmt::v5::* and not fmt::v6::*! And yes, on this box it's: |
44 |
|
45 |
$ ls -l /usr/lib64/libfmt.so* |
46 |
lrwxrwxrwx 1 [..] /usr/lib64/libfmt.so -> libfmt.so.5 |
47 |
lrwxrwxrwx 1 [..] /usr/lib64/libfmt.so.5 -> libfmt.so.5.3.0 |
48 |
-rwxr-xr-x 1 [..] /usr/lib64/libfmt.so.5.3.0 |
49 |
|
50 |
So, you should rebuild kodi. So it gets linked to your installed |
51 |
libfmt. And/or update your libfmt to v6. |
52 |
|
53 |
Oh, and BTW, if you don't have the depended on package installed, |
54 |
searching for the missing symbol online usually gives some hints of |
55 |
where it comes from. |
56 |
|
57 |
BTW: what do revdep-rebuild and 'emerge @preserved-rebuild' make of the |
58 |
situation? |
59 |
|
60 |
HTH, |
61 |
-dnh |
62 |
|
63 |
[1] |
64 |
==== /usr/local/bin/symgrep ==== |
65 |
#!/bin/sh |
66 |
exec readelf -sW "$2" | c++filt | grep "$1" |
67 |
==== |
68 |
|
69 |
|
70 |
-- |
71 |
> You know, if we're gonna make this whole Christian society thingie, |
72 |
> shouldn't we at least wait until all the Christians agree? -- cdr |
73 |
I'd suggest waiting until Hell freezes over. It'll be a shorter wait. |
74 |
-- S. Lamble |