fcitx / fcitx5-cskk

SKK input method plugin for fcitx5 that uses LibCSKK
GNU General Public License v3.0
40 stars 3 forks source link

Doesn't work with Ubuntu21.04 binary fctix5 #2

Closed naokiri closed 3 years ago

naokiri commented 3 years ago

Haven't looked into deep but local built fcitx5 of tag: 5.0.5 can load this addon but the official hirsute release fcitx5 cannot load.

D2021-05-01 22:12:59.853884 addonmanager.cpp:143] Call loadAddon() with cskk checkDependencies() returns 0 Dep: [] OptDep: []

But after that no debug message is shown. No 'Failed to load library for addon...' or 'Loaded addon ...'.

wengxt commented 3 years ago

I tried to build cskk and fcitx5-cskk on a fresh 21.04 and it does work for me. So I guess it's your installation issue, E.g. you didn't install fcitx's addon library to the right path or so. While xdg has things like xdg_data_dirs, it doesn't have spec for library. So by default only /usr/lib/x86_64-linux-gnu/fcitx5 is the right path for addon library.

I just pass -DCMAKE_INSTALL_PREFIX=/usr when running cmake and it should give you the right path to install.

naokiri commented 3 years ago

Thank you. You are right. I now could use this addon if I move my lib to that directory. I thought it also reads /usr/local/lib. I'll update the README to explain so.

naokiri commented 3 years ago

Sorry but it also worked without install dir change now.. I think I should just close this ticket for now..

naokiri commented 3 years ago

Ah, cache. Yes it was the install dir problem.

wengxt commented 3 years ago

If you really want to, you could also use FCITX_ADDON_DIRS to specify the path, for testing purpose, or environment like flatpak https://github.com/fcitx/flatpak-fcitx5/blob/master/fcitx5.sh

Also cmake would cache your specified path, there's some "magic" within the cmake script that comes with fcitx You could take a look at: https://github.com/fcitx/fcitx5/blob/abe868081f3a64c170a752cb9628f2a7e1b265dc/src/lib/fcitx-utils/Fcitx5UtilsConfig.cmake.in#L9 to see where the default value comes from.

naokiri commented 3 years ago

That looks much nicer. I'll prefer that way.

naokiri commented 3 years ago

I'm trying to reproduce on my machine but on the latest master it really looks like the addon is working correctly...

I think I have to conclude this was some ABI issue and fixed somehow already.

naokiri commented 3 years ago

I'll look into it when some others face this issue.