Compiling core from source Ubuntu 16.04



  • Hi together.

    I am still running a 7.1 Zarafa installation for my own mails only. I want to upgrade of course.
    So I started playing around with some versions and options.

    I am a professional java developer and not that strong on compiling and installing those linux dependencies.
    So reading https://github.com/Kopano-dev/kopano-core/blob/master/doc/install.txt result in question marks regarding those optional components and if I need them on my ubuntu 64 bit version (and which actual package must be installed)

    So my question is:
    Can someone simply copy paste the commands here to be able to build the core?
    Lets assume I start with a fresh ubuntu 16.04 64 bit virtual machine and I have checkout the source from git.
    I think the steps are like this…

    sudo apt-get install google-perftools aptitude autoconf automake bison ..... ??? (list of dependencies for example g++-5? or which version)
    # to compile:
    autoconf
    ./configure --whatever [what is needed here?]
    make
    make install
    

    any suggestions for a quick success?
    (and no… the downloadable packages are nice but as a developer I want to be able to build it myself… otherwise future contribution is quiet hard :-) )

    Greets Markus


  • Kopano



  • @fbartels
    Which just notes:

    ./configure --enable-epoll \
                --enable-unicode \
                --enable-python \
                --enable-swig \
                --enable-tcmalloc \
                --disable-static \
                --disable-testtools \
                --with-userscript-prefix=/etc/kopano/userscripts \
                --with-quotatemplate-prefix=/etc/kopano/quotamail
    make
    make install
    

    and does not answer the ubuntu 16.04 required (optional) libraries which should be used as well as does not state anything about the options mentioned in the install.txt like:

    –enable-epoll: use epoll(2) instead of poll(2) on Linux
    –with-asan: shorthand for enabling Address Sanitizer
    –with-ubsan: shorthand for enabling UB Sanitizer
    –with-distro={rhel|suse|sles}
    –enable-debug: adds -DDEBUG to set some very unusual debug values.
    This does not enable CXXFLAGS=-ggdb3 which is separate!
    –enable-release: adds -O2 -fno-strict-aliasing and disables asserts.

    It also does not advice me what actual dependencies I should install on that system.
    So what is actually a “perfect” starting configuration I can play with. :-)



  • So I am a bit further.

    • I checked out the 8.4 branch and checked the dependencies document
    • I checked the libraries and versions via ldconfig -v | grep <libname>
    • I installed and/or checked the installed versions
      This installed the missing once
      sudo apt-get install g++ binutils pkg-config gsoap openssl swig2.0 zlibc google-perftools

    But when I start autoconf the result is:

    mclu@ubuntu:~/compile/kopanocore$ autoconf
    configure.ac:8: error: possibly undefined macro: AM_INIT_AUTOMAKE
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    configure.ac:12: error: possibly undefined macro: AC_SUBST
    configure.ac:15: error: possibly undefined macro: AC_DISABLE_STATIC
    configure.ac:16: error: possibly undefined macro: AC_PROG_LIBTOOL
    configure.ac:18: error: possibly undefined macro: AM_PROG_CC_C_O
    configure.ac:96: error: possibly undefined macro: AC_MSG_RESULT
    configure.ac:137: error: possibly undefined macro: AC_MSG_ERROR
    configure.ac:290: error: possibly undefined macro: AM_CONDITIONAL
    configure.ac:520: error: possibly undefined macro: AC_CHECK_LIB
    configure.ac:705: error: possibly undefined macro: AM_PATH_PYTHON
    

    What I do wrong?



  • Sounds like you didn’t run aclocal, before.



  • Don’t overthink it:

    autoreconf -fi
    ./configure [--prefix=/home/self or some other place]
    


  • Thx to all the hints…
    After aclocal and some other package installations i was able to compile the source of 8.4.
    I used the commands below.
    Remarks and Questions:

    • There is a warning maybe I am missing some dependencies?
      configure: WARNING: unrecognized options: --enable-swig, --enable-tcmalloc, --disable-testtools
    • my compile system and the test machine are 2 different virtual machines. How can I make those *.deb packages after the “make” ?

    Sorry for my stupid questions… everything is quiet new here :-)

    # steps to compile:
    sudo apt-get install autoconf aptitude libtool php-dev g++ binutils pkg-config gsoap openssl swig2.0 zlibc  google-perftools
    sudo apt-get install debhelper libical-dev libicu-dev libldap2-dev libmysqlclient-dev libncurses5-dev libncursesw5-dev libssl-dev libxml2-dev  uuid-dev  zlib1g-dev python-dev
    
    aclocal
    autoconf
    ./configure --enable-epoll --enable-release --enable-unicode  --enable-python --enable-swig --enable-tcmalloc --disable-static --disable-testtools --with-userscript-prefix=/etc/kopano/userscripts  --with-quotatemplate-prefix=/etc/kopano/quotamail
    #failed with an error that install.sh is not there 
     autoreconf -i
    # now next call works
     ./configure --enable-epoll --enable-release --enable-unicode  --enable-python --enable-swig --enable-tcmalloc --disable-static --disable-testtools --with-userscript-prefix=/etc/kopano/userscripts  --with-quotatemplate-prefix=/etc/kopano/quotamail
    
    # if I add  --with-asan --with-ubsan  the build failed  
    
    


  • @mclu said:

    configure: WARNING: unrecognized options:  --enable-swig, --enable-tcmalloc, --disable-testtools
    

    You don’t need that.

    ./configure
    make --enable-release
    make install 
    
    • Builds everything incl. php-mapi with default options and for your default php-setup.
    • Installs kopano-core to alternate locations:
      /usr/local/...
      Thus, adjustments to config files might be required.

    Read configure.ac for details on configure-options.

    Good luck!
    ++umgfoin.


Log in to reply