Re: [exim] Compiling Exim 4.94 with SPF on Ubuntu

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Chris Bunch
Ημερομηνία:  
Προς: Andrew C Aitchison, exim-users
Αντικείμενο: Re: [exim] Compiling Exim 4.94 with SPF on Ubuntu


> On 9 Oct 2020, at 15:24, Andrew C Aitchison <andrew@???> wrote:
>
> On Fri, 9 Oct 2020, Chris Bunch wrote:
>
>>> On 9 Oct 2020, at 13:43, Andrew C Aitchison <andrew@???> wrote:
>>>
>>> On Fri, 9 Oct 2020, Chris Bunch via Exim-users wrote:
>>>
>>>> I am attempting to add SPF to an Ubuntu 18.04 Exim installation (compiled from source, not the Ubuntu package), but Exim compilation fails:
>>>>
>>>>     cc -DMACRO_PREDEF macro_predef.c
>>>>     In file included from exim.h:494:0,
>>>>               from macro_predef.c:12:
>>>>     spf.h:17:10: fatal error: spf2/spf.h: No such file or directory
>>>>      #include <spf2/spf.h>
>>>>        ^~~~~~~~~~~~
>>>>     compilation terminated.

>>>>
>>>> I have this in Local/Makefile:
>>>>
>>>>     SUPPORT_SPF=yes
>>>>     CFLAGS += -I/usr/include
>>>>     LDFLAGS += -l/usr/lib/spf2

>>>>
>>>> Ubuntu has libspf2 installed (in /usr/lib) but this does not include spf.h
>>>
>>> Do you have the development package
>>>      libspf2-dev
>>> as well as
>>>      libspf2-2
>>> ?

>
>> Thank you: no I didn’t. Installed now and that sorted the spf.h issue. However, make is now failing with:
>>
>>     /usr/bin/ld: cannot find -l/usr/lib/libspf2

>>
>> In /usr/lib I had:
>>
>>     -rw-r--r-- 1 root root 219100 Jul 26 2017 spf2.a
>>     lrwxrwxrwx 1 root root     16 Jul 26 2017 spf2.so -> libspf2.so.2.1.0
>>     lrwxrwxrwx 1 root root     16 Jul 26 2017 spf2.so.2 -> libspf2.so.2.1.0
>>     -rw-r--r-- 1 root root 117488 Jul 26 2017 spf2.so.2.1.0

>>
>> but changing to LDFLAGS += -l/usr/lib/libspf2 in Makefile did not fix it.
>
> Does
>     LDFLAGS += -L /usr/lib/libspf2
> (capital L) help ?
> Though you shouldn't need that line at all now,
> since the librariess are in /usr/lib

>
> -- 
> Andrew C. Aitchison                    Kendal, UK
>             andrew@???


Thanks again. Yes capital L allows spf.c to go through (as does commenting that line out) but it now fails at cc exim.c:
    ...
    cc spf.c
    cc srs.c
    cc utf8.c
    cc version.c
    cc -o exim
    //usr/bin/ld: spf.o: undefined reference to symbol 'SPF_server_set_rec_dom'
    //usr/lib/libspf2.so.2: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status


It’s not clear to me if this is an EXIM config issue or an error in spf2.so.2 (libspf2.so.2.1.0)

Chris