Changes

Jump to: navigation, search

Mac OS X:Build from source:fink

3,084 bytes removed, 13:11, 24 February 2012
Structure the Mac OS pages
== Introduction == This page describes how How to install Gramps on OSX using X11. The process uses fink or a similar program called macports to install the packages that gramps depends on. Gramps does work, although there are some glitches which are described below.
The author of the fink guide thanks the original author from which that part of the guide was written, and for the help of people on the Gramps list for helping them work through the stumbling blocks!
The fink For a guide applies to of a user who has Gramps 3.0.1 working: [[Mac OS X 10.4.8, and Gramps 2.2.8, but might work with other versions.:Build from source:fink:local]]
The macports following fink guide applied applies to Mac OS X 10.4.8 , and Gramps 2.2.8, but should . It is not possible to get gramps 2.2.9 to work otherwisewith fink because you get an error "TypeError: object of type `GtkCellRendererText' does not have property `wrap-mode'" because fink does not yet support the pangocairo packages. Some earlier versions of gramps need additional patches that are not mentioned here.
=== General Caveats ===
* As stated above, these instructions were for installing 2.2.8 on Mac OS X 10.4.8, but should work more widely.
* Production of a guide like this should really only be done after repeating the installation from a clean machine, and repeating again till the guide exactly matches the actual process - doing so would take a lot of time; the authors have each only done the installation once, so your experience will almost certainly differ from theirs.
* The process is not very straightforward, and there will almost certainly be problems like unresolved dependencies, files not found on the various servers, download of files just stalls indefinitely and questions asked by scripts to which you don't know the answer. Nevertheless, installation is possible and I think gramps is worth the trouble. I suggest you have a look at the instructions for [http://www.captnswing.net/2004/02/12/nicotine.html|Installing SoulSeek] - this is a similar process, but actually ''SoulSeek'' is easier because it is fully integrated into the fink process. This might give you some idea of the requirements for perseverance. If you don't think you could install ''SoulSeek'' then you certainly won't be able to install Gramps. '''The converse is not true'''
== Installing Gramps on Mac OS X via fink to use X11 ==
<ol><li> Download the appropriate version of [http://fink.sourceforge.net/download/index.php?phpLang=en fink]. These instructions were tried with fink 0.8.1. You may need the [http://fink.sourceforge.net/doc/users-guide/ Fink User's Guide].
<li> Install fink by opening the disk image and double clicking on the installer.pkg.
<ul><li>Update note for Mac OS X 10.5 on an Intel Mac where fink had been copied across from your old PPC (ie. G4 or G3) Mac. You have to delete your entire PPC-based fink and install freshly the fink 0.9. Upgrading first wastes your downloads and time, as the PPC version will not upgrade to the Intel version.</li></ul> <li> You could use FinkCommander to provide a GUI to fink, but it is not worth the trouble, because I wasn't sure that it actually offered all the packages that I wanted, and sometimes did not allow me to type in responses to questions (this is presumably a bug). I suggest you use Terminal. In Terminal type <tt>'''fink self-updateselfupdate'''</tt> This should download package descriptions and update core packages including fink itself. I thought it would be best to do this update before switching from source to binary distribution, but I had to try the whole updating process several times before I actually managed to get it to succeed, so this may be a bad choice.
<li> In Terminal type <tt>'''fink configure'''</tt> This should run the fink configuration process (or it may have been run automatically before). You need to choose source distribution (not binary). This will set the list of Trees in <tt>'''/sw/etc/fink.conf'''</tt> to have unstable/main at the end. If not you need to add this manually. Because <tt>fink.conf</tt> is owned by root, if you do this manually you will have to do <tt>'''sudo pico /sw/etc/fink.conf'''</tt>. During the configuration process you will also have to choose between the CVS (Concurrent Versions System or Concurrent Versioning System) and rsync update methods. Rsync is a very fast protocol. It will update the description files faster than the old CVS update method. Furthermore, CVS updates are always done from sourceforge.net while rsync updates can be done from a mirror close to you. I found that CVS often stalled trying to access files, though rsync had the disadvantage that sometimes files were not found (and perhaps as CVS uses the master copy the files should be found). Nevertheless, I suggest you use rsync. If you are behind a firewall (even the firewall in a broadband router), you may need to set ProxyPassiveFTP to true to help get around the firewall.
<li> In Terminal type <tt>'''fink selfupdate-rsync'''</tt> This should make sure all the package descriptions are downloaded, and the core packages correctly updated. I found I had to repeat this command several times, trying different mirrors when problems arose with accessing files, before the update succeeded. Fortunately, once a file has been downloaded, if you quit the process ({{man key press|ctrl-|C}}), then on typing the command again, it starts from where it left off.
<li> I also got the following error, and carried out the suggested instructions (I had to use sudo apt-get in each case), which installed some extra packages and seemed to work.<pre> The following inconsistencies found:
Unsatisfied dependency in gettext-tools: gettext (= 0.10.40-19)
sudo fink install librsvg2-gtk
I found that a number of the files could not be found on the first mirror that was tried, or the files would not download. Sometimes, I could follow the suggestions and get the file from the next mirror that was suggested. However I also quit out of the install process by {{man key press|ctrl-|C }} (twice) and started again. Fortunately files already downloaded are remembered.
Later on, I found that the gramps build process complained about another package missing, so in Terminal I had to type:
imp.find_module('glade', [imp.find_module('gtk')[1]])
<li>Configure For some reason, Fink's install of msgfmt isn't detected properly (even though the configure script says it is). You will have to tell it explicitly where to find it, so configure gramps by typing the following in Terminal:<pre> cd gramps-2.2.8./configureGMSGFMT="/sw/bin/msgfmt"</pre>
<li>In Python couldn't find the file method <tt>'''po/Makefile'''gsignal</tt>, which is generated by configure, make sure that so in src/GrampsWidgets.py replace: <ttpre>'''GMSGFMT'''HAVE_2_6 = gtk.pygtk_version[:2] == (2, 6)</ttpre> has the value:with <pre> GMSGFMT HAVE_2_6 = /sw/bin/msgfmtFalse</pre>[While I do not know why have PyGTK 2.6.3, the code this is not detected and set by configure run as above]looks at caused a NameError.</li>
<li>Build and install gramps by typing in Terminal:<pre> make
<li>In one of the updates along the way, I had installed Python version 2.5, which is not good because all the library packages are for 2.4. You will need to switch the default version that Python picks up. In Terminal type:<pre>sudo ln -sf /sw/bin/python2.4 python</pre>
 <li>In <tt>'''/usr/local/share/gramps/GrampsWidgets.py'''</tt> put:<pre> try: INFO_ICON = gtk.STOCK_INFO except: INFO_ICON = gtk.STOCK_DIALOG_INFO</pre>Somewhere after <tt>'''import gtk'''</tt> in the section labelled: Constants. Then change every reference to <pre>gtk.STOCK_INFO</pre> to <pre>INFO_ICON</pre></li></ol>
====Start Gramps====
# Start X11 by double clicking on the X11 icon in Applications/Utilities (or in Applications, depending on the version of Mac OS X).
# Start Gramps, by typing, in xterm: <tt>'''gramps'''</tt>. After a pause "Spelling checker is not installed" appears on the xterm, and then Gramps should start.
 
 
== Installing gramps for X11 using MacPorts ==
 
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.
 
=== Starting ===
 
So, assuming you have MacPorts installed and updated, you might as well try:
<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>
port deps gramps</code>, which listed the major dependencies that gramps has. Then, I installed each separately. They are:
<code>
shared-mime-info
py-gnome
py-bsddb</code>
I installed them in the following order:
# shared-mime-info
# 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 ===
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.
# 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 ==
* '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[http://www.documentfoundation.org/download/ LibreOffice]).
* The PdfDoc.py plugin cannot be installed because ReportLab is not installed.
** Note, using macportsFor fink, run <code> sudo port fink install pyreportlab-reportlab py25</code>. This will take care (py24 or py23, for earlier versions of this problempython).
* 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".
choose.set_current_folder(default_dir)
</pre>
This is fixed in gramps 2.2.8
* (Gramps bug 0000940) When running gramps, the following warning is output on xterm - this appears to be when I open a new window:
NameError: name 'gsignal' is not defined
The problem is worked around as described at step 6 of "Download and install gramps" (changing HAVE_2_6) above. It also seems to work if you replace or follow the line HAVE_2_6 = gtk.pygtk_version[:2] == (2, 6)with HAVE_2_6 = False
 * (Gramps-users report 19 Feb 2007) Output of (for example charts) to OpenOffice OpenDocument causes OpenOffice to crash due to a problem with Gramps handling of '&'.
* (Gramps bug 0000938) Import of a GEDCOM file that contains an invalid date of the form 2 DATE BET ABT 1912 AND 1915 causes the date to appear as blank.
* (Gramps-devel mailing list 11 Feb 2007) Gramps aborts at startup with the following error:
This stock item is added in Gtk 2.8 and fink an older Gtk, for more info see: http://www.pygtk.org/docs/pygtk/gtk-stock-items.html.
This is worked around by patching the application as above, and is fixed in gramps 2.2.8 [[Category:Developers/Packaging]]
manual
389
edits

Navigation menu