I don’t have a solution but goocanvas is a particularly brutal example. Gramps uses GTK version 3. The original goocanvas only works with GTK 2; goocanvas2 works with GTK 3. But some distributions eliminated GTK 2 years ago and only offer goocanvas–being the version that works with GTK 3.
The Repology web site tracks which packages are offered on various distributions. They also include the packages that are offered on macOS via either MacPorts or Homebrew. Repology’s “information” page for goocanvas:
I never heard of that site, and it’s quite interesting, but I don’t see enough clues to figure out what you’d actually need to get rid of the installation errors. Or am I missing something?
Last monday, I installed Fedora 37 on a VM inside Mint, just to see what @emyoulation was going through, and tried the approach that I normally use in Mint, i.e. using the a package manner with a proper GUI, which in this case meant PackageKit. And with that, I looked for the available support for geocode, en goocanvas. I saw no need for osmgpsmap, because the Gramps installation with add-ons did not complain about that.
And here, my standard search strategy didn’t really work, because I didn’t see anything like gir, or even Python helper libraries, so I had to revert to thinking about developer or helper libraries. And that worked, but the results were not as consistent as they seem to be on Debian and derivatives.
In this partucular case, I found a helper library for geocode:
But there was no such thing for goocanvas, so I tried the developer library instead:
They both worked, but I don’t see how an average user can figure this out.