Bug 30739 - luajit: путается в путях
: luajit: путается в путях
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/luajit)
: unstable
: all Linux
: P3 normal
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2015-02-15 01:36 by
Modified: 2015-02-18 17:47 (History)


Attachments
Тестовый lua-скрипт (62 bytes, text/plain)
2015-02-15 05:33, Evgenii Terechkov
no flags Details
тест для lua из libpeas (2.51 KB, application/octet-stream)
2015-02-15 07:44, Yuri N. Sedunov
no flags Details


Note

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


Description From 2015-02-15 01:36:39
С liblua5.1 не работает.
x86_64, lua5.1-alt-compat установлен.

Error failed to load Lua module 'lgi': module 'lgi.corelgilua51' not found:
<------>no field package.preload['lgi.corelgilua51']
<------>no file './lgi/corelgilua51.lua'
<------>no file '/usr/share/luajit-2.0.3/lgi/corelgilua51.lua'
<------>no file '/usr/local/share/lua/5.1/lgi/corelgilua51.lua'
<------>no file '/usr/local/share/lua/5.1/lgi/corelgilua51/init.lua'
<------>no file '/usr/share/lua/5.1/lgi/corelgilua51.lua'
<------>no file '/usr/share/lua/5.1/lgi/corelgilua51/init.lua'
<------>no file './lgi/corelgilua51.so'
<------>no file '/usr/local/lib/lua/5.1/lgi/corelgilua51.so'
<------>no file '/usr/lib/lua/5.1/lgi/corelgilua51.so'
<------>no file '/usr/local/lib/lua/5.1/loadall.so'
<------>no file './lgi.so'
<------>no file '/usr/local/lib/lua/5.1/lgi.so'
<------>no file '/usr/lib/lua/5.1/lgi.so'
<------>no file '/usr/local/lib/lua/5.1/loadall.so'
------- Comment #1 From 2015-02-15 05:33:30 -------
Created an attachment (id=6237) [details]
Тестовый lua-скрипт

УМВР, x86_64. Как воспроизвести? У меня приложенный тестовый скрипт
отрабатывает нормально (ничего не выводит, код возврата 0).

lgi я собирал только для awesome и он там активно используется для работы с
cairo, постоянно использую, проблем не замечено.
------- Comment #2 From 2015-02-15 07:04:59 -------
В хэшере на свежем Сизифе тоже нормально отрабатывает.
------- Comment #3 From 2015-02-15 07:44:24 -------
Created an attachment (id=6238) [details]
тест для lua из libpeas

gcc lua-test.c `pkg-config --cflags luajit` `pkg-config --cflags gio-2.0` -o
lua-test -lglib-2.0 -lgio-2.0 -lluajit-5.1
------- Comment #4 From 2015-02-15 07:46:17 -------
$ ./lua-test 

** (process:4534): WARNING **: Error failed to load Lua module 'lgi': module
'lgi.corelgilua51' not found:
    no field package.preload['lgi.corelgilua51']
    no file './lgi/corelgilua51.lua'
    no file '/usr/share/luajit-2.0.3/lgi/corelgilua51.lua'
    no file '/usr/local/share/lua/5.1/lgi/corelgilua51.lua'
    no file '/usr/local/share/lua/5.1/lgi/corelgilua51/init.lua'
    no file '/usr/share/lua/5.1/lgi/corelgilua51.lua'
    no file '/usr/share/lua/5.1/lgi/corelgilua51/init.lua'
    no file './lgi/corelgilua51.so'
    no file '/usr/local/lib/lua/5.1/lgi/corelgilua51.so'
    no file '/usr/lib/lua/5.1/lgi/corelgilua51.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file './lgi.so'
    no file '/usr/local/lib/lua/5.1/lgi.so'
    no file '/usr/lib/lua/5.1/lgi.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
------- Comment #5 From 2015-02-15 13:13:48 -------
Дело не в lgi и не в lua:
===========================================================
[builder@localhost BUILD]$ gcc lua-test.c `pkg-config --cflags luajit`
`pkg-config --cflags gio-2.0` -o lua-test -lglib-2.0 -lgio-2.0 -lluajit-5.1
[builder@localhost BUILD]$ ./lua-test 

** (process:2281): WARNING **: Error failed to load Lua module 'lgi': module
'lgi' not found:
    no field package.preload['lgi']
    no file './lgi.lua'
    no file '/usr/share/luajit-2.0.3/lgi.lua'
    no file '/usr/local/share/lua/5.1/lgi.lua'
    no file '/usr/local/share/lua/5.1/lgi/init.lua'
    no file '/usr/share/lua/5.1/lgi.lua'
    no file '/usr/share/lua/5.1/lgi/init.lua'
    no file './lgi.so'
    no file '/usr/local/lib/lua/5.1/lgi.so'
    no file '/usr/lib/lua/5.1/lgi.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
[builder@localhost BUILD]$ gcc lua-test.c `pkg-config --cflags lua` `pkg-config
--cflags gio-2.0` -o lua-test -lglib-2.0 -lgio-2.0 -llua
[builder@localhost BUILD]$ ./lua-test 
[builder@localhost BUILD]$ 
===========================================================
(Если доустановить lua5.1-alt-compat, что не является обязательным, то
трассировка покажет, что не найден 'lgi.corelgilua51.so' а не весь модуль lgi)

Т.е. lua5 и luajit собраны с очень разными {c,}path:
===========================================================
[builder@localhost BUILD]$ lua -e 'print(package.path)'|tr ';' '\n'|sort -u
./?.lua
/usr/lib64/lua5/?.lua
/usr/lib64/lua5/?/init.lua
/usr/share/lua5/?.lua
/usr/share/lua5/?/init.lua
[builder@localhost BUILD]$ luajit -e 'print(package.path)'|tr ';' '\n'|sort -u
./?.lua
/usr/local/share/lua/5.1/?.lua
/usr/local/share/lua/5.1/?/init.lua
/usr/share/lua/5.1/?.lua
/usr/share/lua/5.1/?/init.lua
/usr/share/luajit-2.0.3/?.lua
[builder@localhost BUILD]$ lua -e 'print(package.cpath)'|tr ';' '\n'|sort -u
./?.so
/usr/lib64/lua5/?.so
/usr/lib64/lua5/loadall.so
[builder@localhost BUILD]$ luajit -e 'print(package.cpath)'|tr ';' '\n'|sort -u
./?.so
/usr/lib/lua/5.1/?.so
/usr/local/lib/lua/5.1/?.so
/usr/local/lib/lua/5.1/loadall.so
===========================================================
------- Comment #6 From 2015-02-18 14:50:32 -------
Извиняюсь за задержку - уведомления не приходили. Сегодня же постараюсь
посмотреть.
------- Comment #7 From 2015-02-18 17:47:11 -------
luajit-2.0.3-alt5 -> sisyphus:

* Wed Feb 18 2015 Vladimir Didenko <cow@altlinux> 2.0.3-alt5
- use the same path and cpath as plain lua (closes: #30739)