Difference between revisions of "Build FieldWorks for Mac"

From LSDevLinux
Jump to: navigation, search
(minor updates)
m (Reverted edits by LindaHayes (Talk) to last revision by Mayhewn)
Line 72: Line 72:
However, this error seems to be a crash in <code>nant</code> itself rather than an error in FieldWorks.
However, this error seems to be a crash in <code>nant</code> itself rather than an error in FieldWorks.
== A Savior At the Grocery Store ==
Numbly, I left my husband, Marty, at the hospital where I had been visiting two of my children and headed for the grocery store. Since it was eleven p.m., I drove to the only store I knew was open twenty-four hours a day. I turned my car motor off and rested my head against the seat.
[[http://goodvillenews.com/A-Savior-At-the-Grocery-Store-XTmcwi.html A Savior At the Grocery Store]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== The Second Glance ==
Have you ever cringed at the sight of a human being who is physically disfigured? David Roche, who was born with a facial disfigurement, spent years trying to hide from himself. At middle age, he discovered his inner beauty, his spirit and his strength, and he has dedicated his life to helping all people find the inner beauty within themselves and in others.
[[http://goodvillenews.com/The-Second-Glance-FDzaku.html The Second Glance]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== Love Everything, Be Attached To Nothing ==
As human beings we all want to be happy and free from misery we have learned that the key to happiness is inner peace. The greatest obstacles to inner peace are disturbing emotions such as anger, attachment, fear and suspicion, while love and compassion and a sense of universal responsibility are the sources of peace and happiness. Dalai Lama
[[http://goodvillenews.com/Love-Everything-Be-Attached-To-Nothing-RSJu6i.html Love Everything, Be Attached To Nothing]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== 5 Great Lessons You Can Learn From Life ==
Life isnt meant to be easy, its meant to be lived..sometimes happy, other times rough. But with every up and down you learn lessons that make you strong.Can you step back from your own mind for a little while and realize that life is not as bad as you think it is?
[[http://goodvillenews.com/5-Great-Lessons-You-Can-Learn-From-Life-M0nUGD.html 5 Great Lessons You Can Learn From Life]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== NASA Announces Undersea Exploration Mission ==
An international team of aquanauts will travel again to the bottom of the Atlantic Ocean to simulate a visit to an asteroid in the 16th expedition of NASA Extreme Environment Mission Operations (NEEMO).
[[http://goodvillenews.com/NASA-Announces-Undersea-Exploration-Mission-9Shwm3.html NASA Announces Undersea Exploration Mission]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

Revision as of 23:21, 4 August 2012

The port of FieldWorks to Mac is still at an early stage, although we are hopeful that almost all of the work done to port it to Linux will carry over to Mac with very little change.

This page documents the current state of our knowledge about the steps that need to be followed.


We recommend that needed software packages be installed with MacPorts, whenever possible. This makes it much easier to keep things organized and updated. There is a wide range of ports available, and the versions are usually quite recent.

For the MacPorts versions of libraries to be used instead of the built-in ones, several environment variables need to be set. This can be done in ~/.profile (for use in Terminal) as follows:

export CPATH=/opt/local/include${CPATH+:}$CPATH

It's also possible to set them in ~/.MacOSX/environment.plist, making them applicable to all GUI programs, but this will cause the built-in Mac OS apps to use MacPorts libraries rather than the built-in ones they were developed with, which is not recommended and is likely to cause problems.

Install and build dependencies

Install the following MacPorts packages:

  • autoconf autoconf-archive automake libtool
  • mono nant
  • ImageMagick +wmf +jbig +jpeg2
  • icu
  • gtkmm
  • enchant
  • ossp-uuid
  • pccts
  • quilt

Although some of the packages above (eg autoconf) are already installed on the OS, we typically need the MacPorts ones, which are newer, or are needed by add-ons like autoconf-archive.

There is a Mac-native version of GTK which can be installed by substituting the following lines:

  • sudo port install gtkmm +quartz +atsui +no_x11
  • sudo port install ImageMagick +wmf +jbig +jpeg2 +no_x11

However, the Quartz version is a little less mature and may have a few glitches in it, so we recommend starting out with the X11 version.


Building and running FieldWorks requires a special version of mono. So you will need to build mono from source.

Currently there are a couple of problems with MacPorts that require workarounds, although hopefully these will be resolved soon:

  • There is a problem with the atlas port, which is a dependency of py26-numpy. It conflicts with libLAPACK.dylib from /System/Library/Frameworks/. If you have installed either of these two ports (py26-numpy and atlas) yourself, they must be uninstalled before building mono.
  • The MacPorts version of mono crashes when trying to build mono-basic. However, if the mono subdirectory is already built and installed, it's possible to build mono-basic with the newly-installed mono compiler. After checkout-and-build-mono has failed, do the following:
for D in {libgdiplus,mono,mono-basic}/fieldworks-*; do
  make -C $D && sudo make install -C $D


Currently, building FieldWorks fails on Mac:

[writeregistry] Opening LocalMachine:SOFTWARE\SIL\FieldWorks\7.0\
[writeregistry] Setting RootCodeDir to …/fieldworks/DistFiles

Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type.
 at System.Threading.Timer+Scheduler.SchedulerThread () [0x0015e] in
 at System.Threading.Thread.StartUnsafe () [0x00016] in

However, this error seems to be a crash in nant itself rather than an error in FieldWorks.