Building Courier-Authlib 0.65.0 on CentOS 5

Today I wanted to upgrade Courier-Authlib from 0.63.0 and read this in the ChangeLog:

2010-03-06 Sam Varshavchik

* Remove the bundled libtdl library. Require the system-installed
libltdl library.

As expected, this gave me some problems with my old CentOS 5.9 release:

/bin/sh ./libtool –tag=CC –mode=link gcc -g -O2 -Wall -I.. -I./.. -export-dynamic -dlopen -dlopen -dlopen -dlopen -dlopen -o authdaemondprog authdaemond.o libltdl/ liblock/ libhmac/ md5/ sha1/ rfc822/ numlib/ -ldl
libtool: link: cannot find the library `libltdl/’ or unhandled argument `libltdl/’
make[2]: *** [authdaemondprog] Error 1
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.65.0′
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/courier-authlib-0.65.0′
make: *** [all] Error 2

I fixed this by adding this line to my build script (after configure):
sed -i -e 's/^LIBLTDL = ${top_build_prefix}libltdl\/ = -lltdl/' Makefile

Update, February 15th 2013: Today I found out that in a freshly installed VMware machine with CentOS 5.9, ltdl was missing. So I needed to add the following in my pre-build script as well:
rpm -q libtool-ltdl >/dev/null
if [ $? != 0 ]; then yum -q -y install libtool-ltdl; fi
rpm -q libtool-ltdl-devel >/dev/null
if [ $? != 0 ]; then yum -q -y install libtool-ltdl-devel; fi

Update, December 7th 2015: I wanted to build 0.66.4 today, and the problem reappeared. Luckily, I found this posting which saved me some time. Updated ‘sed’ command:
sed -i -e 's/^LIBLTDL = $(top_build_prefix)libltdl\/ = -lltdl/' Makefile

5 thoughts on “Building Courier-Authlib 0.65.0 on CentOS 5

  1. Hello Laursen,

    I have some broblem the same with you. I a new member of Linux. But i don’t know what file you edit. there are a lot of file. Could you tell me the name of file correctly. Thanks

  2. Hi,

    The ‘sed’ command is part of my build script, and fixes the problem in the generated Makefile. You can just run the command manually immediately after running configure.

    Best regards,
    Jacob Laursen

  3. Hi,
    Thank you very much, I complie Courier-Authlib successfully but courier-imap can not. When i complie this appear at the end.
    make[2]: Leaving directory `/tmp/courier-imap-4.15/libs/imap’
    make[1]: Leaving directory `/tmp/courier-imap-4.15/libs/imap’
    make[1]: Entering directory `/tmp/courier-imap-4.15′
    make[1]: Nothing to be done for `check-am’.
    make[1]: Leaving directory `/tmp/courier-imap-4.15′
    I don’t know it success or unsuccess.

    Thanks & Kindly Regards,

Leave a Reply