grosjo / fts-xapian

Dovecot FTS plugin based on Xapian
GNU Lesser General Public License v2.1
97 stars 21 forks source link

cannot load plugin because of sqlite3_open undefined symbol #51

Closed Jean-Daniel closed 4 years ago

Jean-Daniel commented 4 years ago

I'm running a dovecot instance that does not use sqlite3 for anything and so don't load it.

When trying to load the fis plugin, it fails because it can't resolve sqlite3 symbols (sqlite3_open/sqlite3_close,…)

because libsqlite is not defined as a dependency for lib21_fts_xapian_plugin.so.

ldd src/.libs/lib21_fts_xapian_plugin.so 
    linux-vdso.so.1 (0x00007ffe527fd000)
    libxapian.so.30 => /usr/lib/x86_64-linux-gnu/libxapian.so.30 (0x00007f5e86c03000)
    libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007f5e8684b000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5e864c2000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5e860d1000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5e85eb9000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5e85cb1000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5e85a94000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f5e8588d000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5e854ef000)
    libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007f5e83946000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5e83727000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5e83523000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f5e8721d000)
grosjo commented 4 years ago

@Jean-Daniel Are you compiling the plug-in yourself or using a package from a distro ?

Jean-Daniel commented 4 years ago

I'm building it myself to use with the repo.dovecot.org bionic release.

To build it, I'm simply doing an apt install dovecot-dev to get the latest version (from repo.dovecot.org).

git clone https://github.com/grosjo/fts-xapian.git
cd fts-xapian
./configure --with-dovecot=/usr/lib/dovecot/
grosjo commented 4 years ago

Don't forget to use "autoreconf -vi" This is really weird, as there is a specific check in the configure and the make for sqlite Can you provide the Makefile generated and the config.log ? (after you type autoreconf -vi )

slavkoja commented 4 years ago

IMO, it will be packaging problem.

I am building own debian's package, where is dependency on libsqlite3 autodetected and added to package's dependencies automatically, without my effort, see:

apt show dovecot-xapian
Package: dovecot-xapian
Version: 1.3.3-1sla2
...
Depends: libc6 (>= 2.14), libgcc1 (>= 1:3.0), libicu63 (>= 63.1-1~), libsqlite3-0 (>= 3.5.9), libstdc++6 (>= 5.2), libxapian30 (>= 1.4.11~)
...
Jean-Daniel commented 4 years ago

Don't forget to use "autoreconf -vi"

That's it. I forgot to autoreconf. Sorry for the noise