Subject: ld Problems on Solaris 9

From: Don Hayward <[email-masked]>
Date: Tue, 3 Feb 2004 15:39:39 -0500 (EST)

I have UW-imap, perl-c-client, wing/maild working on a Solaris 6
system with perl 5.6.1, umap-2002a, openssl-0.9.7.h.  I'm trying to
move the server to a Solaris 9 system with imap-2004.RC4, perl5.6.2
and the same openssl and am having run time problems.  Everything
compiles cleanly.  But when I try to start maild I get the following:

Can't load '/usr/local/lib/perl5/site_perl/5.6.2/sun4-solaris/auto/Mail/Cclient/Cclient.so' for module Mail::Cclient: ld.so.1: /usr/bin/perl: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5.6.2/sun4-solaris/auto/Mail/Cclient/Cclient.so: symbol SSL_get_peer_certificate: referenced symbol not found at /usr/local/lib/perl5/5.6.2/sun4-solaris/DynaLoader.pm line 206.
 at /usr/sbin/maild line 16
Compilation failed in require at /usr/sbin/maild line 16.
BEGIN failed--compilation aborted at /usr/sbin/maild line 16.

As well, when I try to start the imap server from another system
(mozilla mail) I get the system is not an imap4 server.

And mtest:
 mtest/mtest
MTest -- C client test program
Debug protocol (y/n)?y
Mailbox ('?' for help): {localhost}INBOX
[Trying IP address [127.0.0.1]]
Û`
Û`issing IMAP reply key: l
?[CLOSED] IMAP connection broken (server response)
Mailbox ('?' for help): {postoffi.mote.org}INBOX
[Trying IP address [12.174.210.9]]
Û 
Û issing IMAP reply key: l
?[CLOSED] IMAP connection broken (server response)
Mailbox ('?' for help):

My command line for the compile (I started out with no extraldflags,
but have added these trying to solve the problem) is:

gmake gso EXTRALDFLAGS='-R/usr/local/lib -R/usr/local/ssl/lib'

The relevant line from inetd.conf is:

imap  stream tcp nowait root /usr/sbin/imapd imapd

and from services:

imap            143/tcp         imap2      # Internet Mail Access Protocol v2
imap            143/udp         imap2      # Internet Mail Access Protocol v2

ls -l /usr/sbin/imapd
-rwxr-xr-x   1 root     other    2215356 Feb  2 16:12 /usr/sbin/imapd

echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/local/ssl/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/lib

gcc --version
gcc (GCC) 3.3.2

I tried imap-2002a with the same results.

I would appreciate suggestions about how to solve this.  Thanks.

Don Hayward			[email-masked]
Mote Marine Laboratory		Office: 941.388.4441  Cell: 941.302.4982
1600 Ken Thompson Parkway	Fax: 941.388.4312
Sarasota, FL 34236		See: http://www.mote.org
Independent, non-profit, marine and estuarine research and education facility.
For PGP public key do: http://www.mote.org/~don/donpgp.asc
use "DISCLAIMER"; # We run Debian Linux
Ordinary men and women have a right to peace, material comfort, self-respect,
and a touch of joy in living. Eric F. Goldman,  [1915-1989]
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Tue, 3 Feb 2004 13:02:42 -0800 (Pacific Standard Time)

Your problem appears to be a gcc installation problem.

The IMAP serer on postoffi.mote.org returns:
 ld.so.1: imapd: fatal: libgcc_s.so.1: open failed: No such file or directory
which indicates that at least this file (and perhaps others) needed on
your system are missing.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: Don Hayward <[email-masked]>
Date: Tue, 3 Feb 2004 16:26:22 -0500 (EST)

Thanks Mark.  The files are there in /usr/local/lib -- it's a question
of getting the loader to find them, thus the -R/usr/local/lib -- I've
been having similar problems with other apps I've built on this system
-- it seems to be related to secure vs insecure loading, effective
uid, etc.   I've solved some with crle:

 crle

Configuration file [3]: /var/ld/ld.config
  Default Library Path (ELF):   /usr/lib  (system default)
  Trusted Directories (ELF):    /usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/local/ssl/lib/

Command line:
  crle -c /var/ld/ld.config -s /usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/local/ssl/lib/

But that hasn't fixed this one.  My gcc was obtained as binary -- I'm
thinking of bootstrapping a gcc -- I wonder if that would help in some
way.

BTW -- how did you get this output??

Thanks again.

Don Hayward			[email-masked]

---

From: Mark Crispin <[email-masked]>
Date: Tue, 3 Feb 2004 13:30:02 -0800 (Pacific Standard Time)

On Tue, 3 Feb 2004, Don Hayward wrote:
> of getting the loader to find them

The file in question is a shared library, and apparently /usr/local/lib is
not in the path that shared libraries are loaded from.  I doubt that the
necessary configuration setting is in ld.

> BTW -- how did you get this output??

telnet postoffi.mote.or imap

-- Mark --

---

From: Don Hayward <[email-masked]>
Date: Tue, 3 Feb 2004 17:04:41 -0500 (EST)

Hey Mark -- I messed with crle somemore:

 crle

Configuration file [3]: /var/ld/ld.config
  Default Library Path (ELF):   /usr/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/local/ssl/lib
  Trusted Directories (ELF):    /usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/local/ssl/lib

Command line:
  crle -c /var/ld/ld.config -l /usr/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/local/ssl/lib -s /usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/local/ssl/lib

and imap is working -- perl-cclient is still broken -- but that's for
tommorow.  Thanks again for your input.

Don

Don Hayward			[email-masked]