Re: [exim] Migrating Exim from Mac OS X to Linux (Ubuntu)

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Todd Lyons
Datum:  
To: Chris Bunch
CC: exim-users
Betreff: Re: [exim] Migrating Exim from Mac OS X to Linux (Ubuntu)
In your Local/Makefile:

LOOKUP_MYSQL=yes
LOOKUP_INCLUDE+=-I /usr/include/mysql
LOOKUP_LIBS+=-L/usr/lib/mysql -lmysqlclient

That will likely get your compiler linking the correct libs and
looking where it needs to find those libs.

...Todd


On Thu, Aug 14, 2014 at 10:19 PM, Chris Bunch <chris.bunch@???> wrote:
> On Wed, Aug 13, 2014 at 2:13 PM, Chris Bunch <chris.bunch@???> wrote:
>> If anyone has experience of compiling & installing Exim on Linux your insights would be invaluable.
>>
>> I have been running Exim (and other servers) on Mac OS X for many years but am now having to migrate them to a cloud system on Linode. I have always compiled from source on Mac OS X rather than using packages (there weren't any back then, and it 'just worked'). I can see that the issue on Linux is going to be where the various libraries are (or aren't), for example (from 'make'):
>>
>> In file included from exim.h:490:0,
>>                 from exim_dbmbuild.c:31:
>> dbstuff.h:371:18: fatal error: gdbm.h: No such file or directory

>>
>> Yes there are Exim packages available which will install in a breeze but, you know, I prefer to understand what I am installing and where. Any advice or pointers to relevant docs would be appreciated.
>
> Thanks to all of you who have responded very helpfully. The db issue was solved by apt-get install libdb5.1-dev
>
> I am nearly there now and can compile successfully, but for mysql support:
>
> lookups/lookups.a(mysql.o): In function `mysql_tidy':
> mysql.c:(.text+0x146): undefined reference to `mysql_close'
> lookups/lookups.a(mysql.o): In function `perform_mysql_search':
> mysql.c:(.text+0x397): undefined reference to `mysql_init'
> ...
> mysql.c:(.text+0x70b): undefined reference to `mysql_free_result'
> lookups/lookups.a(mysql.o): In function `mysql_version_report':
> mysql.c:(.text+0x716): undefined reference to `mysql_get_client_info'
> collect2: ld returned 1 exit status
> make[1]: *** [exim] Error 1
> make[1]: Leaving directory `/home/cb/source/exim-4.84/build-Linux-x86_64'
> make: *** [all] Error 2
>
> The Linode distro is Ubuntu 12.04 LTS. I have libmysqlclient-dev installed, and mysql-server. I suspect my Makefile is not quite right: I am finding the syntax around EXTRALIBS & INCLUDE rather opaque but I expect I'll get there.
>
> Yes I could (and may well) just go with 'sudo apt-get build-dep exim4'. That sounds a good plan but maybe I'd learn less that way (and would it deal with mysql?). I may also venture into IRC.
>
> Thanks again
>
> Chris
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/




--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine