Subject: Re: weird problems on sparc with loading cyrus-imapd21 IMAP extension for cyradm perl script
To: Stoned Elipot <>
From: Greg A. Woods <>
List: tech-pkg
Date: 10/02/2003 15:17:34
[ On Thursday, October 2, 2003 at 16:50:08 (+0200), Stoned Elipot wrote: ]
> Subject: Re: weird problems on sparc with loading cyrus-imapd21 IMAP extension for cyradm perl script
> On Wed, Oct 01, 2003 at 04:10:48PM -0400, Greg A. Woods wrote:
> > If this could be the issue then the problem may be with my libsasl2
> > libraries since at the moment I have only libsasl2.a.  However on i386
> > where "cyradm" works I also have only the static-only libsasl2.a and it
> > was most definitely not compiled with '-fPIC'.  Is '-fPIC' not
> > universally necessary on i386 for all objects in loadable modules?
> I believe so.

Hmmm... then why does it work?  :-)

And why does the dynamic loader on sparc produce such a content free
(and/or misleading) error message when it doesn't work?

> Why don't you have a shared libsasl2.a? Is that on
> purpose ?

As you may know I've got a hate-on for all things dynamic.  :-)

Now of course I'm willing to bend to accomodate certain things where
dynamic loading is the easier approach, and perl interpreter extensions
are examples such places (besides Makefile.aperl support is currently
quite broken on NetBSD, at least for pkgsrc modules, not to mention that
cyradm itself would need a minor bit more hacking to use the custom perl
interpreter containing the IMAP extensions).

Normally though I would build a full compliment of static and shared
libraries for packages which supply libraries so long as I don't end up
with PIC code in the static libraries.  So, I've been trying to fix
various packages to build non-PIC lib*.a files proper lib*.so files,
along with possibly lib*_pic.a files where those could also be useful
(and this is one such case).  That horrid wretched mess of a thing
called libtool does get in the way though.

So, at the momemnt I've only built a static-linked saslauthd and the
necessary hacking of the the cyrus-sasl2 package to make it also build
shared libraries at the same time has been very low on my priority list.
Maybe I should create a set of patches that convert cyrus-sasl2 to use
the native BSD *.mk files (without libtool) and then I wouldn't have to
do anything special to get it all to work the way I want.  :-)

In the mean time I have a working "cyradm" on i386 and lots more
important things to do!  ;-)

						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>