Re: Building Cyrus SASL on Mac OS X El Capitan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Thanks to a private note that ended up with me looking at what Apple does (all their open source software can be found at, I was able to quickly find a solution that involves patching the libtool script built by configure. After that, I seem to have a good build and a rebuild of Postfix linked to it works as expected.

After ./configure, patch libtool as follows:
--- libtool	2015-12-23 21:45:07.000000000 -0600
+++ libtool.patched	2015-12-23 21:47:23.000000000 -0600
@@ -175,7 +175,7 @@
 # Commands used to build and install a shared archive.
-archive_cmds="\$CC \$(test x\$module = xyes && echo -bundle || echo -dynamiclib) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$linkopts -install_name \$rpath/\$soname \$(test -n \\\"\$verstring\\\" -a x\$verstring != x0.0 && echo \$verstring)"
+archive_cmds="\$CC \$(test x\$module = xyes && echo -bundle || echo -dynamiclib) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$linkopts \$(test x\$module != xyes && echo -install_name \$rpath/\$soname \$tmp_verstring)"

Then make and make install.

Also, for the second question below regarding install_name pointing at /usr/lib, that was taken care of by specifying --with-plugindir=/usr/local/lib/sasl2 and --with-configdir=/usr/local/lib/sasl2 on ./configure. I think (unless I missed something) that (along with the defaults) keeps everything in /usr/local/lib and /usr/local/include so it does not conflict with or overwrite what Apple has provided in /usr/lib and /usr/include.

Larry Stone

> On Dec 23, 2015, at 2:33 PM, Larry Stone via Cyrus-sasl <cyrus-sasl@xxxxxxxxxxxxxxxxxxxx> wrote:
> I'm new to trying to build my own Cyrus SASL having relied on what Apple provides with OS X. But as Apple seems to want to provide less and less, I've been trying to move all the server stuff I run on my Macintosh to self-built from source. Cyrus SASL is the last piece and I am having no success (I build Postfix with Cyrus SASL for outgoing SASL authentication).
> Cyrus-SAL version: 2.1.25 (have tried others with same result)
> OS X Version: El Capitan 10.11.2 (had same issue with Yosemite (10.10.x))
> OpenSSL version: 1.0.2e (built from source)
> Configure command: ./configure --with-openssl=/usr/local/ssl
> Make fails with:
> gcc -bundle -undefined error -o .libs/  sasldb.lo sasldb_init.lo plugin_common.lo -all_load  ../sasldb/.libs/ -L/usr/local/ssl/lib -lresolv -lresolv -lresolv -lresolv -lc -install_name  /usr/lib/sasl2/
> clang: error: invalid argument '-install_name /usr/lib/sasl2/' only allowed with '-dynamiclib'
> make[2]: *** [] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> Searching the archives, there was a thread four years ago
> (<>)
> with what seems to be the same problem on OS X 10.7 but other than someone
> saying it worked fine for them, I saw no resolution.
> Also, why is the install_name specifying /usr/lib when configure, by default, should be putting everything in /usr/local (and I get the same path if I explicitly say --prefix=/usr/local on the configure command). As of El Capitan, Apple's new "rootless" environment prohibits any changes to /usr (other than /usr/local) unless you go through some strongly discouraged steps to turn off that protection.
> Thanks for any help.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

[Index of Archives]     [Info Cyrus]     [Squirrel Mail]     [Linux Media]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux