Re: [Gtk-osx-users] Failed to link xmllint undefined symbols _gzdirect

On 7/08/2010, at 11:17 AM, Gabriele Greco wrote:
> On Wed, Aug 4, 2010 at 12:31 AM, Richard Procter  
> <richard n procter gmail com> wrote:
> [snip]
> In short, downgrading to 2.6.30 - seems to - work. Here's my jhbuild
> entry.
> <autotools id="libxml2" autogen-sh="configure">
>     <branch version="2.6.30" module="libxml2/2.6/
> libxml2-2.6.30.tar.bz2"
>             md5sum="cbc6d381daaa836b90a7ab449c1bc1ae"/>
>   </autotools>
>> I've added the quoted section both to .jhbuild/cache/gtk-osx- 
>> bootstrap.modules and to Source/jhbuild/modulesets/gtk-osx- 
>> bootstrap.modules, but for some strange reason jhbuild always try  
>> to download libxml2-2.7.7, I've also grepped for libxml2-2.7.7  
>> everywhere on my home without luck... where I have to add this to  
>> fix the error on _gzdirect building a 10.4 compatible framework?

Hmmm, I'm fairly new to this myself, but I'd guess it's one of the  
following gotchas:

0) It appears that jhbuild must be explicitly told to rely on the  
local moduleset definitions. Ensure moduleset = "gtk-osx" is defined  
in your ~/.jhbuildrc-custom file.

1) If you've multiple jhbuilds (as I do) note that the ~/.local/bin/ 
jhbuild script hard codes the path to jhbuild. So if the wrong  
jhbuild is in the path it won't do what you want it to.

I've copied my own build notes below as is - YMMV!


Some notes on compiling/installing all the requisite DoView libraries  
on OS X.

jhbuild is a gnome system for building a bunch of dependent packages.  
It requires python 2.5.

It is automatically installed by the gtk-osx-build-setup script to $ 

* Build instructions

- Follow the ones at

- This script can be used to setup the build environment so that
everything needs is available. I have a number
of builds on the same machine, and so this script also changes $ 
{HOME} to
ensure that they do not step on each others toes.



export PATH=/opt/subversion/bin:`pwd`/inst/bin:${ROOT}/.local/bin:/ 
export PYTHONPATH=$PYTHONPATH:${ROOT}/gtk/inst/share/pygobject/2.0/
export HOME=${ROOT}


You can also add these to the .bashrc to alter the shell prompts  

if [ -n "$IS_BUILDSHELL" ]; then export PS1="[buildshell] $PS1" ; fi
if [ -n "$JHBUILD_PROMPT" ]; then export PS1="$JHBUILD_PROMPT $PS1"; fi

- Note: installs jhbuild in ~/Source. Change  
this if
   desired by editing the SOURCE variable.

- Execute the above script.

- Once you have executed $ sh, modify the  

- Use User-Local Python:

       - OS X 10.4: No issue: OS X 10.4 does not supply 2.5, in which
         case jhbuild will install a local copy.

       !! OS X 10.5: supplies 2.5 however we don't wish jhbuild to use
          this, which it does by default, as we want a completely
          independent install to ease bundling and version issues.

          Set _gtk_osx_use_jhbuild_python = True in ~/.jhbuild-custom

- Local modules

       - I have added libgnomecanvas the moduleset -
         see doview/development/patches/gtk-osx-random.modules.patch

       - I have patched GTK+:

         ~/work/doview/development/patches/radio_*.patch -
              Allow radio buttons to work in mac integration menubar  
(Issue #83, and

         These must be copied into ~/src/jhbuild/patches and added to  
         GTK+ entry in ~/src/jhbuild/modulesets/gtk-osx.modules:

         <patch file="radio_refactor.patch" strip="0"/>
         <patch file="radio_fix.patch" strip="0"/>

       - We need to build libgnomecanvas, too:

         Add this entry to gtk-osx-random.modules (we could create a  
custom moduleset
         but that seems overkill for this one module).

   <autotools id="libgnomecanvas">
     <!-- This fixes update issues on intel macs (see issue #37) -->
     <branch module="libgnomecanvas/2.30/ 
libgnomecanvas-2.30.1.tar.bz2" version="2.30.1"
     <patch file="gnomecanvas_close_enough.patch" strip="0"/>
       <dep package="intltool"/>
       <dep package="gtk+"/>
       <dep package="libart_lgpl"/>
       <dep package="libglade"/>
       <dep package="gnome-common"/>

         Then copy the patch file from
gnomecanvas_close_enough.patch to

       - Modify .jbuildrc-custom 'moduleset' variable to
         "gtk-osx". Without this it appears to use the original
         modulesets via the Internet.

       - The latest stable release specifies libxml2 2.7.7 however this
         references a recently publicised variable in -lz, _gzdirect  
         is unavailable in 10.4. For 10.4, we therefore downgrade to:

          <autotools id="libxml2" autogen-sh="configure">
          <branch version="2.6.30" module="libxml2/2.6/ 

- Compilation flags

       - By default, jhbuild uses -O0
       - Apple recommends 'gcc -Os', which we can achieve by adding

               environ_prepend('CFLAGS', '-Os')
               environ_prepend('CXXFLAGS', '-Os')

         to the .jhbuildrc-custom file.

- Now continue to build the bootstrap etc.

   $ ${jhbuild} bootstrap
   $ ${jhbuild} build meta-gtk-osx-bootstrap
   $ ${jhbuild} build meta-gtk-osx-core

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