我已经厌倦了为Windows维护最新的VIM / GVIM,here是我的OpenSource项目。
但是,由于vim版本高于v7.4.399
(包括v7.4.399),我发现cygwin的编译总是失败。
小于v7.4.399的版本可以使用相同的命令成功编译!
信息失败:
obj/ex_docmd.o:ex_docmd.c:(.text+0x45f): undefined reference to `crypt_get_key'
obj/fileio.o:fileio.c:(.text+0xbb7): undefined reference to `crypt_works_inplace'
obj/fileio.o:fileio.c:(.text+0xbe6): undefined reference to `crypt_encode_alloc'
obj/fileio.o:fileio.c:(.text+0xd69): undefined reference to `crypt_encode_inplace'
obj/fileio.o:fileio.c:(.text+0x69e3): undefined reference to `crypt_free_state'
obj/fileio.o:fileio.c:(.text+0x6c66): undefined reference to `crypt_free_state'
obj/fileio.o:fileio.c:(.text+0x6c97): undefined reference to `crypt_free_key'
obj/fileio.o:fileio.c:(.text+0x716f): undefined reference to `crypt_get_method_nr'
obj/fileio.o:fileio.c:(.text+0x7177): undefined reference to `crypt_get_header_len'
obj/fileio.o:fileio.c:(.text+0x8e48): undefined reference to `crypt_works_inplace'
obj/fileio.o:fileio.c:(.text+0x8e73): undefined reference to `crypt_decode_inplace'
obj/fileio.o:fileio.c:(.text+0x906d): undefined reference to `crypt_method_nr_from_magic'
obj/fileio.o:fileio.c:(.text+0x9098): undefined reference to `crypt_set_cm_option'
obj/fileio.o:fileio.c:(.text+0x90c8): undefined reference to `crypt_create_from_header'
obj/fileio.o:fileio.c:(.text+0x90df): undefined reference to `crypt_set_cm_option'
obj/fileio.o:fileio.c:(.text+0x90e7): undefined reference to `crypt_get_header_len'
obj/fileio.o:fileio.c:(.text+0x9158): undefined reference to `crypt_decode_alloc'
obj/fileio.o:fileio.c:(.text+0x9e3f): undefined reference to `crypt_append_msg'
obj/fileio.o:fileio.c:(.text+0x9ed4): undefined reference to `crypt_get_method_nr'
obj/fileio.o:fileio.c:(.text+0x9edc): undefined reference to `crypt_get_header_len'
obj/fileio.o:fileio.c:(.text+0xa5bc): undefined reference to `crypt_get_key'
obj/fileio.o:fileio.c:(.text+0xca32): undefined reference to `crypt_free_state'
obj/fileio.o:fileio.c:(.text+0xdd15): undefined reference to `crypt_get_method_nr'
obj/fileio.o:fileio.c:(.text+0xdd37): undefined reference to `crypt_create_for_writing'
obj/fileio.o:fileio.c:(.text+0xe2d2): undefined reference to `crypt_append_msg'
/usr/lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/bin/ld: obj/fileio.o: bad reloc address 0x2e8 in section `.rdata'
/usr/lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status
Make_cyg.mak:603: recipe for target 'vim.exe' failed
make: *** [vim.exe] Error 1
编译命令:
make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
我检查了v7-4-398
和v7-4-399
之间的difference,并发现了使用加密更新的内容。然后我在cygwin中添加了libs和其他关于 crypt 的东西,如下所示,但编译仍然无法工作....
我该怎么办才能编译更高版本的vim?
环境:
setup-x86_64.exe
,mintty 1.2-beta1 (x86_64-pc-cygwin)
答案 0 :(得分:1)
您是否尝试使用当前可用的所有修补程序进行编译。我认为Bram Moolenaar(vim的维护者)忘了在其中一个补丁中添加一些文件,后一个补丁中的一个修复了。如果没有发布到vim_dev@vim.org
此报告也在https://groups.google.com/forum/#!topic/vim_dev/D8FyRd0EwlE报告。
补丁7.4.401应该修复它https://groups.google.com/forum/#!topic/vim_dev/q0dbl0_9k9U
答案 1 :(得分:1)
在CentOS 7,Python 2.7.10,64位上再次遇到此问题。
根据this回答,此问题已修复;
export vi_cv_path_python_plibs="-L/<python_config_path> ..."
例如在我的情况下:
export vi_cv_path_python_plibs="-L/usr/local/lib/python2.7/config ..."
编译命令:
$ ./configure --prefix=$HOME/.marslo/myprograms/vim74 --enable-pythoninterp --with-python-config-dir=/usr/local/lib/python2.7/config --with-features=huge --disable-smack --enable-cscope --with-tlib=ncurses --with-compiledby=marslo@china
$ cd src && make first
$ cd .. && make
$ make install