Unable to Compile

General
2004-09-27
2013-04-23
  • Theo Bresler
    Theo Bresler
    2004-09-27

    I must be stupid but I am unable to compile dk-milter 0.2.2 on redhat 9.  I get the following error , can anybody help?

    cc -o dk-filter -lpthread  dk-filter.o util.o      -lmilter  /tmp/dk-milter-0.2.2/obj.Linux.2.4.20-19.9.i686/libsm/libsm.a /tmp/dk-milter-0.2.2/obj.Linux.2.4.20-19.9.i686/libdk/libdk.a  -ldb -lresolv -lcrypt -lnsl -ldl -lssl -lcrypto
    dk-filter.o(.text+0x1415): In function `mlfi_eom':
    : undefined reference to `smfi_insheader'
    dk-filter.o(.text+0x14df): In function `mlfi_eom':
    : undefined reference to `smfi_insheader'
    dk-filter.o(.text+0x17d3): In function `mlfi_eom':
    : undefined reference to `smfi_insheader'
    dk-filter.o(.text+0x2362): In function `main':
    : undefined reference to `smfi_opensocket'
    collect2: ld returned 1 exit status
    make[1]: *** [dk-filter] Error 1
    make[1]: Leaving directory `/tmp/dk-milter-0.2.2/obj.Linux.2.4.20-19.9.i686/dk-filter'
    make: *** [all] Error 2

     
    • You need to also link against libmilter, whose source code is in the open source Sendmail MTA package.  That libmilter needs to be taken from version 8.13.x of sendmail, or from 8.12.x of sendmail with certain compiler flags enabled.