marisa 0.3.1-1.1: missing RTTI symbol breaks librime #289

Closed
opened 2026-04-19 13:51:01 +02:00 by jingyen · 15 comments

Seems like librime (1:1.16.1-8.1, x86-64-v3) fails to load at runtime because libmarisa.so from marisa (0.3.1-1.1, x86-64-v3) doesn't export the typeinfo for marisa::Exception symbol.

fcitx5 logs:

E addonloader.cpp:67] Failed to load library for addon rime on "/usr/lib/fcitx5/librime.so". Error: /usr/lib/librime.so.1: undefined symbol: _ZTIN6marisa9ExceptionE

Confirmed the symbol is needed by librime but absent from the ALHP build:

$ nm -D /usr/lib/librime.so.1 | grep marisa9Exception
                 U _ZTIN6marisa9ExceptionE
$ nm -D /usr/lib/libmarisa.so | grep marisa9Exception
(no output)

Downgrading to extra/marisa and extra/librime is a workaround for now, are the x86-64-v3 build flags are stripping RTTI visibility for this symbol?

I also found a similar issue in CachyOS forum

Seems like librime (1:1.16.1-8.1, x86-64-v3) fails to load at runtime because libmarisa.so from marisa (0.3.1-1.1, x86-64-v3) doesn't export the typeinfo for `marisa::Exception` symbol. fcitx5 logs: ``` E addonloader.cpp:67] Failed to load library for addon rime on "/usr/lib/fcitx5/librime.so". Error: /usr/lib/librime.so.1: undefined symbol: _ZTIN6marisa9ExceptionE ``` Confirmed the symbol is needed by librime but absent from the ALHP build: ``` $ nm -D /usr/lib/librime.so.1 | grep marisa9Exception U _ZTIN6marisa9ExceptionE $ nm -D /usr/lib/libmarisa.so | grep marisa9Exception (no output) ``` Downgrading to extra/marisa and extra/librime is a workaround for now, are the x86-64-v3 build flags are stripping RTTI visibility for this symbol? I also found a similar issue in [CachyOS forum](https://discuss.cachyos.org/t/bug-librime-in-cachyos-extra-v3-repository-symbol-lookup-error-due-to-marisa-library-update/27331/3)
Owner

That sounds like a LTO issue. Let me have a look.

That sounds like a LTO issue. Let me have a look.
anonfunc added the bug label 2026-04-19 14:24:51 +02:00
Owner

I requeued the package and force-disabled LTO on it, lets see if this solves it.

I requeued the package and force-disabled LTO on it, lets see if this solves it.
Owner

Can you try 0.3.1-1.2?

Can you try `0.3.1-1.2`?
Author

Thanks for the fast responses! I just tried but on my end I still don't see the symbol, ldd -r /usr/lib/librime.so still says it's undefined. Also I'm not familiar with ALHP but I checked the dashboard and it seems like it's still built with LTO?

Thanks for the fast responses! I just tried but on my end I still don't see the symbol, `ldd -r /usr/lib/librime.so` still says it's undefined. Also I'm not familiar with ALHP but I checked the [dashboard](https://status.alhp.dev/?pkgbase=marisa) and it seems like it's still built with LTO?
Owner

Yea right, forgot to reload the lto list 🙃 Try .3 as soon as its build.

Yea right, forgot to reload the lto list 🙃 Try .3 as soon as its build.
Author

Hmm, still the same on .3

Hmm, still the same on .3
Owner

Hmm, still the same on .3

Doesn't work or the status page? Might be that the status page is just a visual bug. Let me confirm tho.

> Hmm, still the same on .3 Doesn't work or the status page? Might be that the status page is just a visual bug. Let me confirm tho.
Author

Doesn't work as _ZTIN6marisa9ExceptionE is still not found, here's a quick sanity check on my end as well

pacman -Qi librime marisa | grep -e Version -e Packager && ldd -r /usr/lib/librime.so
Version         : 1:1.16.1-8.1
Packager        : ALHP x86-64-v3 <alhp@harting.dev>
Version         : 0.3.1-1.3
Packager        : ALHP x86-64-v3 <alhp@harting.dev>
        linux-vdso.so.1 (0x00007f4ca4ce7000)
        libglog.so.2 => /usr/lib/libglog.so.2 (0x00007f4ca4c5e000)
        libyaml-cpp.so.0.9 => /usr/lib/libyaml-cpp.so.0.9 (0x00007f4ca49a7000)
        libleveldb.so.1 => /usr/lib/libleveldb.so.1 (0x00007f4ca4952000)
        libmarisa.so.0 => /usr/lib/libmarisa.so.0 (0x00007f4ca491e000)
        libopencc.so.1.2 => /usr/lib/libopencc.so.1.2 (0x00007f4ca48dc000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4ca4600000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f4ca44e2000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f4ca48af000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f4ca42f1000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f4ca4ce9000)
        libgflags.so.2.2 => /usr/lib/libgflags.so.2.2 (0x00007f4ca42c1000)
        libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007f4ca4c4a000)
undefined symbol: _ZTIN6marisa9ExceptionE       (/usr/lib/librime.so)
Doesn't work as `_ZTIN6marisa9ExceptionE` is still not found, here's a quick sanity check on my end as well ``` pacman -Qi librime marisa | grep -e Version -e Packager && ldd -r /usr/lib/librime.so Version : 1:1.16.1-8.1 Packager : ALHP x86-64-v3 <alhp@harting.dev> Version : 0.3.1-1.3 Packager : ALHP x86-64-v3 <alhp@harting.dev> linux-vdso.so.1 (0x00007f4ca4ce7000) libglog.so.2 => /usr/lib/libglog.so.2 (0x00007f4ca4c5e000) libyaml-cpp.so.0.9 => /usr/lib/libyaml-cpp.so.0.9 (0x00007f4ca49a7000) libleveldb.so.1 => /usr/lib/libleveldb.so.1 (0x00007f4ca4952000) libmarisa.so.0 => /usr/lib/libmarisa.so.0 (0x00007f4ca491e000) libopencc.so.1.2 => /usr/lib/libopencc.so.1.2 (0x00007f4ca48dc000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4ca4600000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f4ca44e2000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f4ca48af000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f4ca42f1000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f4ca4ce9000) libgflags.so.2.2 => /usr/lib/libgflags.so.2.2 (0x00007f4ca42c1000) libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007f4ca4c4a000) undefined symbol: _ZTIN6marisa9ExceptionE (/usr/lib/librime.so) ```
Owner

I added librime as well, lets see if that does the trick. Otherwise I need to dive deeper into the issue, might be easier to just exclude it for now.

I added `librime` as well, lets see if that does the trick. Otherwise I need to dive deeper into the issue, might be easier to just exclude it for now.
Author

While waiting for the package to propagate to my mirror I looked up a little, it seems like marisa changed their Exception to just alias to std::exception[1] so it doesn't emit any typeinfo. So it might not be an LTO issue, maybe librime just needed a rebuild against the new marisa headers. That also sounds in line with the linked issue on CachyOS. But I'll see if the librime rebuild works! EDIT yep it works!

1

While waiting for the package to propagate to my mirror I looked up a little, it seems like marisa changed their Exception to just alias to `std::exception`[1] so it doesn't emit any typeinfo. So it might not be an LTO issue, maybe librime just needed a rebuild against the new marisa headers. That also sounds in line with the linked issue on CachyOS. ~~But I'll see if the librime rebuild works!~~ EDIT yep it works! [1](https://github.com/s-yata/marisa-trie/commit/0ecfe31)
Owner

While waiting for the package to propagate to my mirror I looked up a little, it seems like marisa changed their Exception to just alias to std::exception[1] so it doesn't emit any typeinfo. So it might not be an LTO issue, maybe librime just needed a rebuild against the new marisa headers. That also sounds in line with the linked issue on CachyOS. But I'll see if the librime rebuild works!

1

Would also be possible yes. Rebuild for librime is done.

> While waiting for the package to propagate to my mirror I looked up a little, it seems like marisa changed their Exception to just alias to `std::exception`[1] so it doesn't emit any typeinfo. So it might not be an LTO issue, maybe librime just needed a rebuild against the new marisa headers. That also sounds in line with the linked issue on CachyOS. But I'll see if the librime rebuild works! > > [1](https://github.com/s-yata/marisa-trie/commit/0ecfe31) Would also be possible yes. Rebuild for librime is done.
Author

In case you missed the edit, yep the rebuilt version works.

In case you missed the edit, yep the rebuilt version works.
Owner

So lets try a LTO build version of the two. I'll remove them from the list again, sec.

EDIT: done, should be included in the next cycle.

So lets try a LTO build version of the two. I'll remove them from the list again, sec. EDIT: done, should be included in the next cycle.
Author

Just tested, works. Sorry my initial report implied the issue was with marisa 😅

Just tested, works. Sorry my initial report implied the issue was with marisa 😅
Owner

All good, thats sometimes not clear what causes the symbol miss. Nice that we could resolve it :)

All good, thats sometimes not clear what causes the symbol miss. Nice that we could resolve it :)
Sign in to join this conversation.