Bug#681599: vim/python2.7: symbol lookup error: vim: undefined symbol: init_hashlib

Jakub Wilk jwilk at debian.org
Sun Jul 15 13:07:49 UTC 2012


* Matthias Klose <doko at debian.org>, 2012-07-14, 20:38:
>>Trying to import hashlib crashes the Python interpreter that vim 
>>embeds:
>>
>>$ vim -c 'python import hashlib'
>>vim: symbol lookup error: vim: undefined symbol: init_hashlib
>>
>>
>>This didn't happen with python2.7/2.7.3-1… However, I cannot reproduce 
>>it without vim (e.g.: gdb, which also embeds Python, can import 
>>hashlib without problems), so perhaps it's vim doing something odd.
>
>this is most likely caused by building _hashlib as an extension, not a 
>builtin anymore, to address #680930. rebuilding vim should fix it.

Indeed, rebuild fixed the problem for me.

>however I don't understand why it's only seen in vim, and not gdb.

The interesting part of vim build log is:

gcc-4.6 [...] -I/usr/include/python2.7 -DPYTHON_HOME=\"/usr\" -pthread -o objects/py_config.o /usr/lib/python2.7/config/config.c \
		-I/usr/lib/python2.7/config -DHAVE_CONFIG_H -DNO_MAIN

I couldn't find any documentation about the purpose of config.c... 
Apparently it makes the binary use a bunch of init* symbols.

>libpython2.7 should get a breaks: vim-nox (<= 2:7.3.547-3) after vim is 
>rebuilt.

vim-athena, vim-gnome and vim-gtk (built from the same source) package 
are affected too.

I'll check if other source packages are affected later.

-- 
Jakub Wilk



More information about the pkg-vim-maintainers mailing list