Stephen Feyrer
2011-Aug-27 16:36 UTC
[Dovecot] : error while loading shared libraries: libdovecot.so.0 (arm cross compile)
Hi. I've made a new attempt at build Dovecot. The build and then install processes appeared to work find. Then when I try to run Dovecot it reports the error: /share/MD0_DATA/optware/opt/sbin/dovecot: error while loading shared libraries: libdovecot.so.0: cannot open shared object file: No such file or directory To get a better idea of what's going on, I added --enable-devel-checks at ./configure and then ran gdb: # gdb --args dovecot -F GNU gdb 6.8 [snip] This GDB was configured as "arm-none-linux-gnueabi"... (no debugging symbols found) (gdb) run Starting program: /share/MD0_DATA/optware/opt/sbin/dovecot -F (no debugging symbols found) /share/MD0_DATA/optware/opt/sbin/dovecot: error while loading shared libraries: libdovecot.so.0: cannot open shared object file: No such file or directory Program exited with code 0177. (gdb) bt full No stack. (gdb) quit By the way on a separate but related note, adding --enable-maintiner-mode introduced a new problem also relating to libdovecot.so.0.0.0 I'll refer to that in the post script. # ls -alh /opt/lib/dovecot/ drwxr-xr-x 8 admin administ 4.0k Aug 27 16:31 ./ drwxr-xr-x 37 admin administ 16.0k Aug 27 16:27 ../ drwxr-xr-x 2 avahi avahi 4.0k Nov 26 2009 .debug/ drwxr-xr-x 2 admin administ 4.0k Aug 27 16:27 auth/ drwxr-xr-x 2 admin administ 4.0k Aug 27 16:31 doveadm/ -rw-r--r-- 1 admin administ 678 Aug 27 16:27 dovecot-config drwxr-xr-x 3 admin administ 4.0k Aug 26 18:01 imap/ drwxr-xr-x 2 admin administ 4.0k Aug 26 18:01 lda/ -rw-r--r-- 1 admin administ 527.6k Jan 6 2011 lib01_acl_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib01_acl_plugin.la* -rwxr-xr-x 1 admin administ 56.3k Aug 27 16:27 lib01_acl_plugin.so* -rw-r--r-- 1 admin administ 70.5k Jan 6 2011 lib02_imap_acl_plugin.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 lib02_imap_acl_plugin.la* -rwxr-xr-x 1 admin administ 13.1k Aug 27 16:27 lib02_imap_acl_plugin.so* -rw-r--r-- 1 admin administ 69.9k Jan 6 2011 lib02_lazy_expunge_plugin.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 lib02_lazy_expunge_plugin.la* -rwxr-xr-x 1 admin administ 13.0k Aug 27 16:27 lib02_lazy_expunge_plugin.so* -rw-r--r-- 1 admin administ 51.3k Jan 6 2011 lib05_snarf_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib05_snarf_plugin.la* -rwxr-xr-x 1 admin administ 7.4k Aug 27 16:27 lib05_snarf_plugin.so* -rw-r--r-- 1 admin administ 443.4k Jan 6 2011 lib10_quota_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib10_quota_plugin.la* -rwxr-xr-x 1 admin administ 51.5k Aug 27 16:27 lib10_quota_plugin.so* -rw-r--r-- 1 admin administ 23.6k Jan 6 2011 lib11_imap_quota_plugin.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 lib11_imap_quota_plugin.la* -rwxr-xr-x 1 admin administ 8.3k Aug 27 16:27 lib11_imap_quota_plugin.so* -rw-r--r-- 1 admin administ 56.9k Jan 6 2011 lib11_trash_plugin.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 lib11_trash_plugin.la* -rwxr-xr-x 1 admin administ 9.9k Aug 27 16:27 lib11_trash_plugin.so* -rw-r--r-- 1 admin administ 71.8k Jan 6 2011 lib15_notify_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib15_notify_plugin.la* -rwxr-xr-x 1 admin administ 10.6k Aug 27 16:27 lib15_notify_plugin.so* -rw-r--r-- 1 admin administ 14.4k Jan 6 2011 lib20_autocreate_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib20_autocreate_plugin.la* -rwxr-xr-x 1 admin administ 5.3k Aug 27 16:27 lib20_autocreate_plugin.so* -rw-r--r-- 1 avahi avahi 10.9k Nov 26 2009 lib20_convert_plugin.a -rw-r--r-- 1 admin administ 62.7k Jan 6 2011 lib20_expire_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib20_expire_plugin.la* -rwxr-xr-x 1 admin administ 10.6k Aug 27 16:27 lib20_expire_plugin.so* -rw-r--r-- 1 admin administ 161.0k Jan 6 2011 lib20_fts_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib20_fts_plugin.la* -rwxr-xr-x 1 admin administ 29.4k Aug 27 16:27 lib20_fts_plugin.so* -rw-r--r-- 1 admin administ 59.4k Jan 6 2011 lib20_listescape_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib20_listescape_plugin.la* -rwxr-xr-x 1 admin administ 9.4k Aug 27 16:27 lib20_listescape_plugin.so* -rw-r--r-- 1 admin administ 62.8k Jan 6 2011 lib20_mail_log_plugin.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 lib20_mail_log_plugin.la* -rwxr-xr-x 1 admin administ 10.1k Aug 27 16:27 lib20_mail_log_plugin.so* -rw-r--r-- 1 avahi avahi 54.4k Nov 6 2010 lib20_mbox_snarf_plugin.a -rw-r--r-- 1 admin administ 450.8k Jan 6 2011 lib20_virtual_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib20_virtual_plugin.la* -rwxr-xr-x 1 admin administ 47.6k Aug 27 16:27 lib20_virtual_plugin.so* -rw-r--r-- 1 admin administ 115.1k Jan 6 2011 lib20_zlib_plugin.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 lib20_zlib_plugin.la* -rwxr-xr-x 1 admin administ 18.4k Aug 27 16:27 lib20_zlib_plugin.so* -rw-r--r-- 1 admin administ 181.7k Jan 6 2011 lib21_fts_squat_plugin.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 lib21_fts_squat_plugin.la* -rwxr-xr-x 1 admin administ 48.8k Aug 27 16:27 lib21_fts_squat_plugin.so* -rw-r--r-- 1 admin administ 22.0k Jan 6 2011 lib30_imap_zlib_plugin.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 lib30_imap_zlib_plugin.la* -rwxr-xr-x 1 admin administ 6.5k Aug 27 16:27 lib30_imap_zlib_plugin.so* -rw-r--r-- 1 admin administ 101.3k Jan 6 2011 libdovecot-lda.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 libdovecot-lda.la* lrwxrwxrwx 1 admin administ 23 Aug 27 16:31 libdovecot-lda.so -> libdovecot-lda.so.0.0.0* lrwxrwxrwx 1 admin administ 23 Aug 27 16:31 libdovecot-lda.so.0 -> libdovecot-lda.so.0.0.0* -rwxr-xr-x 1 admin administ 35.2k Aug 27 16:27 libdovecot-lda.so.0.0.0* -rw-r--r-- 1 admin administ 241.7k Jan 6 2011 libdovecot-login.a -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 libdovecot-login.la* lrwxrwxrwx 1 admin administ 25 Aug 27 16:31 libdovecot-login.so -> libdovecot-login.so.0.0.0* lrwxrwxrwx 1 admin administ 25 Aug 27 16:31 libdovecot-login.so.0 -> libdovecot-login.so.0.0.0* -rwxr-xr-x 1 admin administ 65.5k Aug 27 16:27 libdovecot-login.so.0.0.0* -rwxr-xr-x 1 admin administ 1.0k Aug 27 16:27 libdovecot-sql.la* lrwxrwxrwx 1 admin administ 23 Aug 27 16:31 libdovecot-sql.so -> libdovecot-sql.so.0.0.0* lrwxrwxrwx 1 admin administ 23 Aug 27 16:31 libdovecot-sql.so.0 -> libdovecot-sql.so.0.0.0* -rwxr-xr-x 1 admin administ 19.3k Aug 27 16:27 libdovecot-sql.so.0.0.0* -rw-r--r-- 1 admin administ 6.2M Jan 6 2011 libdovecot-storage.a -rwxr-xr-x 1 admin administ 1.1k Aug 27 16:27 libdovecot-storage.la* lrwxrwxrwx 1 admin administ 27 Aug 27 16:31 libdovecot-storage.so -> libdovecot-storage.so.0.0.0* lrwxrwxrwx 1 admin administ 27 Aug 27 16:31 libdovecot-storage.so.0 -> libdovecot-storage.so.0.0.0* -rwxr-xr-x 1 admin administ 737.5k Aug 27 16:27 libdovecot-storage.so.0.0.0* -rw-r--r-- 1 admin administ 1.8M Jan 6 2011 libdovecot.a -rwxr-xr-x 1 admin administ 1011 Aug 27 16:27 libdovecot.la* lrwxrwxrwx 1 admin administ 19 Aug 27 16:31 libdovecot.so -> libdovecot.so.0.0.0* lrwxrwxrwx 1 admin administ 19 Aug 27 16:31 libdovecot.so.0 -> libdovecot.so.0.0.0* -rwxr-xr-x 1 admin administ 440.8k Aug 27 16:27 libdovecot.so.0.0.0* drwxr-xr-x 2 admin administ 4.0k Aug 26 18:01 pop3/ Everything seems to be in the right place. So I don't know what's wrong. Now on to my post script. This issue first appears when I try to package my freshly built Dovecot for installation on my arm powered nas. #make dovecot-ipk [...] test -z "/opt/include/dovecot" || /usr/bin/mkdir -p "~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/include/dovecot" /usr/bin/install -c -m 644 settings.h settings-parser.h '~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/include/dovecot' make[5]: Leaving directory `~/Projects/nslu2/optware/tsx09/builds/dovecot/src/lib-settings' make[4]: Leaving directory `~/Projects/nslu2/optware/tsx09/builds/dovecot/src/lib-settings' Making install in lib-dovecot make[4]: Entering directory `~/Projects/nslu2/optware/tsx09/builds/dovecot/src/lib-dovecot' make[5]: Entering directory `~/Projects/nslu2/optware/tsx09/builds/dovecot/src/lib-dovecot' test -z "/opt/lib/dovecot" || /usr/bin/mkdir -p "~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/lib/dovecot" /bin/sh ../../libtool --mode=install /usr/bin/install -c -s libdovecot.la '~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/lib/dovecot' libtool: install: /usr/bin/install -c .libs/libdovecot.so.0.0.0 ~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/lib/dovecot/libdovecot.so.0.0.0 libtool: install: strip --strip-unneeded ~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/lib/dovecot/libdovecot.so.0.0.0 strip: Unable to recognise the format of the input file `~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/lib/dovecot/libdovecot.so.0.0.0' make[5]: *** [install-pkglibLTLIBRARIES] Error 1 make[5]: Leaving directory `~/Projects/nslu2/optware/tsx09/builds/dovecot/src/lib-dovecot' make[4]: *** [install-am] Error 2 make[4]: Leaving directory `~/Projects/nslu2/optware/tsx09/builds/dovecot/src/lib-dovecot' make[3]: *** [install-recursive] Error 1 make[3]: Leaving directory `~/Projects/nslu2/optware/tsx09/builds/dovecot/src' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory `~/Projects/nslu2/optware/tsx09/builds/dovecot' make[1]: *** [install-strip] Error 2 make[1]: Leaving directory `~/Projects/nslu2/optware/tsx09/builds/dovecot' make: *** [~/Projects/nslu2/optware/tsx09/builds/dovecot_2.0.13-2_arm.ipk] Error 2 So I went looking for libdovecot.so.0.0.0 and found, ls -ahl ~/Projects/nslu2/optware/tsx09/builds/dovecot-2.0.13-ipk/opt/lib/dovecot/: total 1.3M drwxr-xr-x 2 leonidis leonidis 4.0K Aug 27 17:07 . drwxr-xr-x 3 leonidis leonidis 4.0K Aug 27 17:07 .. -rw-r--r-- 1 leonidis leonidis 678 Aug 27 17:07 dovecot-config -rwxr-xr-x 1 leonidis leonidis 1.3M Aug 27 17:07 libdovecot.so.0.0.0 The other libraries appear to have been built and are waiting to be packaged up but ipackage doesn't seem to get that far. What this says about ipackage and how it might relate to my first problem I don't know. I apologise this all seems a bit like a broken record to me. -- Kind regards Stephen Feyrer.
Timo Sirainen
2011-Aug-29 01:45 UTC
[Dovecot] : error while loading shared libraries: libdovecot.so.0 (arm cross compile)
On Sat, 2011-08-27 at 17:36 +0100, Stephen Feyrer wrote:> I've made a new attempt at build Dovecot. The build and then install > processes appeared to work find. Then when I try to run Dovecot it > reports the error: > > /share/MD0_DATA/optware/opt/sbin/dovecot: error while loading shared > libraries: libdovecot.so.0: cannot open shared object file: No such file > or directoryNo idea. Try without shared libraries: configure --without-shared-libs
Joseph Tam
2011-Aug-29 08:04 UTC
[Dovecot] : error while loading shared libraries: libdovecot.so.0 (arm cross compile)
"Stephen Feyrer" <stephen.feyrer at btinternet.com> writes:> I've made a new attempt at build Dovecot. The build and then install > processes appeared to work find. Then when I try to run Dovecot it > reports the error: > > /share/MD0_DATA/optware/opt/sbin/dovecot: error while loading shared > libraries: libdovecot.so.0: cannot open shared object file: No such file > or directoryIn cases like this where I have no clue where an executable is trying to load a library from, run a process trace tool (strace, truss, etc.) and you can see all the library run paths it's trying before failing. Joseph Tam <jtam.home at gmail.com>