Description of problem: I want to use neocomplete on vim, it need lua support. but vim for fc22 not support lua(-lua). So i try to recompile vim and add --enable-luainterp=dynamic option. ...... The results can't call lua. Version-Release number of selected component (if applicable): - fedora 22 - lua-5.3.0-2.fc22.x86_64 - vim-enhanced-7.4.728-1.fc22.x86_64 (base fc22) - vim-enhanced-7.4.728-1.fc22.x86_64 (--enable-luainterp=dynamic: not work with lua 5.3, work fine with 5.2) - vim-enhanced-7.4.728-2.fc22.x86_64 (--enable-luainterp: work fine) - copr: https://copr.fedoraproject.org/coprs/mosquito/vim - spec: https://github.com/1dot75cm/repo/blob/master/rpms/SPECS/vim/vim.spec How reproducible: you will add copr repository, and then update vim. Confirm the version for vim (:version). Run ":lua print('Hello world!')" on vim command mode. Steps to Reproduce: Test steps(static link): 1. dnf copr enable mosquito/vim 2. dnf upgrade-to vim-enhanced-2:7.4.728-2.fc22.x86_64 vim-common-2:7.4.728-2.fc22.x86_64 vim-X11-2:7.4.728-2.fc22.x86_64 3. vim -c "lua print('Hello world!')" Hello world (dynamic link): 1. dnf downgrade vim-enhanced-7.4.728-1.fc22.x86_64 vim-common-7.4.728-1.fc22.x86_64 vim-X11-7.4.728-1.fc22.x86_64 2. vim -c "lua print('Hello world!')" E448: Could not load library function lua_replace. Lua library cannot be loaded. 3. Debug mode (If you don't use neocomplete plug-in, add the -D option but to return information confusing.) # LD_DEBUG=files vim -c "print('Hello world!')" ...... 9099: file=liblua-5.3.so [0]; dynamically loaded by vim [0] 9099: file=liblua-5.3.so [0]; generating link map 9099: dynamic: 0x00007f3108a25d80 base: 0x00007f31087ee000 size: 0x0000000000238758 9099: entry: 0x00007f31087f6000 phdr: 0x00007f31087ee040 phnum: 7 9099: 9099: calling init: /lib64/liblua-5.3.so 9099: opening file=/lib64/liblua-5.3.so [0]; direct_opencount=1 9099: /lib64/liblua-5.3.so: error: symbol lookup error: undefined symbol: lua_replace (fatal) 9099: calling fini: /lib64/liblua-5.3.so [0] 9099: 9099: file=/lib64/liblua-5.3.so [0]; destroying link map neocomplete does not work with this version of Vim. It requires Vim 7.3.885 or later with Lua support ("+lua"). Actual results: /lib64/liblua-5.3.so: error: symbol lookup error: undefined symbol: lua_replace (fatal) Expected results: Hello world! Additional info: vim_dev group: https://groups.google.com/forum/#!topic/vim_dev/UpAfD1JEaSI
This is vim's fault. lua 5.3 changed lua_replace from "function" to "define", still vim 7.4.x tries to dlsym() it. And it fails - because it is "define" and no symbol is provided. vim should be fixed not to try dlsym()ing lua_replace. I posted this comment to the above vim_dev group, however my message does not appear yet...
Created attachment 1037355 [details] Fixes the missing, unecessary symbol lookups with lua >= 5.3 I wrote a patch to make it working with lua >= 5.3. I have tested it with a few stupid lua commandline tests and neocomplcache. It seems to work fine.
(In reply to Felix Schnizlein from comment #2) > Created attachment 1037355 [details] > Fixes the missing, unecessary symbol lookups with lua >= 5.3 > > I wrote a patch to make it working with lua >= 5.3. > > I have tested it with a few stupid lua commandline tests and neocomplcache. > It seems to work fine. Seems to be working. Scratch build with the above patch applied here: F-23: http://koji.fedoraproject.org/koji/taskinfo?taskID=10015279 F-22: http://koji.fedoraproject.org/koji/taskinfo?taskID=10015328 (Note: for F-23, 7.4.737 doesn't compile. 7.4.738 to fix the build error is already released and the above F-23 build uses 7.4.738. F-22 uses 7.4.640) Felix, would you post your patch to the above vim_dev group forum?
Yes, I will post it there too :)
Confirming that the scratch builds fix the issue. Thanks for working on this, guys :)
(In reply to Ankur Sinha (FranciscoD) from comment #5) > Confirming that the scratch builds fix the issue. Thanks for working on > this, guys :) +1 It works fine. Thanks for guys.
In case koji scratch build gets deleted, I created copr repo for now: https://copr.fedoraproject.org/coprs/mtasaka/vim-lua53/
Lua 5.3 fix is available in the latest version of vim. I tried vim 7.4.764 and it can successfully load lua. Can we get an update for Fedora 22 and 23?
(In reply to Ting-Wei Lan from comment #8) > Lua 5.3 fix is available in the latest version of vim. I tried vim 7.4.764 > and it can successfully load lua. Can we get an update for Fedora 22 and 23? Seems to be fixed in 7.4.759. https://code.google.com/p/vim/source/detail?r=02466bf84babd8917e717390906aa0ed20c3700b# Felix's patch got applied. Thank you.
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
7.4.827 with this fix will be available in updates-testing soon
vim-7.4.827-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14209
vim-7.4.827-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.