Re: [Dovecot] : error while loading shared libraries: libdovecot.so.0 (arm cross compile)
"Stephen Feyrer" stephen.feyrer@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 directory
In 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@gmail.com
Hi.
Thanks, I'll give that a try.
-- Kind regards
Stephen Feyrer.
On Mon, 29 Aug 2011 09:04:01 +0100, Joseph Tam jtam.home@gmail.com wrote:
"Stephen Feyrer" stephen.feyrer@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 directory
In 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@gmail.com
Hi.
Having just removed a number of configure options from the cross compilers
recipe to simplify the problem I think one of those I took away overrode
--without-shared-libs. Now it seems to install and run cleanly. Even so,
while building the ipackage I spotted some warnings. Could these because
by my build environment? After some testing I'll let you know if the
current dovecot build works. I really appreciate your support and
patience, thank you.
*** Warning: Linking the shared library lib02_imap_acl_plugin.la against
the loadable module
*** lib01_acl_plugin.so is not portable!
*** Warning: Linking the shared library lib21_fts_squat_plugin.la against
the loadable module
*** lib20_fts_plugin.so is not portable!
*** Warning: Linking the shared library lib20_mail_log_plugin.la against
the loadable module
*** lib15_notify_plugin.so is not portable!
*** Warning: Linking the shared library lib11_imap_quota_plugin.la against
the loadable module
*** lib10_quota_plugin.so is not portable!
*** Warning: Linking the shared library lib30_imap_zlib_plugin.la against
the loadable module
*** lib20_zlib_plugin.so is not portable!
The current cross compile ./configure:
i_cv_epoll_works=no \
i_cv_inotify_works=no \
i_cv_posix_fallocate_works=no \
i_cv_signed_size_t=no \
i_cv_gmtime_max_time_t=32 \
i_cv_signed_time_t=yes \
i_cv_mmap_plays_with_write=yes \
i_cv_fd_passing=yes \
i_cv_c99_vsnprintf=yes \
lib_cv_va_copy=yes lib_cv___va_copy=yes \
lib_cv_va_val_copy=yes \
./configure \
$(DOVECOT_CONFIGURE) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_TARGET_NAME) \
--target=$(GNU_TARGET_NAME) \
--prefix=/opt \
--without-shared-libs \
--with-notify=dnotify \
--localstatedir=/opt/var \
--with-ioloop=poll; \
old ./configure:
i_cv_epoll_works=no i_cv_inotify_works=no i_cv_posix_fallocate_works=no
i_cv_signed_size_t=no i_cv_gmtime_max_time_t=32 i_cv_signed_time_t=yes
i_cv_mmap_plays_with_write=yes i_cv_fd_passing=yes i_cv_c99_vsnprintf=yes
lib_cv_va_copy=yes lib_cv___va_copy=yes lib_cv_va_val_copy=yes ./configure
--enable-devel-checks --without-shared-libs
$(DOVECOT_CONFIGURE)
--build=$(GNU_HOST_NAME)
--host=$(GNU_TARGET_NAME)
--target=$(GNU_TARGET_NAME)
--prefix=/opt
--disable-static
--without-gssapi
--without-pam
--with-notify=dnotify
--sysconfdir=/opt/etc/dovecot
--localstatedir=/opt/var
--with-ssldir=/opt/etc/dovecot
--without-sql-drivers
--with-ioloop=poll; \
/opt/dovecoti] # ipkg install dovecot_2.0.14-2_arm.ipk
Installing dovecot (2.0.14-2) to root...
Configuration file '/opt/etc/dovecot/dovecot.conf'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions (if diff is
installed)
The default action is to keep your current version.
*** dovecot.conf (Y/I/N/O/D) [default=N] ?n
Configuring dovecot
/opt/sbin/dovecot: error while loading shared libraries: libdovecot.so.0:
cannot open shared object file: No such file or directory
postinst script returned status 127
ERROR: dovecot.postinst returned 127
Successfully terminated.
[/opt/dovecoti] # strace dovecot -F
execve("/opt/sbin/dovecot", ["dovecot", "-F"], [/* 23 vars */]) = 0
uname({sys="Linux", node="nas2", ...}) = 0
brk(0) = 0x1c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/opt/lib/v5l/fast-mult/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/opt/lib/v5l/fast-mult/half", 0xbe920fa8) = -1 ENOENT (No such
file or directory)
open("/opt/lib/v5l/fast-mult/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/opt/lib/v5l/fast-mult", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/opt/lib/v5l/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/opt/lib/v5l/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/opt/lib/v5l/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/opt/lib/v5l", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/opt/lib/fast-mult/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/opt/lib/fast-mult/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/opt/lib/fast-mult/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/opt/lib/fast-mult", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/opt/lib/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/opt/lib/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/opt/lib/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/opt/lib", {st_mode=S_IFDIR|0755, st_size=17592186044416, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17592186044416, ...}) = 0
mmap2(NULL, 10345, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open("/lib/v5l/fast-mult/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/lib/v5l/fast-mult/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/lib/v5l/fast-mult/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/lib/v5l/fast-mult", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/lib/v5l/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/v5l/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/lib/v5l/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/v5l", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/lib/fast-mult/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/lib/fast-mult/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/lib/fast-mult/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/fast-mult", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/lib/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/lib/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib", {st_mode=S_IFDIR|0755, st_size=17592186044416, ...}) = 0
open("/usr/lib/v5l/fast-mult/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/usr/lib/v5l/fast-mult/half", 0xbe920fa8) = -1 ENOENT (No such
file or directory)
open("/usr/lib/v5l/fast-mult/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/usr/lib/v5l/fast-mult", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/usr/lib/v5l/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/lib/v5l/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/usr/lib/v5l/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/usr/lib/v5l", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/usr/lib/fast-mult/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/usr/lib/fast-mult/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/usr/lib/fast-mult/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/lib/fast-mult", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/usr/lib/half/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/usr/lib/half", 0xbe920fa8) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=17592186044416, ...}) = 0
writev(2, [{"dovecot", 7}, {": ", 2}, {"error while loading shared
libra"..., 36}, {": ", 2}, {"libdovecot.so.0", 15}, {": ", 2}, {"cannot
open shared object file", 30}, {": ", 2}, {"No such file or directory",
25}, {"\n", 1}], 10dovecot: error while loading shared libraries:
libdovecot.so.0: cannot open shared object file: No such file or directory
) = 122
exit_group(127) = ?
The outcome of the native compile:
[/opt/dovecoti] # ./configure --prefix=/opt --enable-devel-checks
--enable-maintainer-mode
[/opt/etc/dovecot] # gdb --args dovecot -F [snip] This GDB was configured as "arm-none-linux-gnueabi"... (gdb) run Starting program: /share/MD0_DATA/optware/opt/sbin/dovecot -F Panic: Leaked file fd 3: dev 9.0 inode 53040060
Program received signal SIGABRT, Aborted. 0x400c2374 in kill () from /lib/libc.so.6 (gdb) bt full #0 0x400c2374 in kill () from /lib/libc.so.6 No symbol table info available. #1 0x400c21a8 in raise () from /lib/libc.so.6 No symbol table info available. #2 0x400c3328 in abort () from /lib/libc.so.6 No symbol table info available. Backtrace stopped: frame did not save the PC (gdb) quit The program is running. Exit anyway? (y or n) y
On Tue, 30 Aug 2011 00:15:09 +0100, Stephen Feyrer steve@toth.org.uk
wrote:
Hi.
Thanks, I'll give that a try.
-- Kind regards
Stephen Feyrer.
On Mon, 29 Aug 2011 09:04:01 +0100, Joseph Tam jtam.home@gmail.com
wrote:"Stephen Feyrer" stephen.feyrer@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@gmail.com
On 30.8.2011, at 19.46, Stephen Feyrer wrote:
*** Warning: Linking the shared library lib02_imap_acl_plugin.la against the loadable module *** lib01_acl_plugin.so is not portable!
This is normal.
/opt/sbin/dovecot: error while loading shared libraries: libdovecot.so.0: cannot open shared object file: No such file or directory
So it's still not working? I guess the libdovecot.so.0 simply isn't in library paths. Typically giving linker -rpath parameter pointing to libdovecot.so.0 makes this problem invisible, but I guess in your system it doesn't do this.
The outcome of the native compile: [/opt/dovecoti] # ./configure --prefix=/opt --enable-devel-checks --enable-maintainer-mode
--enable-devel-checks is pretty useless unless you're developing Dovecot.
[/opt/etc/dovecot] # gdb --args dovecot -F [snip] This GDB was configured as "arm-none-linux-gnueabi"... (gdb) run Starting program: /share/MD0_DATA/optware/opt/sbin/dovecot -F Panic: Leaked file fd 3: dev 9.0 inode 53040060
This panic is caused by the --enable-devel-check. It wouldn't have crashed otherwise. You could work around it by setting GDB=1 environment.
Hi.
Dovecot appears to be running (testing required).
/opt/sbin/dovecot:dovecot/anvil:dovecot/log:dovecot/config
On Tue, 30 Aug 2011 18:13:14 +0100, Timo Sirainen tss@iki.fi wrote:
On 30.8.2011, at 19.46, Stephen Feyrer wrote:
*** Warning: Linking the shared library lib02_imap_acl_plugin.la
against the loadable module *** lib01_acl_plugin.so is not portable!This is normal.
Okay.
/opt/sbin/dovecot: error while loading shared libraries:
libdovecot.so.0: cannot open shared object file: No such file or
directorySo it's still not working? I guess the libdovecot.so.0 simply isn't in
library paths. Typically giving linker -rpath parameter pointing to
libdovecot.so.0 makes this problem invisible, but I guess in your system
it doesn't do this.
So far Dovecot seems to be running. I don't want to say it's working or
not until I've done some tests. This is using
--without-shared-libraries. If it's just the linker in my system that's
broken then this is an adequate solution. Otherwise any information I can
produce might be useful to you is desirable.
The outcome of the native compile: [/opt/dovecoti] # ./configure --prefix=/opt --enable-devel-checks
--enable-maintainer-mode--enable-devel-checks is pretty useless unless you're developing Dovecot.
[/opt/etc/dovecot] # gdb --args dovecot -F [snip] This GDB was configured as "arm-none-linux-gnueabi"... (gdb) run Starting program: /share/MD0_DATA/optware/opt/sbin/dovecot -F Panic: Leaked file fd 3: dev 9.0 inode 53040060
This panic is caused by the --enable-devel-check. It wouldn't have
crashed otherwise. You could work around it by setting GDB=1 environment.
I put --enable-devel-check in there in the vain hope that it'd elicit
anything useful. I would suspect that this is again the build
environment. I won't included in any further tests.
Thanks again.
-- Kind regards
Stephen Feyrer.
Hi.
On Tue, 30 Aug 2011 18:13:14 +0100, Timo Sirainen tss@iki.fi wrote:
On 30.8.2011, at 19.46, Stephen Feyrer wrote:
/opt/sbin/dovecot: error while loading shared libraries:
libdovecot.so.0: cannot open shared object file: No such file or
directorySo it's still not working? I guess the libdovecot.so.0 simply isn't in
library paths. Typically giving linker -rpath parameter pointing to
libdovecot.so.0 makes this problem invisible, but I guess in your system
it doesn't do this.
I am planning to use Dovecot SASL with Sendmail as well, will this lack of
shared libraries cause a problem? Really I should have thought of this
before.
I guess I'm going to have to start tracking down the actual source of my
linker problem.
-- Kind regards.
Stephen Feyrer.
On 31.8.2011, at 3.00, Stephen Feyrer wrote:
So it's still not working? I guess the libdovecot.so.0 simply isn't in library paths. Typically giving linker -rpath parameter pointing to libdovecot.so.0 makes this problem invisible, but I guess in your system it doesn't do this.
I am planning to use Dovecot SASL with Sendmail as well, will this lack of shared libraries cause a problem? Really I should have thought of this before.
I don't think Sendmail supports Dovecot SASL? If it does, it talks to Dovecot via UNIX socket and doesn't require any Dovecot libraries.
Hi.
Sorry! I was thinking of Postfix (and Exim). That was my mistake, sorry again.
Sadly Exim isn't available on my target platform.
Thanks.
-- Stephen Feyrer.
On Wed, 31 Aug 2011 02:28:00 +0100, Timo Sirainen tss@iki.fi wrote:
On 31.8.2011, at 3.00, Stephen Feyrer wrote:
So it's still not working? I guess the libdovecot.so.0 simply isn't in
library paths. Typically giving linker -rpath parameter pointing to
libdovecot.so.0 makes this problem invisible, but I guess in your
system it doesn't do this.I am planning to use Dovecot SASL with Sendmail as well, will this lack
of shared libraries cause a problem? Really I should have thought of
this before.I don't think Sendmail supports Dovecot SASL? If it does, it talks to
Dovecot via UNIX socket and doesn't require any Dovecot libraries.
participants (3)
-
Joseph Tam
-
Stephen Feyrer
-
Timo Sirainen