wiki:CentOS5BuildNotes

CentOS 5 Build Notes

Build Prerequisites

Using "yum install" or your favorite package manager, the following packages need to be installed:

  • freetype-devel
  • gcc-c++
  • flex
  • libX11-devel
  • libXft-devel
  • libXext-devel
  • libXpm-devel
  • openssl-devel
  • openldap-devel
  • aspell-devel
  • esound-devel

Build Script

The following script can be used to check out and build Mulberry on CentOS 5.

Create a top-level empty directory to contain the build environment. On my system, I used /home/ken/devel/Mulberry. Place the patches below in this directory and edit the variable in the script to point to this directory.

#!/bin/sh
# Empirically-determined set of commands to build Mulberry from svn
# checkout.
# Run from an empty directory that will be used as the build root

# quit the script if we get an error
set -e

# source of patches
PATCH_DIR=/home/ken/devel/Mulberry

# first check out main trunk
svn co http://svn.mulberrymail.com/mulberry/Mulberry/trunk

# Add svn:externals properties and update
svn propset svn:externals -F ${PATCH_DIR}/svn-externals trunk
svn up trunk

# Apply patches
patch trunk/Makefile-Linux < ${PATCH_DIR}/jxinit-patch.diff
patch trunk/Linux/Make.header < ${PATCH_DIR}/Linux-Make.header-patch.diff

# Add some symlinks to libraries
ln -sf trunk/JX JX
ln -sf trunk/Libraries Libraries
ln -sf trunk/Sources_Common Sources_Common

# Start "official" build
cd trunk
make -f Makefile-Linux jxinit
cd JX
make linux_intel
cd ../Linux
./links.sh
makemake
cd ../Build
make static

Subversion Externals (svn-externals)

The following file supplies a Subversion "externals" property so that a single checkout pulls all required Cyrusoft libraries.

JX      http://svn.mulberrymail.com/mulberry/JX/trunk
Libraries/CICalendar    http://svn.mulberrymail.com/repos/CICalendar/trunk
Libraries/XMLLib        http://svn.mulberrymail.com/repos/XMLLib/trunk

JX Symlink Patch (jxinit-patch.diff)

This patch uses the -f flag when creating symlinks in case they already exist.

Index: trunk/Makefile-Linux
===================================================================
--- trunk/Makefile-Linux	(revision 105)
+++ trunk/Makefile-Linux	(working copy)
@@ -21,18 +21,18 @@
 
 jxinit:
 	(cd ${JX_HOME}/include; \
-	 ln -s ../libjcore/code jcore; \
-	 ln -s ../libjx/code jx; \
-	 ln -s ../libjx/image jximage; \
-	 ln -s ../libjx/strings jxstrings)
+	 ln -sf ../libjcore/code jcore; \
+	 ln -sf ../libjx/code jx; \
+	 ln -sf ../libjx/image jximage; \
+	 ln -sf ../libjx/strings jxstrings)
 	(cd ${JX_HOME}/lib; \
-	 ln -s ../ACE/ACE_wrappers/ace/libACE.a libACE-5_4_7.a; \
-	 ln -s ../ACE/ACE_wrappers/ace/libACE.so libACE-5_4_7.so; \
-	 ln -s ../ACE/ACE_wrappers/ace/libACE.so.5.4.7 libACE.so.5.4.7; \
-	 ln -s ../libjcore/libjcore-2_5_0.a libjcore-2_5_0.a; \
-	 ln -s ../libjcore/libjcore-2_5_0.so libjcore-2_5_0.so; \
-	 ln -s ../libjx/libjx-2_5_0.a libjx-2_5_0.a; \
-	 ln -s ../libjx/libjx-2_5_0.so libjx-2_5_0.so)
+	 ln -sf ../ACE/ACE_wrappers/ace/libACE.a libACE-5_4_7.a; \
+	 ln -sf ../ACE/ACE_wrappers/ace/libACE.so libACE-5_4_7.so; \
+	 ln -sf ../ACE/ACE_wrappers/ace/libACE.so.5.4.7 libACE.so.5.4.7; \
+	 ln -sf ../libjcore/libjcore-2_5_0.a libjcore-2_5_0.a; \
+	 ln -sf ../libjcore/libjcore-2_5_0.so libjcore-2_5_0.so; \
+	 ln -sf ../libjx/libjx-2_5_0.a libjx-2_5_0.a; \
+	 ln -sf ../libjx/libjx-2_5_0.so libjx-2_5_0.so)
 	touch ${JX_HOME}/ACE/ACE_wrappers/ace/Svc_Conf_l.cpp
 
 mulberryinit:

ACE Dynamic Link Patch (Linux-Make.header-patch.diff)

This patch moves the ACE library from the statically-linked list to the dynamically-linked list.

Index: Linux/Make.header
===================================================================
--- Linux/Make.header	(revision 105)
+++ Linux/Make.header	(working copy)
@@ -88,8 +88,8 @@
 			${LINK_STATIC} \
 				-ljx-${JX_LIB_VERSION} \
 				-ljcore-${JX_LIB_VERSION} \
+			${LINK_DYNAMIC} \
 				-lACE-${ACE_LIB_VERSION} \
-			${LINK_DYNAMIC} \
 			${J_X11_LIBS} \
 			-lldap -llber \
 			${LINK_STATIC} \

Last modified 10 years ago Last modified on 09/05/07 16:09:19