Szerző: Phil Pennock Dátum: Címzett: David Saez Padros CC: EXIM mailing list Tárgy: Re: [exim] dlopen problems
On 2013-01-31 at 19:01 +0100, David Saez Padros wrote: > i've been using a dlopen extension for long time, but now i one
> server i get the following error:
>
> failed to expand ACL string
> "${dlfunc{/usr/local/exim/exim-ext.so}{ip2country}{$sender_host_address}}":
> dlopen "/usr/local/exim/exim-ext.so" failed:
> /usr/local/exim/exim-ext.so: undefined symbol: message_id
>
> it works on a similar server with same exim & gcc version (exim
> is 4.80.1 self compiled), looks like local_scan variables are not
> visible to the extension, nut why ? anyone had the same problem
> or has a solution for this ?
Per src/EDITME (which should be your template for Local/Makefile):
----------------------------8< cut here >8------------------------------
# Support for dynamically-loaded string expansion functions via ${dlfunc. If
# you are using gcc the dynamically-loaded object must be compiled with the
# -shared option, and you will need to add -export-dynamic to EXTRALIBS so
# that the local_scan API is made available by the linker. You may also need
# to add -ldl to EXTRALIBS so that dlopen() is available to Exim.
# EXPAND_DLFUNC=yes
----------------------------8< cut here >8------------------------------
I'm guessing that EXTRALIBS did not gain -export-dynamic on that box.
Consider checking your build configs into revision control and working
towards repeatable builds, with checksums, for deployment onto hosts.