Subject: help with packaging gramps (for genealogy)
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 11/17/2003 16:55:29
Does anyone do genealogy?

I am working on packaging gramps.

I have been testing and developing under NetBSD/i386 1.6.1_STABLE with
python 2.2.2 and under Linux with python 2.3.

I will import to pkgsrc-wip soon.

I came across various issues. The following is what I sent to gramps-devel
list (in different emails).

Any advice would be appreciated.

1) configure didn't see my python 2.3. My fix for configure:

-       for am_cv_pathless_PYTHON in python python2 python2.2 python2.1 python2.0 python1.6 python1.5 : ; do
+       for am_cv_pathless_PYTHON in python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 : ; do

2) Under Linux, I received:

/usr/bin/msgconv --to-code=UTF-8 hu.po -o temp.po
/usr/bin/msgconv: Cannot convert from "ISO-8859-2" to "UTF-8". msgconv
relies on iconv(). This version was built without iconv().
*** Error code 1

I received that for several LANGUAGES. This may be a problem with my glibc
version of msgconv.

My workaround:
-LANGUAGES="hu zh_CN cs da_DK de es fr it nl pl pt_BR ro ru sv"
+LANGUAGES="zh_CN cs de nl ro ru"

3) iconv has wrong switches ... unstandard use of iconv(1)

src/po/Makefile.* have: $(top_srcdir)/src/po/zh_CN.po
        iconv --from-code=GB2312 --to-code=UTF-8 $< -o temp.po
        $(MSGFMT) -v temp.po -o $@
        rm temp.po

But some operating systems do not provide an iconv(1) tool (which is
commonly provided with glibc).

So some systems use iconv(1) as provided with libiconv suite.

They have different syntax.

 $ iconv --help
 Usage: iconv [-c] [-s] [-f fromcode] [-t tocode] [file ...]
 or:    iconv -l

Or can you provide a src/po/ (src/po/ that is not
GLIBC specific?

My fix for this in src/po/

-       iconv --from-code=GB2312 --to-code=UTF-8 $< -o temp.po
+       iconv -f GB2312 -t UTF-8 $< > temp.po

4) Under NetBSD, had some problems with msgfmt erroring:

/usr/bin/msgfmt -v temp.po -o
some header fields still have the initial default value
found 1 fatal errors


/usr/bin/msgfmt -v temp.po -o
field `Project-Id-Version' still has initial default value
found 1 fatal errors

The msgfmt switch is:
  -v, --verbose               list input file anomalies

I don't know why I have errors; my workaround in src/po/
(including another fix mentioned above) is:

--- src/po/	Tue Oct  7 07:51:51 2003
+++ src/po/
@@ -244,12 +244,12 @@ uninstall-local:
 	@MSGCONV@ --to-code=UTF-8 $< -o temp.po
-	$(MSGFMT) -v temp.po -o $@
+	$(MSGFMT) temp.po -o $@
 	rm temp.po $(top_srcdir)/src/po/zh_CN.po
-	iconv --from-code=GB2312 --to-code=UTF-8 $< -o temp.po
-	$(MSGFMT) -v temp.po -o $@
+	iconv -f GB2312 -t UTF-8 $< > temp.po
+	$(MSGFMT) temp.po -o $@
 	rm temp.po
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

5) gramps fails to run under NetBSD/i386 1.6.1_STABLE:

Traceback (most recent call last):
  File "/usr/pkg/share/gramps/", line 45, in ?
  File "/usr/pkg/lib/python2.2/", line 372, in setlocale
    return _setlocale(category, locale)
  File "/usr/pkg/lib/python2.2/", line 73, in setlocale
    raise Error, '_locale emulation only supports "C" locale'
ValueError: _locale emulation only supports "C" locale

6) double, triple people

My mother and I have been using gramps (as I packaged) under Linux. We
imported a .ged file (NAME Personal Ancestral File, VERS 4.0) containing
over 100 names.

After about 30 minutes, we noticed that all of the people under the "R"
tab (like "Reed") were doubled. So I had two Austins for example.

And then later, we noticed some more duplicated users (under other last
names). These users have the same identification number and all same data.
They appeared to be identical. We tried the find duplicate people tool --
it didn't find anything.

Then we had triplicate users in the "R" category. So we removed one
Austin Reed. And we had two left.

Later, when I stopped and restarted gramps, my son Austin was gone!
So even though he was listed multiple times and I deleted one and his
other entry was still available after a reopen of gramps he was really

Overall gramps works fine under Linux.

   Jeremy C. Reed