Re: [exim] build exim static

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Paul Dekkers
Data:  
Para: Patrice
CC: exim-users
Assunto: Re: [exim] build exim static
Hi,

Patrice wrote:
> Thank you Paul for you answer !
>
> I just compiled my binary with -static , but when I try to execute it is
> says : no such file or directory
> the file is 755
>
> is there a way to show which libraries are included into my static binary ?


Yes, ldd:

>ldd ./exim

ldd: exim: not a dynamic executable

If your binary is staticly linked you will find your output is as above,
otherwise you will get a list of libaries it is linked against.

I suggest you run exim with debug options to see what goes wrong. And/or
make sure that you actually start the binary; your output looks
suspcious enough to come from some kind of shell, not exim itself.

Mind you that if you DO want exim in a chroot, compiling the binary
static is not enough. You will have to create path's, populate some
files in the chroot's etc and so forth.
But I think chroot-ing exim was not what you are trying to do, but just
to be sure...

Regards,
Paul

> Patrice
>
> Paul Dekkers wrote:
>
>> Hi,
>>
>> Patrice wrote:
>>
>>> is it possible to compil the exim binary in static ? (without using
>>> .so files)
>>> and if possible is it a good choice or not ?
>>
>>
>> I used:
>> LDFLAGS=-static
>> ... in the Makefile. Don't know if this is the best place to put it,
>> but it worked ;-)
>>
>> I used this to run exim in a FreeBSD jail (but you could use this with
>> chroot too of course).
>>
>> Paul
>>
>
>