Difference between revisions of "Mac OS X:Build from source:MacPorts"

From Gramps
Jump to: navigation, search
m (moved Mac OS X MacPorts to Mac OS X:Build from source:MacPorts: Structure the Mac OS pages)
(22 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
{{languages}}
 
== Installing gramps for X11 using MacPorts ==
 
== Installing gramps for X11 using MacPorts ==
 +
# Install Mac OS X Leopard and update to the latest version.  (X11 will be installed by default on Leopard - older OSes may require it to be manually installed.)
 +
# Download and install the latest Xcode tools from http://developer.apple.com/technology/Xcode.html
 +
# Download and install Macports from http://www.macports.org/install.php
 +
# Open Terminal.app from /Applications/Utilities and enter these commands:
 +
sudo port -v selfupdate
 +
sudo port install gramps
 +
sudo port install python_select
 +
sudo python_select python25
 +
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
 +
sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
  
Right now, I will just get the basic information down as to the troubles I ran into and how I fixed them. I will later put in more detailed instructions on using MacPorts and the rest.  
+
{{man note| Time for several cups of coffee! |The step 'sudo port install gramps' on a completely fresh installation of MacPorts on Mac OS X 10.4.11 iMac iSight (2.1 GHx PowerPC G5) took 12 hours 53 minutes.}}
  
=== Starting ===
+
# After the last command, wait 5 minutes to be sure that launchctl has finished
 +
# When you want to run GRAMPS, enter these commands
 +
open /Applications/Utilities/X11.app
 +
gramps
 +
On older OSes it may be necessary to instead use
 +
open-x11 gramps
 +
[[Category:Developers/Packaging]]
  
So, assuming you have MacPorts installed and updated, you might as well try:
+
There are a number of issues, some of which are probably specific to particular versions of Mac OS X::
<code>
+
sudo port install gramps</code>
+
Now, if you're like me and didn't have GNOME or anything like that installed, calling that command will attempt to go through all of the dependencies and install them all. This will take a while, and you might be at this installing gramps for a couple hours (there are a lot of dependencies)
+
  
What I did instead was run <code>
+
# If you had a previous installation of MacPorts and Gramps, and you want to start again from scratch, then simply deleting the folder /opt is not enough to uninstall MacPorts. The correct instructions for doing so are at [[http://guide.macports.org/chunked/installing.macports.uninstalling.html MacPorts Guide: uninstalling]]. In particular, you have to rename/move aside /Applications/MacPorts when you do a fresh install.
port deps gramps</code>, which listed the major dependencies that gramps has. Then, I installed each separately. They are:
+
# libproxy 0.4.0 does not build properly on Tiger see [[http://trac.macports.org/ticket/24127 MacPorts ticket 24127]]. Reverting to the Portfile for 0.3.0 works.
<code>
+
# The WriteCD plugin is unavailable. This relies on GNOME and has not been made to work on OS X.
shared-mime-info
+
# The spelling checker may or may not work. gnome-python-extras needs to be build after gtkspell (which may not happen in an entirely automated build). In addition, there appear to be some other problems which affect whether it works or not. See [[http://trac.macports.org/ticket/24266 MacPorts ticket 24266]].
py-gnome
+
# The latest version of MacPorts Gramps is based on Python 2.6, but this does not build _bsddb correctly on some OS/architecture combinations. See [[http://trac.macports.org/ticket/23768 MacPorts ticket 23768]] and [[http://trac.macports.org/ticket/24310 MacPorts ticket 24310]].
py-bsddb</code>
+
# A warning message is produced when running Gramps: "Xlib:  extension "RANDR" missing on display ":0.0"." According to the MacPorts FAQ [[http://trac.macports.org/wiki/FAQ#randr]] "It's harmless and you should ignore it".
I installed them in the following order:
+
# The Geographic View is not available because webkit-gtk does not build under MacPorts [[http://trac.macports.org/ticket/23464 MacPorts ticket 23464]] and  [[http://bugs.webkit.org/show_bug.cgi?id=36088 webkitgtk bug]]).
# shared-mime-info
+
# When going into the file chooser (for example on export or import or plugin manager, you may get the warning: "GtkWarning: Unable to find default local directory monitor type". This doesn't seem to be very serious, and seems to be a "more general gtk issue". See [[http://www.mail-archive.com/bug-gnubg@.../msg03464.html]].
# py-bsddb
+
# py-gnome (the tough one)
+
  
=== shared-mime-info ===
 
In order to successfully install this, I first had to run:<code>
 
sudo port install p5-xml-sax
 
sudo port install p5-xml-sax-expat</code>
 
After that, things installed smoothly
 
  
=== py-bsddb ===
+
If you start gramps from the xterm window, don't forget to follow the instructions about setting paths for the X11 environment in [[http://trac.macports.org/wiki/InstallingMacPorts#OptionsfortheMacPortsshellandX11environment MacPorts wiki: Installing MacPorts]].
This actually installed smoothly on my computer.
+
 
+
=== py-gnome ===
+
For now, I merely list the libraries and what I did to fix the problem.
+
# py-gtk2
+
#* I had to make sure to upgrade expat. After that, it installed fine.
+
#* ''I had a real difficulty getting this to fully install. It kept choking on Cairo. After updating XTools to 2.5, Cairo installed without a problem.'' --[[User:A.southern.yankee|A.southern.yankee]] 23:46, 1 May 2008 (EDT)
+
# py-orbit
+
#* This installed without any problems for me.
+
# libzvt
+
#* This package needs "dbus" which in turn needs "xmlto". It appears, however, that "xmlto" is not listed as a dependent of "dbus". Hence, I ran <code>sudo port install xmlto</code> by hand. This installed without any problems on my computer.
+
#* After installing that, and upgrading gtk2 (do this first), this seems to be installing correctly.
+
# gnome-desktop
+
#* This was the next problem for me. I installed ''p5-libxml-perl, p5-xml-simple, py-xml'' by hand, cleaned ''gnome-desktop'', and then tried the installation again. Worked fine!
+
# gstreamer
+
#* This was the next problem for me. I installed ''p5-xml-libxslt, py-libxslt by hand'', cleaned gstreamer, and then tried the installation again. Worked fine!
+
#liboil
+
#* First, I ran <code>sudo port upgrade gtk-doc</code>
+
#* Then, I installed the newest version of the liboil library from [http://liboil.freedesktop.org/download/] and then tried to make the liboil library again. (From the manual download). This worked. I would assume it would work for the port version as well.
+
# nautilus
+
#* This was the last problem for me. To get around the error, I had to create a soft link for the ''libintl.3.dylib'' file in my /opt/local/lib/ directory.
+
 
+
=== Conclusion ===
+
Those errors were the ones I ran into. I was able to get gramps to work after that, with some of the same glitches as described below.
+
 
+
 
+
 
+
 
+
== Glitches ==
+
 
+
There are some problems.
+
 
+
* Help does not work (clicking Help or FAQ etc on the Help menu does nothing).
+
* 'Enter' or 'return' does not act as OK for closing windows (the button has to be pressed with the mouse). However Esc does work to exit from the window.
+
* The browser and email links under the help menu do nothing.
+
* It is not possible to start Gramps by double clicking on a Mac OS icon, nor by double clicking on a Gramps database that is associated with the application. (It should be possible to create an installation that allows this, just as it is available for OpenOffice).
+
* The PdfDoc.py plugin cannot be installed because ReportLab is not installed.
+
** Note, using macports, run <code> sudo port install py-reportlab </code>. This will take care of this problem.
+
** For fink, run <code>fink install reportlab-py25</code> (py24 or py23, for earlier versions of python).
+
* The LPRDoc.py plugin cannot be loaded because the python bindings for GNOME print are not installed.
+
* Spell checking does not work (on starting Gramps, an error warning "Spelling checker is not installed" appears on the xterm). The python "bindings for [GNOME print and spell checking] are probably in fink's gnome-python2-desktop-py24 and gnome-python2-extras-py24 packages. Or would be, if fink had them at all, which we don't. They are only viable for for newer versions of gnome itself than fink presently has, or have other dependencies that are not yet satisfiable within fink. We're working on it".
+
* All ODF (ODT) output failed with a "Could not create file" error on an Gramps installed via Macports as described above, on a 'virgin' Mac. Benny Malengier forwarded the suggestion from guylinton that <code>zlib</code>  should be installed: with <code> sudo port install py25-zlib </code> all ODT output jumped into action.
+

Revision as of 04:01, 24 February 2012

Installing gramps for X11 using MacPorts

  1. Install Mac OS X Leopard and update to the latest version. (X11 will be installed by default on Leopard - older OSes may require it to be manually installed.)
  2. Download and install the latest Xcode tools from http://developer.apple.com/technology/Xcode.html
  3. Download and install Macports from http://www.macports.org/install.php
  4. Open Terminal.app from /Applications/Utilities and enter these commands:
sudo port -v selfupdate
sudo port install gramps
sudo port install python_select
sudo python_select python25
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
Gramps-notes.png
Time for several cups of coffee!

The step 'sudo port install gramps' on a completely fresh installation of MacPorts on Mac OS X 10.4.11 iMac iSight (2.1 GHx PowerPC G5) took 12 hours 53 minutes.

  1. After the last command, wait 5 minutes to be sure that launchctl has finished
  2. When you want to run GRAMPS, enter these commands
open /Applications/Utilities/X11.app
gramps

On older OSes it may be necessary to instead use

open-x11 gramps

There are a number of issues, some of which are probably specific to particular versions of Mac OS X::

  1. If you had a previous installation of MacPorts and Gramps, and you want to start again from scratch, then simply deleting the folder /opt is not enough to uninstall MacPorts. The correct instructions for doing so are at [MacPorts Guide: uninstalling]. In particular, you have to rename/move aside /Applications/MacPorts when you do a fresh install.
  2. libproxy 0.4.0 does not build properly on Tiger see [MacPorts ticket 24127]. Reverting to the Portfile for 0.3.0 works.
  3. The WriteCD plugin is unavailable. This relies on GNOME and has not been made to work on OS X.
  4. The spelling checker may or may not work. gnome-python-extras needs to be build after gtkspell (which may not happen in an entirely automated build). In addition, there appear to be some other problems which affect whether it works or not. See [MacPorts ticket 24266].
  5. The latest version of MacPorts Gramps is based on Python 2.6, but this does not build _bsddb correctly on some OS/architecture combinations. See [MacPorts ticket 23768] and [MacPorts ticket 24310].
  6. A warning message is produced when running Gramps: "Xlib: extension "RANDR" missing on display ":0.0"." According to the MacPorts FAQ [[1]] "It's harmless and you should ignore it".
  7. The Geographic View is not available because webkit-gtk does not build under MacPorts [MacPorts ticket 23464] and [webkitgtk bug]).
  8. When going into the file chooser (for example on export or import or plugin manager, you may get the warning: "GtkWarning: Unable to find default local directory monitor type". This doesn't seem to be very serious, and seems to be a "more general gtk issue". See [[2]].


If you start gramps from the xterm window, don't forget to follow the instructions about setting paths for the X11 environment in [MacPorts wiki: Installing MacPorts].