During setting up a new machine from scratch I noticed various cyrus-sasl compile errors with an AMD64 target. The compile breaks in the sub-directories sasldb, plugins and lib since the -fPIC compile flag is missing and a shared library is built. Correcting that, it the build fails again in directories utils and samples since -lcrypt is not passed to the linker. The following patch solves these errors for me (can also be found under http://agcad.ict.tuwien.ac.at/download/cyrus-sasl-2.1.22-build.patch in case it gets mangled) diff -urpN cyrus-sasl-2.1.22-orig/lib/Makefile.am cyrus-sasl-2.1.22/lib/Makefile.am --- cyrus-sasl-2.1.22-orig/lib/Makefile.am 2006-05-17 16:46:13.000000000 +0000 +++ cyrus-sasl-2.1.22/lib/Makefile.am 2006-10-24 15:20:36.000000000 +0000 @@ -45,6 +45,7 @@ sasl_version = 2:22:0 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb +AM_CFLAGS = -fPIC EXTRA_DIST = windlopen.c staticopen.h NTMakefile EXTRA_LIBRARIES = libsasl2.a noinst_LIBRARIES = @SASL_STATIC_LIBS@ diff -urpN cyrus-sasl-2.1.22-orig/plugins/Makefile.am cyrus-sasl-2.1.22/plugins/Makefile.am --- cyrus-sasl-2.1.22-orig/plugins/Makefile.am 2006-05-17 16:46:16.000000000 +0000 +++ cyrus-sasl-2.1.22/plugins/Makefile.am 2006-10-24 15:19:38.000000000 +0000 @@ -63,6 +63,7 @@ srp_version = 2:22:0 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) +AM_CLFAGS = -fPIC COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@ diff -urpN cyrus-sasl-2.1.22-orig/sasldb/Makefile.am cyrus-sasl-2.1.22/sasldb/Makefile.am --- cyrus-sasl-2.1.22-orig/sasldb/Makefile.am 2006-05-17 16:46:17.000000000 +0000 +++ cyrus-sasl-2.1.22/sasldb/Makefile.am 2006-10-24 15:20:10.000000000 +0000 @@ -48,6 +48,7 @@ INCLUDES=-I$(top_srcdir)/include -I$(top extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c +AM_CFLAGS = -fPIC EXTRA_DIST = NTMakefile noinst_LTLIBRARIES = libsasldb.la diff -urpN cyrus-sasl-2.1.22-orig/utils/Makefile.am cyrus-sasl-2.1.22/utils/Makefile.am --- cyrus-sasl-2.1.22-orig/utils/Makefile.am 2006-05-18 18:34:26.000000000 +0000 +++ cyrus-sasl-2.1.22/utils/Makefile.am 2006-10-24 15:12:39.000000000 +0000 @@ -42,7 +42,7 @@ # ################################################################ -all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET) +all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET) $(LIB_CRYPT) all_sasl_static_libs = ../lib/.libs/libsasl2.a $(SASL_DB_LIB) $(LIB_SOCKET) $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(SASL_KRB_LIB) $(LIB_DES) $(PLAIN_LIBS) $(SRP_LIBS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) sbin_PROGRAMS = @SASL_DB_UTILS@ @SMTPTEST_PROGRAM@ pluginviewer diff -urpN cyrus-sasl-2.1.22-orig/sample/Makefile.am cyrus-sasl-2.1.22/sample/Makefile.am --- cyrus-sasl-2.1.22-orig/sample/Makefile.am 2004-03-10 15:44:55.000000000 +0000 +++ cyrus-sasl-2.1.22/sample/Makefile.am 2006-10-24 16:03:22.000000000 +0000 @@ -54,10 +54,10 @@ sample_server_SOURCES = sample-server.c server_SOURCES = server.c common.c common.h client_SOURCES = client.c common.c common.h -server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) -client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) +server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) +client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) -sample_client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) -sample_server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) +sample_client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) +sample_server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) EXTRA_DIST = NTMakefile
- Please do no unnecessarily restrict bugs. - Please do not inline, attach your patch to bug 152544, please. *** This bug has been marked as a duplicate of 152544 ***