[Kolab-devel] Compiling Kolab2 V2.3 Alpha on Solaris 10 Sparc
ComCept Soliva
soliva at comcept.ch
Fri Jan 14 12:54:00 CET 2011
Hi
I compiled Kolab2 V2.3 Alpha successful on Solaris 10 Sparc. There was some
issues I had to solve. Below the way it works regarding compilation. Hope it
helps....
== Kompilieren V2.3 (Alpha) ==
# mkdir /opt/kolab
# ln -s /opt/kolab/ /kolab
Compile wget source to get the Kolab2 source from mirror server:
http://wget.sunsite.dk/ oder ftp://ftp.gnu.org/pub/gnu/wget/
# mkdir /root/wget
# cp wget-1.10.1.tar.gz /root/wget
# cd /root/wget
# gzip -dc wget-1.10.1.tar.gz | tar xvf -
# cd /root/wget/wget-1.10.1
# ./configure \
--prefix=/opt/wget-1.10.1 \
--exec-prefix=/opt/wget-1.10.1
# make
# make install
Create the tmp dir fort he Kolab2 source:
# mkdir /kolabtmp
# cd /kolabtmp
# /opt/wget-1.10.1/bin/wget -r -l1 -nd --no-parent
http://ftp.gwdg.de/pub/linux/kolab/server/alpha/kolab-server-2.3-alpha/sourc
es/
# chmod -R 777 /kolabtmp
# cd /kolabtmp
For detailed information about the release notes use following link:
http://ftp.gwdg.de/pub/linux/kolab/server/alpha/kolab-server-2.3-alpha/sourc
es/release-notes.txt
To compile successful "SUNWdoc" is needed. Because we are compiling in a
"whole" root zone we have to install the "SUNWdoc" package in the Global
Zone.
To successful install the package following user and group must exist in
/etc/passwd and /etc/group:
'''add within /etc/passwd following:'''
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
'''add within /etc/group following:'''
lp::8:root,adm
'''add within /etc/shadow following:'''
lp:*LK*NP:14196::::::
Now the package SUNWdoc can be installed within global zone:
# pkgadd -d ./ SUNWdoc
'''ACHTUNG''': Error erscheinen betreffend font diese könnnen jedoch
ignoriert werden!
Check if the "soelim" binary is now available which is needed to successful
compile the Kolab2 source:
# which soelim
/usr/bin/soelim
To compile successful GNU "grep" is needed. This can be downloaded as
package from sunfreeware. Use a link to /usr/bin to provide GNU "grep" to
the system because the compile process does not look to /usr/local/bin fort
the grep binary:
# mv /usr/bin/grep /usr/bin/grep.orig
# ln -s /usr/local/bin/grep /usr/bin/grep
Check the config regarding the link:
# ls -la /usr/bin/grep
lrwxrwxrwx 1 root root 19 Jul 3 12:51 /usr/bin/grep
-> /usr/local/bin/grep
'''NOTE''' After successful compilation reverse tot he old
constellation and provide the system the official "grep" from Solaris 10!
Addtional within the "whole" root Zone we use to compile the the Sun Package
"SUNWTcl" (CD SOL_10_1106_SPAR_A) is needed:
# pkgadd -d ./ SUNWTcl
Also here provide the binary "tclsh" with a link to /usr/bin:
# ln -s /usr/sfw/bin/tclsh8.3 /usr/bin/tclsh
Start the compilation:
# nohup sh -x install-kolab.sh 2>&1 | tee kolab-install.log &
# tail -f /kolabtmp/kolab-install-.log
'''NOTE'''<br/>
If something goes wrong with the compilation and to beginn not every time
from scratch manipulet the WORKDIR to "install" script from Kolab2. This
WORKDIR changes every time the "install" script is started. From this point
of view check every time the "install" script is again used what WORKDIR has
to be defined:
# vi /kolabtmp/install-kolab.sh
-------------------- /kolabtmp/install-kolab.sh --------------------
#mktmpdir() {
# newtmp="${TMPDIR-/tmp}/install-kolab.$RANDOM.$RANDOM.$RANDOM.$$"
# (umask 022 && mkdir "$newtmp") || {
# echo "Could not create temporary directory! Exiting." 1>&2
# exit 1
# }
# echo "$newtmp"
#}
SRCDIR=`pwd`
#WORKDIR=`mktmpdir`
WORKDIR="/kolab/RPM/PKG....[Random Number"
echo "Changing to temporary working directory $WORKDIR ..."
cd "$WORKDIR"
populate_workdir
-------------------- /kolabtmp/install-kolab.sh --------------------
-------------------- output install-kolab.sh --------------------
........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for db4 major version... configure: error: Header contains
different version
error: Bad exit status from /kolab/RPM/TMP/rpm-tmp.24486 (%build)
RPM build errors:
Bad exit status from /kolab/RPM/TMP/rpm-tmp.24486 (%build)
+ exit 1
-------------------- output install-kolab.sh --------------------
DB4 for "apache-php" can not be successful compiled. Within the spec file of
the rpm source change the variable--disabled-shared to:
--enabled-shared=yes wechseln
# /kolab/bin/openpkg rpm -iv
/kolabtmp/db-4.5.20.2-20070628_kolab1.src.rpm
db-4.5.20.2-20070628_kolab1
# vi /kolab/RPM/SRC/db/db.spec
-------------------- /kolab/RPM/SRC/db/db.spec --------------------
# package options
%option with_compat no
%option with_cxx no
%endif
--disable-java \
--with-mutex="$mutex" \
--enable-shared=yes
-------------------- /kolab/RPM/SRC/db/db.spec --------------------
To compile successful within OpenPKG env. Load the env for OpenPKG (opa
/kolab):
# vi /root/.kshrc
--------------- /root/.kshrc ---------------
# Loads KOLAB environment:
# Execute "opa /kolab" before doing any maintainance
# or configuration work on Kolab!
export LANG=C
opa () {
root="$1"
if [ ! -d $root ]; then
echo "opa:ERROR: OpenPKG root directory $root not found"
exit 1
fi
if [ ! -f "$root/etc/rc" ]; then
echo "opa:ERROR: root directory does not contain OpenPKG
hierarchy"
exit 1
fi
eval `$root/etc/rc --eval all env`
}
--------------- /root/.kshrc ---------------
# opa /kolab
# /kolab/bin/openpkg rpmbuild -bb /kolab/RPM/SRC/db/db.spec
--------------- /kolab/bin/openpkg rpmbuild -bb
/kolab/RPM/SRC/db/db.spec ---------------
+ cd /kolab/RPM/TMP
+ cd db-4.5.20
+ mutex=no
+ case "sparc64-solaris10" in
+ mutex=Sparc/gcc-assembly
+ cd build_unix
+ CC=/kolab/bin/cc
+ CFLAGS='-O2 -pipe'
+ GREP=grep
+ ../dist/configure --prefix=/kolab --disable-compat185
--disable-cxx --disable-java --with-mutex=Sparc/gcc-assembly
--enable-shared=yes
........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
--------------- /kolab/bin/openpkg rpmbuild -bb
/kolab/RPM/SRC/db/db.spec ---------------
# /kolab/bin/openpkg rpm --force -Uvh
/kolab/RPM/PKG/db-4.5.20.2-20070628_kolab1.sparc64-solaris10-kolab.rpm
# ls -la /kolab/include/db*
-r--r--r-- 1 kolab 102110 Jan 13 18:21 /kolab/include/db.h
# ls -la /kolab/lib/libdb*
-rw-r--r-- 1 kolab 797 Jan 13 18:26
/kolab/lib/libdb-4.5.la
-rwxr-xr-x 1 kolab 1099813 Jan 13 18:26
/kolab/lib/libdb-4.5.so
lrwxrwxrwx 1 kolab 12 Jan 13 18:27 /kolab/lib/libdb-4.so
-> libdb-4.5.so
-rw-r--r-- 1 kolab 1451450 Jan 13 18:26 /kolab/lib/libdb.a
lrwxrwxrwx 1 kolab 12 Jan 13 18:27 /kolab/lib/libdb.so ->
libdb-4.5.so
Logout and login again to unload the Kolab2 env. Do not forgett to check
within /kolab/RPM/ the current WORKDIR (/kolab/RPM/PKG....[Random Number] to
change this within the "install" script otherwise the compilation would
start from scratch again and will also stop again at same error regarding
DB4. Start the "install" script again.
# nohup sh -x install-kolab.sh 2>&1 | tee kolab-install.log &
Now the compilation should successful.
Kind regards
Andrea Soliva
Mail: soliva at comcept.ch
More information about the devel
mailing list