GNOME Bugzilla – Bug 622232
libchamplain-0.4.6 python bindings doesn't work at all
Last modified: 2010-08-20 22:34:29 UTC
Good day! After update to libchamplain 0.4.6, Getting Things Gnome now crashes when i select Edit -> Preferences. The error is: /libexec/ld-elf.so.1: /usr/local/lib/python2.6/site-packages/champlain.so: Undefined symbol "champlain_add_constants" But if i just start python and try to import champlain it complains too: [mrk@smeshariki2 ~]> python Python 2.6.5 (r265:79063, Jun 18 2010, 09:30:32) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd8 Type "help", "copyright", "credits" or "license" for more information. >>> import champlain Traceback (most recent call last):
+ Trace 222503
>>> It worked pretty fine before the update so it seems has something to do with changes in 0.4.6. I'm open for any tests and additional information. Thanks!
OK, a few questions. Did you get the library as your distribution's update or did you compile and install it manually? If you compiled it by yourself, you should use --enable-python for compilation. One more thing, did you run ldconfig after make install?
Sorry i forgot to say that i installed libchamplain from freebsd ports collection (software repository) and it builds with --enable-python=yes by default. After updating some port package manager run ldconfig, but i now run it manually just for the case. And nothing changed.
Hmm, I have no idea what might be wrong. One more question - what libchamplain version did you use before this update? There haven't been any libchamplain python bindings updates since 0.4.3 as far as I can tell. Maybe Victor, the libchamplain's python bindings maintainer, might know more. Looking at the bindings code the missing symbol "champlain_functions" is defined in the gtk bindings code (is this the right way to do it?) So one more problem might be that the package wasn't compiled with --enable-gtk. If you wish, you might also try to compile libchamplain by yourself (with --enable-gtk and --enable-python) to see if it works, but I expect it will given the fact that it works for all libchamplain developers.
Good day! I was updating from version 0.4.5. I dont see that --enable-gtk is defined manifestly in our port's Makefile, so i did it manually (and --enable-python uncoditionally). Then i rebuild and reinstall the port. Please see full buildlog, maybe you can see obvious inconsistences: http://pastebin.com/x47yAqSN But i still got this "champlain_functions" problem when trying to import champlain.
Ah crap, I've just noticed it - bindings/python/champlain/pychamplain.c has 0 size - apparently something went wrong during make distcheck, not sure what may have caused this. It looks I'll have to make one more 0.4.x release. Would you try the following to be sure? Run 'make clean' - that should remove pychamplain.c because it's autogenerated and run make again. Now it should generate pychamplain.c hopefully with non-zero size and python bindings should work again.
Yes it works. I've check that it has 0 size, then do ./configure. Than make clean and make in bindings/python/champlain/. Then copied champlain.so and .la into python's site-packages dir and all is now working. Thanks! Untill new version wasn't released can we somehow patch Makefile in bindings/python/champlain/ to force it to regenerate files when building libchamplain?
I think the easiest way is to either * delete pychamplain.c (so it'll get generated automatically during make), or * use the correct pychamplain.c you get after 'make clean; make' The second one is actually the only change for 0.4.7 so you can make your own home-made release by just replacing the 0-size pychamplain.c with the generated one in the tarball. (However I'll wait for a while with the 0.4.7 release because there is one more bug that might need to be fixed.)
Fixed in the 0.4.7 release.