Re: [exim] Building Exim in a VServer

Góra strony
Delete this message
Reply to this message
Autor: Christian Recktenwald
Data:  
Dla: Marcin Krol
CC: exim-users
Temat: Re: [exim] Building Exim in a VServer
Hi Marcin,

On Fri, Dec 21, 2007 at 02:19:13PM +0100, Marcin Krol wrote:
> Hello everyone,
>
> Has anyone done that thing? (i.e. building Exim in a
> http://linux-vserver.org )


I tried to reproduce your problem.
Here is what I did:

Host OS: Debian Sarge i386 w/ custom kernel 2.4.30, VServer Patch 1.2.10
Guest OS: Debian Etch i386
CPU: Core2Duo E6320

The Guest OS was installed that way:

    cd /tmp
    wget
    http://ftp.de.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.6_all.deb
    ar xv debootstrap_1.0.6_all.deb
    tar xvfz data.tar.gz -C /
    TARGETDIR=/var/lib/vservers/v39.citecs.de
    mkdir $TARGETDIR
    lvcreate -L400 -nlv17vs-v39 servvg
    mkfs -t ext3 -E resize=80000000 /dev/servvg/lv17vs-v39
    mount /dev/servvg/lv17vs-v39 $TARGETDIR
    debootstrap etch $TARGETDIR


    vserver v39.citecs.de start


compilation effords:

    vserver v39.citecs.de enter


    apt-get install gcc ftp make libc6-dev
    The following NEW packages will be installed:
      binutils cpp cpp-4.1 gcc gcc-4.1 libssp0 ftp make libc6-dev
      linux-kernel-headers


    apt-get install perl perl-modules libdb3-dev libssl-dev libperl-dev
    The following NEW packages will be installed:
      perl perl-modules libdb3-dev libdb3 libssl-dev zlib1g-dev
      libperl-dev libperl5.8


    cd /tmp
    wget ftp.exim.org/pub/exim/exim4/exim-4.69.tar.gz
    tar -xvzf exim-4.69.tar.gz
    cd /tmp/exim-4.69/Local
    wget http://www.directadmin.com/Makefile
    perl -pi -e 's/^EXTRALIBS/#EXTRALIBS/' Makefile


    /tmp/exim-4.69/Local# cat >> Makefile << EOF
    HAVE_ICONV=yes
    CFLAGS=-O
    EXTRALIBS_EXIM=-liconv -export-dynamic -ldl
    EXPAND_DLFUNC=yes
    EOF


    perl -pi -e "s/#define PROCESS_INFO_SIZE +256/#define PROCESS_INFO_SIZE 2048/g" /tmp/exim-4.69/src/macros.h


    cd /tmp/exim-4.69
    make


-> runs and compiles until it misses libiconv, I stopped here

Some questions:

> ---------------->script<------------------
> #!/bin/bash -x
>
>
> mkdir /usr/sbin/bak
> cp -p /usr/sbin/exim /usr/sbin/bak/exim_stary.bak
> cd /usr/sbin
> mv exi* /tmp
>
> cd /usr/local
> rm -rf exim-* dlfunc
> chmod 755 /usr/bin/wget
> wget ftp://ftp.easynet.be/exim/exim/exim4/exim-4.68.tar.gz
>
> cp -v /etc/exim.conf /root/exim-`date '+m%m_d%d-%H_%M'`.save.conf
>
> tar xvzf exim-4.68.tar.gz
> cd /usr/local/exim-4.68/Local
> wget http://www.directadmin.com/Makefile
> perl -pi -e 's/^EXTRALIBS/#EXTRALIBS/' /usr/local/exim-4.68/Local/Makefile
> ldconfig


I can't imagine what 'ldconfig' would help here.

> cat >> /usr/local/exim-4.68/Local/Makefile << EOF
>
> HAVE_ICONV=yes
> CFLAGS=-O -I/usr/local/include -I/usr/local/exim-4.68/build-Linux-i386 -I/usr/local/exim-4.68/src


no need to use "-I/usr/local/exim-4.68/build-Linux-i386 -I/usr/local/exim-4.68/src"
( dropped -I/usr/local/include also because there was nothing to include on
the test setup)

> EXTRALIBS_EXIM=-L/usr/local/lib -liconv -export-dynamic -ldl


( dropped -L/usr/local/lib also because there was nothing to link
against on the test setup)

> EXPAND_DLFUNC=yes
>
> EOF
>
> perl -pi -e "s/#define PROCESS_INFO_SIZE +256/#define PROCESS_INFO_SIZE
> 2048/g" /usr/local/exim-4.68/src/macros.h
>
> cd /usr/lib
> ln -s libperl.so.5.8.8 libperl.so


sure you need that? I didn't.

> cd /usr/local/exim-4.68
> make


...

Next thing I would try is running "strace -o /tmp/trc -f make"
instead of just "make" and inspect the output in /tmp/trc
for failure, esp. failed "mkdir" and "execve" system calls.

HTH, Chris

-- 
Christian Recktenwald      : voice +49 711 601 2091  : Boeblinger Strasse 189
exim-users-dist@???  : fax   +49 711 601 2092  : D-70199 Stuttgart