Bsddb3/berkeleydb for Gramps v5.2 beta 1 (AIO)

Hi @Nick-Hall @prculley and jralls

You’ve all been working hard on resolving the bsddb3 stumbling block with Gramps 5.2 beta 1 AIO port. After spending some time figuring out what exactly is going on with the bsddb3 package not being available on MSYS2, and also how berkeleydb is different from bsddb3, I’m sharing my findings here so a strategy can be put in place for long and short term. Starting the thread here outside the PR, to keep the PR comments focused on the fix for the beta.

Summary is, for the long-term -

  1. Gramps will want to migrate to berkeleydb over bsddb3 if we intend to upgrade to Python 3.10+ (taking the author’s word for the Python version requirements). berkeleydb is the future of bsddb3 with support for newer versions of Oracle DB, Python, additional features, and a change in license.
  2. Neither bsddb3 nor berkeleydb are in the current MSYS2 package list (as jralls mentioned in the PR, it is still available in the archive). The issue here is that a PR was submitted to upgrade bsddb3 v6.2.9 to the latest available, which is berkeleydb v18.1.6. That build failed due to a compiler error indicating there would have been a crash at runtime. The package maintainers took the fact that there were no complaints about the missing package or crashes the bsddb3 package to mean that no one is using it, so the package was removed. I’ve written to Jesus Cea, the author of bsddb3/berkeleydb, to see if he can help resolve the compiler error.
  3. When a new release of berkeleydb with fix is available, we can request MSYS2 maintainers to create a new package for berkeleydb and then we can migrate Gramps to use berkeleydb.

Does this plan make sense? I know it doesn’t help us in the short term. For that, an alternative if bsddb3 v6.2.9-4 from archive doesn’t work with Python 3.11: is it an option to fall back to Python 3.10?

1 Like

I can get it to build with bsddb3 by copying the files from the python3.10 to the python3.11 directories.

2 Likes

I’m currently trying to find files in the share.tgz archive elsewhere.

That’s awesome and I was hoping that would work for the short term; the only doubt is that bsdbb3’s author states emphatically on the bsddb3 project page (@prculley posted the link the PR),

bsddb3 supports up to Python 3.9. It will not support Python 3.10.

You are using Python 3.x > 3.9 and you need bsddb3:
bsddb3 supports up to Python 3.9. If you are running a more modern Python versión, you must upgrade to berkeleydb library.

Hopefully this turns out not to be the case :crossed_fingers: And btw, I mistyped the version in my original post, I meant to ask if falling back to Python 3.9 was an option.

I’m running bsddb3 6.2.9 and python 3.11 on Arch Linux.

1 Like

There is now a GrampsAIO available for testing.

Make sure to backup your data before using this beta test version of Gramps.

Starting 5.2 in windoze with the last loaded Tree in 5.15 being a BSDDB fressh import of the Example.gramps testing tree:


image

393899: ERROR: dbloader.py: line 107: can't load database backend: 'bsddb'
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\dbloader.py", line 188, in read_file
    db = make_database(dbid)
         ^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gen\db\utils.py", line 93, in make_database
    raise Exception("can't load database backend: '%s'" % plugin_id)
Exception: can't load database backend: 'bsddb'

attempting to convert in the Manage Family Trees dialog:

But the last line in the Info is more helpful than the Convert error:
image

1 Like

That’s unfortunate. It looks like we can’t get the build script provided in PR #1444 to install the bsddb backend. I tried installing python 3.10 but I can’t get older versions of python to work with pip.

I’m not a Windows user myself, so I think that I’ll have to let the community progress this.

Is there a manual process for adding that bsddb backend? With that, so that we can determine if it is compatible with a broader cross-section of Windoze boxes? That will help decide whether resolving the Installer issue is worthwhile.

I suppose you could compile it from source. I was trying to use an old mingw64 package.

I may need a “dazed”, “confused” or “drowning” emoji for Discourse.

Nice, just tested it on Windows 10:

WARNING:root:Importing old config file ‘C:\Users\ennob\AppData\Roaming\gramps\gramps51\gramps.ini’…
WARNING:root:Done importing old config file ‘C:\Users\ennob\AppData\Roaming\gramps\gramps51\gramps.ini’

(gramps.exe:8888): Gdk-WARNING **: 12:48:08.590: Could not open registry key ‘SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00090413’. Error code: 2

(gramps.exe:8888): Gdk-WARNING **: 12:48:08.606: Could not open registry key ‘SYSTEM\CurrentControlSet\Control\Keyboard Layouts(NULL)’. Error code: 2

(gramps.exe:8888): Gdk-WARNING **: 12:48:08.606: Failed to load keyboard layout DLL for layout 00090413: (NULL)

(gramps.exe:8888): GLib-GIO-WARNING **: 12:48:10.342: win32 session dbus binary not found
WARNING:.Spell:You have no installed dictionaries.
2023-08-10 12:48:38.974: WARNING: spell.py: line 66: You have no installed dictionaries.
WARNING:.gen.plug:Failed to open addon metadata for C https://raw.githubusercontent.com/gramps-project/addons/master/gramps52/listings/addons-C.json: HTTP Error 404: Not Found
2023-08-10 12:48:49.531: WARNING: utils.py: line 229: Failed to open addon metadata for C https://raw.githubusercontent.com/gramps-project/addons/master/gramps52/listings/addons-C.json: HTTP Error 404: Not Found

First thing that I saw, not related to BSDDB, is that the installer did not select my language automatically, so this Gramps can now only speak English.

Try this new GrampsAIO to see if it helps.

It’s different, and it does select NL automatically, but Gramps still starts in English, in Windows 10 and 11. I also see that in the installer, the component selector only shows Translations, and the old one shows Translations and Dictionaries. And in my test, the old one is 5.1.5-1.

For the old one, here are the contents of locale\nl\LC_MESSAGES:

    Directory: C:\Program Files\GrampsAIO64-5.1.5\share\locale\nl\LC_MESSAGES


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         11/9/2017  12:54 PM           3366 glib-networking.mo
-a----         1/23/2018   1:30 PM          64525 glib20.mo
-a----         7/27/2021   5:07 PM         725977 gramps.mo
-a----         8/15/2020   5:13 PM         194680 gtk30-properties.mo
-a----         8/15/2020   5:13 PM          80008 gtk30.mo
-a----         10/8/2016   9:39 AM            847 gtkspell3.mo
-a----         9/26/2017   7:11 AM          22969 iso_3166.mo
-a----         9/26/2017   7:10 AM          22849 iso_639.mo

And for the new one, there is only one file: gramps.mo

from the Finnish Gramps Google Groups:

Observations on the functionality of the new Gramps AIO64-r1-25ef2ea package.

The program does not start in Finnish. Chosen as the only one of the languages ​​to choose from.
Thumbnails don’t work.
The symbol of birth is the symbol of baptism (~). isolated by DaveSch. Filed as MantisBT 12965

Maybe have similar experiences.

Matti

… and what’s odd: When I run that same installer in Wine (inside LMDE 5) it crashes at the end, but the installed Gramps does speak Dutch, even though there is that same lone gramps.mo in the Dutch LC_MESSAGES folder, and in the British one too.

I also see that in the installer, the component selector only shows Translations, and the old one shows Translations and Dictionaries.

I can add them back. They take up an extra 20MB though.

The thumbnails have changed in this version. Perhaps it is trying to use a Gnome thumbnailer which won’t be installed. This needs further investigation.

And the tilde is often used to indicate an approximated date in English genealogies.

I am seeing this in GrampsAIO-5.2.0-r1-60a43c7_win64

In addition to the Birth error…
Baptism events are using the Engaged symbol.
Marriage events use the Divorce symbol.
Divorced events are using the Partner symbol.

These are in the Relationships, Pedigree, H Tree, Timeline Pedigree views

I unchecked the Use Symbols in Preferences and in the replacements options, I typed in the name of the Events. It clearly displayed what was going on.

EDIT: Resolved
GitHub Pull Request 1508 and MantisBT Bug Report 12965

1 Like