building garnome on systems with an existing mono stack



Some members of the list have reported problems building GARNOME on
systems that have a mono stack already installed. 

Attached are replacement GAR Makefiles for dbus and gmime that should
resolve the problem.

===========================================================================

Discussion
----------
The major issue to resolve is whether or not to use an existing
mono-stack. The current thinking has been *not* to use an existing
mono-stack to insure that GARNOME builds a mono-stack that is always
"correct" for the GARNOME mono-based applications. The problem is how to
insure that the build process uses only the GARNOME mono stack when an
another mono stack is "visible" within the search paths, PATH,
LD_LIBRARY_PATH, and PKG_CONFIG_DIRS.

Why is this a problem?

* GARNOME Makefiles include dependency statements [LIBDEPS] to insure
that GARNOME packages are built in the order required.

* The GARNOME makefile configuration files, gar.*.mk, are structured to
insure that the GARNOME install tree is searched *first* for installed
mono applications and package configuration files.

So what's the problem?

The "problem" is some package configuration files will "automatically"
check for a mono-based dependency when the user does not *explicitly*
specify a configuration argument enabling or disabling that mono-based
dependency.

DBUS is a case in point. The configuration file supports the
configuration arguments:

        --enable-mono
        --disable-mono

to enable / disable building the dbus mono plugin. If *neither* of these
arguments is present, the configuration file will automatically search
for mono. If the GARNOME version of mono has not yet been built,
configure will find the system version of mono since it is in the search
path.

A solution to this problem is to disable building the dbus mono-plugin
until the GARNOME version of mono has been built and installed in the
GARNOME install tree. This solution necessitates building DBUS twice,
but that is not much of a penalty given that GARNOME contains 270+
packages.

A review of the GAR Makefiles and application configuration files
indicates potential problems with the following:
* dbus
* gmime
* evolution
* the entire GARNOME mono stack

Patched Makefiles for dbus and gmime are attached below.

Closer inspection of the evolution configuration file revels that the
mono-plugin is *not* built unless a configuration argument is specified.
What is interesting is the evo mono-plugin source directory is actually
configured but never built.  If the user later desires to have the evo
mono-plugin installed, they can:

* cd to the evo mono-plugin source directory
* type "make install"

This approach works of all of the mono plugins.

The GARNOME mono stack turned out not to be a problem.

Proof by existence
-------------------
As user root:
* install an complete mono stack under /opt/mono
[user garnome does *not* have write access to this tree]

As user garnome:
* install a clean GARNOME-2.12.1 source tree
* patch muine, memprof [PPC only]
* edit the sabayon GAR makefile to select a distribution
* edit gar.conf.mk to enable an unattended build, set install prefix,
set python patch, and enable ccache.

* edit gar.conf.mk to insure that the mono stack installed
under /opt/mono is found in the various search paths, PATH,
LD_LIBRARY_PATH, and PKG_CONFIG_DIRS
* replace the GAR makefiles for dbus and gmime with those attached below

* cd to top of the GARNOME source tree
* launch a complete build from the top of the source tree:

        (make install -C ./bootstrap/firefox; make paranoid-install) > build.log 2>&1 &

* wait a long time for the build to complete 
[need a much faster PPC system]

Results
--------
* build completed
* no circular dependencies observed
* review of build log indicates that mono stack installed
under /opt/mono was "seen" but not used.


-Joseph

-- 
joseph_sacco [at] comcast [dot] net
GARNAME = dbus
GARVERSION = 0.50
CATEGORIES = freedesktop
DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz

MASTER_SITES = http://dbus.freedesktop.org/releases/

LIBDEPS = bootstrap/expat platform/glib platform/gtk+ platform/libxml2

DESCRIPTION = dbus
define BLURB
 #FIXME: blurb goes here
endef

CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS = $(WORKSRC)/Makefile
INSTALL_SCRIPTS = $(WORKSRC)/Makefile

CONFIGURE_ARGS = $(DIRPATHS) --enable-glib --enable-gtk

# python plugin requires python >= 2.4
CONFIGURE_ARGS += $(shell if test "$(shell $(PYTHON) -V 2>&1 | grep 2.4)" ; \
then echo " --enable-python"; \
else echo " --disable-python"; fi)

# build mono plugin using the mono stack from GARNOME
LIBDEPS += $(shell if test -e $(libdir)/pkgconfig/mono.pc; then echo " mono/gtk-sharp1.0"; fi )

CONFIGURE_ARGS += --disable-mono --disable-mono_docs
CONFIGURE_ARGS += $(shell if test -e $(libdir)/pkgconfig/mono.pc; \
then echo " --enable-mono"; fi )
CONFIGURE_ARGS += $(shell if test -e $(libdir)/pkgconfig/mono_docs.pc; \
then echo " --enable-mono_docs"; fi )

BUILD_ARGS = -j1

include ../category.mk

CC := $(shell echo $(CC) | sed -e 's/ccache //g')
CXX := $(shell echo $(CXX) | sed -e 's/ccache //g')

# [hack] the dbus test suite doesn't compile on FC3/4.
CONFIGURE_ARGS := $(shell echo $(CONFIGURE_ARGS) | sed 's,--enable-tests,--disable-tests,')
GARNAME = gmime
GARVERSION = 2.1.16
CATEGORIES = geektoys
DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz

MASTER_SITES = http://spruce.sourceforge.net/gmime/sources/v2.1/

LIBDEPS = platform/glib

DESCRIPTION = gmime
define BLURB
 #FIXME: blurb goes here
endef

CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS = $(WORKSRC)/Makefile
INSTALL_SCRIPTS = $(WORKSRC)/Makefile

CONFIGURE_ARGS = $(DIRPATHS)

# build the mono plugin using the mono stack from GARNOME
LIBDEPS += $(shell if test -e $(libdir)/pkgconfig/mono.pc; then echo " mono/gtk-sharp2.0"; fi )

CONFIGURE_ARGS += --disable-mono
CONFIGURE_ARGS += $(shell if test -e $(libdir)/pkgconfig/mono.pc; \
then echo " --enable-mono"; fi )


include ../category.mk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]