RE: Make errors with Cyrus::IMAP
Arghh... Well, I finally made it to where make test will run, but I now get the following output: make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01-imclient t/01-imclientok 1/10enter an IMAP server to use for testing: localhost imclient_connect: unknown host localhost.localdomain at t/01-imclient.t line 68, STDIN line 1. t/01-imclientdubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-10 Failed 9/10 tests, 10.00% okay t/02-admin...defined(@array) is deprecated at t/02-admin.t line 91. (Maybe you should just omit the defined()?) Name main::quota used only once: possible typo at t/02-admin.t line 91. t/02-admin...ok 1/7enter an IMAP server to use for testing: localhost imclient_connect: unknown host localhost.localdomain at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 71, STDIN line 1. Use of uninitialized value in subroutine entry at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 107, STDIN line 1. (in cleanup) client is not of type Cyrus::IMAP at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 107, STDIN line 1. t/02-admin...dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-7 Failed 6/7 tests, 14.29% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t/01-imclient.t 255 6528010 18 180.00% 2-10 t/02-admin.t 255 65280 7 12 171.43% 2-7 Failed 2/2 test scripts, 0.00% okay. 15/17 subtests failed, 11.76% okay. make: *** [test_dynamic] Error 2 # When I run imtest to test the Cyrus IMAP install, everything works perfectly as it should. I can send the output of them if necessary. What I don't get is the client is not of type Cyrus::IMAP; this is a make test in $SOURCEDIR/perl/imap! Any clues? Thanks, --H. Scott Brown -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralph Roessner Sent: Monday, January 24, 2005 11:34 AM To: info-cyrus@lists.andrew.cmu.edu Subject: Re: Make errors with Cyrus::IMAP Hello! On Mon, Jan 24, 2005 at 09:37:06AM -0800, H. Scott Brown wrote: Hello, List, OK, I tried the recommended procedure, i.e. make LD_OPTIONS=-lrt, and no longer get a linking error with fdatasync, BUT (arghhh...)... (...) Looks like you are missing other libs as well, and this time it really is BDB. So, per request, here is the requested ldd output: (...) Ok, so I was barking up the wrong tree, and you LD_LIBRARY_PATH is not the source of your problem. Still, the ldd output tells us that you IMAP.so is neither linked to BDB nor to SASL. I have no idea what is going on in here, the only thing I can see is that it searches /lib before /usr/lib in the first case, and /usr/lib first in the second case, but never seems to make it to both in either case? i.e. if it doesn't find it in the first search path, it never searches anywhere else, just gives up? I dunn o, just guessing at this point. Right. The first hit terminates the search. For our Solaris 8 machines, /lib is a symlink to /usr/lib, and I suspect it's the same for Sol 9. So it does not matter which path ld.so follows. I was hoping to see whether your LD_LIBRARY_PATH somehow corrupts the search for BDB/SASL. As those are not linked at all, I don't see anything. It may be worth noting as well that when I first built the entire package, issued the following: ./configure --with-auth=unix --with-sasl=/usr/local/lib/sasl2 --with-dbdir=/usr/local/BerkeleyDB.4.2 --without-openssl I don't need openssl support at this time, and possibly I need to point this build to the location of Berkeley, as in configure? Note that the server is up and running (at least it appears as though) fine, I can send and receive mail to the default domain, but I cannot create mailboxes for virtual domains. You have a point there. I examined Makefile.PL and noticed that linking instructions for SASL/BDB/... are taken from the environment. Set up your environment like this (note the line continuations): SASL_LIB='-L/usr/local/lib/sasl2 -R/usr/local/lib/sasl2 -lsasl2' \ BDB_LIB='-L/usr/local/BerkeleyDB.4.2 -R/usr/local/BerkeleyDB.4.2 -ldb-4.2' \ LIB_RT='-lrt' \ perl Makefile.PL You won't need LD_OPTIONS with this approach. Make and call ldd (without the -s) on the IMAP.so, and it should list librt, libsasl2, libdb-4.2 . If it does then you should have no more linking problems. Thank you so much for your help. You're welcome, Ralph Rößner -- Ralph Rößner TU Darmstadt EMail: [EMAIL PROTECTED]FB Informatik --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives
Re: Make errors with Cyrus::IMAP
Hello, List, OK, I tried the recommended procedure, i.e. make LD_OPTIONS=-lrt, and no longer get a linking error with fdatasync, BUT (arghhh...)... Make test outputs the following now: PERL_DL_NONLAZY=1 /bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01-imclientCan't load '/cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so' for module Cyrus::IMAP: ld.so.1: /bin/perl: fatal: relocation error: file /cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so: symbol db_env_create: referenced symbol not found at /usr/local/lib/perl5/5.8.5/sun4-solaris/DynaLoader.pm line 230. at t/01-imclient.t line 51 Compilation failed in require at t/01-imclient.t line 51. BEGIN failed--compilation aborted at t/01-imclient.t line 51. dubious Test returned status 255 (wstat 65280, 0xff00) t/02-admin...Can't load '/cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so' for module Cyrus::IMAP: ld.so.1: /bin/perl: fatal: relocation error: file /cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so: symbol db_env_create: referenced symbol not found at /usr/local/lib/perl5/5.8.5/sun4-solaris/DynaLoader.pm line 230. at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 44 Compilation failed in require at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 44. BEGIN failed--compilation aborted at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 44. Compilation failed in require at t/02-admin.t line 51. BEGIN failed--compilation aborted at t/02-admin.t line 51. dubious Test returned status 255 (wstat 65280, 0xff00) FAILED--2 test scripts could be run, alas--no output ever seen make: *** [test_dynamic] Error 2 So, per request, here is the requested ldd output: With LD_LIBRARY_PATH: find object=librt.so.1; required by blib/arch/auto/Cyrus/IMAP/IMAP.so search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/librt.so.1 librt.so.1 =/lib/librt.so.1 find object=libsasl2.so.2; required by blib/arch/auto/Cyrus/IMAP/IMAP.so search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libsasl2.so.2 trying path=/usr/lib/libsasl2.so.2 trying path=/usr/openwin/lib/libsasl2.so.2 trying path=/usr/dt/lib/libsasl2.so.2 trying path=/usr/local/lib/libsasl2.so.2 libsasl2.so.2 = /usr/local/lib/libsasl2.so.2 find object=libc.so.1; required by blib/arch/auto/Cyrus/IMAP/IMAP.so search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libc.so.1 libc.so.1 = /lib/libc.so.1 find object=libaio.so.1; required by /lib/librt.so.1 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libaio.so.1 libaio.so.1 = /lib/libaio.so.1 find object=libc.so.1; required by /lib/librt.so.1 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libc.so.1 find object=libmd5.so.1; required by /lib/librt.so.1 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libmd5.so.1 libmd5.so.1 = /lib/libmd5.so.1 find object=libdl.so.1; required by /usr/local/lib/libsasl2.so.2 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libdl.so.1 libdl.so.1 =/lib/libdl.so.1 find object=libresolv.so.2; required by /usr/local/lib/libsasl2.so.2 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libresolv.so.2 libresolv.so.2 =/lib/libresolv.so.2 find object=libsocket.so.1; required by /usr/local/lib/libsasl2.so.2 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libsocket.so.1 libsocket.so.1 =/lib/libsocket.so.1 find object=libnsl.so.1; required by /usr/local/lib/libsasl2.so.2 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH) trying path=/lib/libnsl.so.1 libnsl.so.1 = /lib/libnsl.so.1 find object=libdoor.so.1; required by /usr/local/lib/libsasl2.so.2 search path=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/li b/sasl2:/usr/local/lib/ssl/lib (LD_LIBRARY_PATH)
Re: Make errors with Cyrus::IMAP
Hello! On Mon, Jan 24, 2005 at 09:37:06AM -0800, H. Scott Brown wrote: Hello, List, OK, I tried the recommended procedure, i.e. make LD_OPTIONS=-lrt, and no longer get a linking error with fdatasync, BUT (arghhh...)... (...) Looks like you are missing other libs as well, and this time it really is BDB. So, per request, here is the requested ldd output: (...) Ok, so I was barking up the wrong tree, and you LD_LIBRARY_PATH is not the source of your problem. Still, the ldd output tells us that you IMAP.so is neither linked to BDB nor to SASL. I have no idea what is going on in here, the only thing I can see is that it searches /lib before /usr/lib in the first case, and /usr/lib first in the second case, but never seems to make it to both in either case? i.e. if it doesn't find it in the first search path, it never searches anywhere else, just gives up? I dunn o, just guessing at this point. Right. The first hit terminates the search. For our Solaris 8 machines, /lib is a symlink to /usr/lib, and I suspect it's the same for Sol 9. So it does not matter which path ld.so follows. I was hoping to see whether your LD_LIBRARY_PATH somehow corrupts the search for BDB/SASL. As those are not linked at all, I don't see anything. It may be worth noting as well that when I first built the entire package, issued the following: ./configure --with-auth=unix --with-sasl=/usr/local/lib/sasl2 --with-dbdir=/usr/local/BerkeleyDB.4.2 --without-openssl I don't need openssl support at this time, and possibly I need to point this build to the location of Berkeley, as in configure? Note that the server is up and running (at least it appears as though) fine, I can send and receive mail to the default domain, but I cannot create mailboxes for virtual domains. You have a point there. I examined Makefile.PL and noticed that linking instructions for SASL/BDB/... are taken from the environment. Set up your environment like this (note the line continuations): SASL_LIB='-L/usr/local/lib/sasl2 -R/usr/local/lib/sasl2 -lsasl2' \ BDB_LIB='-L/usr/local/BerkeleyDB.4.2 -R/usr/local/BerkeleyDB.4.2 -ldb-4.2' \ LIB_RT='-lrt' \ perl Makefile.PL You won't need LD_OPTIONS with this approach. Make and call ldd (without the -s) on the IMAP.so, and it should list librt, libsasl2, libdb-4.2 . If it does then you should have no more linking problems. Thank you so much for your help. You're welcome, Ralph Rößner -- Ralph Rößner TU Darmstadt EMail: [EMAIL PROTECTED]FB Informatik --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Make errors with Cyrus::IMAP
Hello! On Fri, Jan 21, 2005 at 11:05:02AM -0800, H. Scott Brown wrote: Hello, List, I have been having problems running cyradm, and obviously need to get this going to administer mailboxes (I am using virtual domains). What problems exactly? Can you give us any error messages? Perhaps there is an easier workaround. Meanwhile, my thoughts on your compilation problem: Based on a Google search which told me I needed to rebuild the stuff in $SOURCEDIR/perl/imap, I attempted to do so. Particulars: OS: Solaris 9 Cyrus-IMAP: 2.2.9 Perl: 5.8.5 SunOS 5.8, IMAP 2.2.10, Perl 5.6.1. Similar enough, I think. Output: perl Makefile.PL Note (probably harmless): No library found for -lssl Note (probably harmless): No library found for -lcrypto Writing Makefile for Cyrus::IMAP Mostly harmless? If you have OpenSSL installed anywhere (your LD_LIBRARY_PATH seems to indicate that you have) then this is an indication of problems to come and not harmless at all. (make runs deleted) I know nothing of what the first error means, other than it has something to do with ld.so.1, which, I am assuming (being very green) is a linking error to something. Correct. ld.so.1 is the run time linker. It fails to resolve (find an implementation of) fdatasync() which is referenced (used) by IMAP.so . The second, fdatasync, isn't this a Berkeley macro? I can't remember where it is, db.h? Here are a couple of environment variables: According to man, fdatasync() is an OS function that, roughly speaking, flushes I/O queues. It is contained in librt. I can verify that in my Cyrus IMAP build, the fdatasync symbol is provided by /usr/lib/librt.so.1 . Maybe there is just a -lrt missing in your link line. The (link time) linker would not complain in this case but ld.so would. Try forcing your linker to include librt: make LD_OPTIONS=-lrt This should not hurt anyting and you don't have to explain things to Perl. Try a make test. If the error persists then please send ldd outputs for your IMAP.so: ldd -s blib/arch/auto/Cyrus/IMAP/IMAP.so And one without LD_LIBRARY_PATH: LD_LIBRARY_PATH= ldd -s blib/arch/auto/Cyrus/IMAP/IMAP.so Perhaps this will give us some pointers. In my experience, LD_LIBRARY_PATH is evil and should be avoided. But getting rid of the beasty can be a major PITA. Sincerely, Ralph Rößner -- Ralph Rößner TU Darmstadt EMail: [EMAIL PROTECTED]FB Informatik --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Make errors with Cyrus::IMAP
Hello, List, I have been having problems running cyradm, and obviously need to get this going to administer mailboxes (I am using virtual domains). Based on a Google search which told me I needed to rebuild the stuff in $SOURCEDIR/perl/imap, I attempted to do so. Particulars: OS: Solaris 9 Cyrus-IMAP: 2.2.9 Perl: 5.8.5 Output: perl Makefile.PL Note (probably harmless): No library found for -lssl Note (probably harmless): No library found for -lcrypto Writing Makefile for Cyrus::IMAP make gcc -B/usr/ccs/bin/ -c -I../../lib -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\1.00\ -DXS_VERSION=\1.00\ -fPIC -I/usr/local/lib/perl5/5.8.5/sun4-solaris/CORE -DPERL_POLLUTE IMAP.c Running Mkbootstrap for Cyrus::IMAP () chmod 644 IMAP.bs rm -f blib/arch/auto/Cyrus/IMAP/IMAP.so LD_RUN_PATH=/usr/local/lib gcc -B/usr/ccs/bin/ -G -L/usr/local/lib -L/opt/gnu/lib IMAP.o -o blib/arch/auto/Cyrus/IMAP/IMAP.so ../../lib/libcyrus.a ../../lib/libcyrus_min.a -lsasl2 chmod 755 blib/arch/auto/Cyrus/IMAP/IMAP.so cp IMAP.bs blib/arch/auto/Cyrus/IMAP/IMAP.bs chmod 644 blib/arch/auto/Cyrus/IMAP/IMAP.bs cp cyradm blib/script/cyradm /bin/perl -MExtUtils::MY -e MY-fixin(shift) blib/script/cyradm Manifying blib/man1/cyradm.1 Manifying blib/man3/Cyrus::IMAP::Admin.3 Manifying blib/man3/Cyrus::IMAP::Shell.3 Manifying blib/man3/Cyrus::IMAP.3 Manifying blib/man3/Cyrus::IMAP::IMSP.3 make test PERL_DL_NONLAZY=1 /bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01-imclientCan't load '/cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so' for module Cyrus::IMAP: ld.so.1: /bin/perl: fatal: relocation error: file /cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so: symbol fdatasync: referenced symbol not found at /usr/local/lib/perl5/5.8.5/sun4-solaris/DynaLoader.pm line 230. at t/01-imclient.t line 51 Compilation failed in require at t/01-imclient.t line 51. BEGIN failed--compilation aborted at t/01-imclient.t line 51. dubious Test returned status 255 (wstat 65280, 0xff00) t/02-admin...Can't load '/cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so' for module Cyrus::IMAP: ld.so.1: /bin/perl: fatal: relocation error: file /cyrus-imapd-2.2.9/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so: symbol fdatasync: referenced symbol not found at /usr/local/lib/perl5/5.8.5/sun4-solaris/DynaLoader.pm line 230. at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 44 Compilation failed in require at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 44. BEGIN failed--compilation aborted at /cyrus-imapd-2.2.9/perl/imap/blib/lib/Cyrus/IMAP/Admin.pm line 44. Compilation failed in require at t/02-admin.t line 51. BEGIN failed--compilation aborted at t/02-admin.t line 51. dubious Test returned status 255 (wstat 65280, 0xff00) FAILED--2 test scripts could be run, alas--no output ever seen make: *** [test_dynamic] Error 2 I know nothing of what the first error means, other than it has something to do with ld.so.1, which, I am assuming (being very green) is a linking error to something. The second, fdatasync, isn't this a Berkeley macro? I can't remember where it is, db.h? Here are a couple of environment variables: $LD_LIBRARY_PATH sh: /lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/lib/sas l2:/usr/local/lib/ssl/lib: not found $PATH sh: /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/ucb: not found Any help would be greatly appreciated. TIA, H. Scott Brown --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html