Bug 1221430 - [lua] symbol lookup error: /lib64/liblua-5.3.so: undefined symbol: lua_replace
Summary: [lua] symbol lookup error: /lib64/liblua-5.3.so: undefined symbol: lua_replace
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1203321
TreeView+ depends on / blocked
 
Reported: 2015-05-14 02:07 UTC by sensor.wen
Modified: 2015-09-23 00:23 UTC (History)
12 users (show)

Fixed In Version: 7.4.827-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-23 00:23:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fixes the missing, unecessary symbol lookups with lua >= 5.3 (3.46 KB, patch)
2015-06-10 16:22 UTC, Felix Schnizlein
no flags Details | Diff

Description sensor.wen 2015-05-14 02:07:33 UTC
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

Comment 1 Mamoru TASAKA 2015-06-09 01:00:05 UTC
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...

Comment 2 Felix Schnizlein 2015-06-10 16:22:59 UTC
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.

Comment 3 Mamoru TASAKA 2015-06-11 09:01:56 UTC
(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?

Comment 4 Felix Schnizlein 2015-06-11 09:17:23 UTC
Yes, I will post it there too :)

Comment 5 Ankur Sinha (FranciscoD) 2015-06-11 10:21:26 UTC
Confirming that the scratch builds fix the issue. Thanks for working on this, guys :)

Comment 6 sensor.wen 2015-06-15 10:56:02 UTC
(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.

Comment 7 Mamoru TASAKA 2015-06-17 03:51:57 UTC
In case koji scratch build gets deleted, I created copr repo for now:
https://copr.fedoraproject.org/coprs/mtasaka/vim-lua53/

Comment 8 Ting-Wei Lan 2015-06-28 18:18:04 UTC
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?

Comment 9 Mamoru TASAKA 2015-06-28 22:13:33 UTC
(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.

Comment 10 Jan Kurik 2015-07-15 14:09:41 UTC
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

Comment 11 Karsten Hopp 2015-08-20 09:06:34 UTC
7.4.827 with this fix will be available in updates-testing soon

Comment 12 Fedora Update System 2015-09-02 11:47:10 UTC
vim-7.4.827-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14209

Comment 13 Fedora Update System 2015-09-23 00:22:06 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.