KikoPlayProject / KikoPlay

KikoPlay - NOT ONLY A Full-Featured Danmu Player 不仅仅是全功能弹幕播放器
https://kikoplay.fun
GNU General Public License v3.0
1.63k stars 96 forks source link

Manjaro下编译错误 #97

Closed Alaskra closed 1 month ago

Alaskra commented 1 year ago

操作系统是:5.4.218-2-MANJARO 按照 这里的方法手动编译,编译失败,遇到以下错误:

/usr/include/qt/QtCore/qlinkedlist.h: In member function ‘cleanup’:
/usr/include/qt/QtCore/qlinkedlist.h:80:48: note: declared here
   80 |     Q_CORE_EXPORT static const QLinkedListData shared_null;
      |                                                ^
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function BgmCalendarScript::loadScript(QString const&): error: undefined reference to 'lua_getglobal'
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function BgmCalendarScript::loadScript(QString const&): error: undefined reference to 'lua_settop'
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function BgmCalendarScript::loadScript(QString const&): error: undefined reference to 'lua_getglobal'
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function BgmCalendarScript::loadScript(QString const&): error: undefined reference to 'lua_settop'
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function DanmuScript::loadScript(QString const&): error: undefined reference to 'lua_getglobal'
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function DanmuScript::loadScript(QString const&): error: undefined reference to 'lua_settop'
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function DanmuScript::loadScript(QString const&): error: undefined reference to 'lua_getglobal'
/tmp/ccwTBxFB.ltrans9.ltrans.o:<artificial>:function DanmuScript::loadScript(QString const&): error: undefined reference to 'lua_settop'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpReadNext(lua_State*): error: undefined reference to 'luaL_checkudata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpReadNext(lua_State*): error: undefined reference to 'luaL_argerror'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpEnd(lua_State*): error: undefined reference to 'luaL_checkudata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpEnd(lua_State*): error: undefined reference to 'lua_pushboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpEnd(lua_State*): error: undefined reference to 'luaL_argerror'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpCurPos(lua_State*): error: undefined reference to 'luaL_checkudata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpCurPos(lua_State*): error: undefined reference to 'lua_pushnumber'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpCurPos(lua_State*): error: undefined reference to 'luaL_argerror'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpIsStartNode(lua_State*): error: undefined reference to 'luaL_checkudata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpIsStartNode(lua_State*): error: undefined reference to 'lua_pushboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpIsStartNode(lua_State*): error: undefined reference to 'luaL_argerror'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpCurrentNode(lua_State*): error: undefined reference to 'lua_pushstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::simplifiedTraditionalTrans(lua_State*): error: undefined reference to 'lua_pushnil'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::simplifiedTraditionalTrans(lua_State*): error: undefined reference to 'lua_pushvalue'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_gettop'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_newuserdata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_getfield'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_setmetatable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_type'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_type'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_tolstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_newuserdata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_getfield'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_setmetatable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regex(lua_State*): error: undefined reference to 'lua_tolstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_gettop'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_type'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_pushstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_gettable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_topointer'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_tolstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_type'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::message(lua_State*): error: undefined reference to 'lua_tonumberx'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::htmlparser(lua_State*): error: undefined reference to 'lua_gettop'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::htmlparser(lua_State*): error: undefined reference to 'lua_newuserdata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::htmlparser(lua_State*): error: undefined reference to 'lua_getfield'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::htmlparser(lua_State*): error: undefined reference to 'lua_setmetatable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::htmlparser(lua_State*): error: undefined reference to 'lua_tolstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpAddData(lua_State*): error: undefined reference to 'lua_gettop'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpSeekTo(lua_State*): error: undefined reference to 'lua_tonumberx'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpReadContentText(lua_State*): error: undefined reference to 'lua_pushlstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpCurrentNodeProperty(lua_State*): error: undefined reference to 'lua_pushnil'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpCurrentNodeProperty(lua_State*): error: undefined reference to 'lua_pushstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::table2json(lua_State*): error: undefined reference to 'lua_pushstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::table2json(lua_State*): error: undefined reference to 'lua_pushnil'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::table2json(lua_State*): error: undefined reference to 'lua_pushnil'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_createtable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_pushnumber'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_rawset'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_pushboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_rawset'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_rawset'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_pushlstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_rawset'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_createtable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_pushlstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::pushNetworkReply(lua_State*, Network::Reply const&): error: undefined reference to 'lua_pushlstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::writeSetting(lua_State*): error: undefined reference to 'lua_gettable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::writeSetting(lua_State*): error: undefined reference to 'lua_topointer'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::envInfo(lua_State*): error: undefined reference to 'lua_createtable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::execute(lua_State*): error: undefined reference to 'lua_toboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::execute(lua_State*): error: undefined reference to 'lua_pushboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::execute(lua_State*): error: undefined reference to 'lua_pushinteger'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::hashData(lua_State*): error: undefined reference to 'lua_toboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::hashData(lua_State*): error: undefined reference to 'lua_tonumberx'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::checkRegex(lua_State*, bool): error: undefined reference to 'luaL_error'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexFind(lua_State*): error: undefined reference to 'luaL_error'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexFind(lua_State*): error: undefined reference to 'lua_pushinteger'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexFind(lua_State*): error: undefined reference to 'lua_pushinteger'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexFind(lua_State*): error: undefined reference to 'lua_tonumberx'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexMatch(lua_State*): error: undefined reference to 'luaL_error'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexMatch(lua_State*): error: undefined reference to 'lua_newuserdata'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexMatch(lua_State*): error: undefined reference to 'lua_getfield'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexMatch(lua_State*): error: undefined reference to 'lua_setmetatable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexMatch(lua_State*): error: undefined reference to 'lua_pushcclosure'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexSub(lua_State*): error: undefined reference to 'luaL_error'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexSub(lua_State*): error: undefined reference to 'lua_pushvalue'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Regex::regexSub(lua_State*): error: undefined reference to 'lua_pcallk'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::HtmlParser::hpReadContentUntil(lua_State*): error: undefined reference to 'lua_toboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::json2table(lua_State*): error: undefined reference to 'lua_createtable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::logger(lua_State*): error: undefined reference to 'lua_gettable'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::logger(lua_State*): error: undefined reference to 'lua_topointer'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::logger(lua_State*): error: undefined reference to 'lua_pushvalue'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::LuaUtil::logger(lua_State*): error: undefined reference to 'lua_pushvalue'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::httpGet(lua_State*): error: undefined reference to 'luaL_checklstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::httpGet(lua_State*): error: undefined reference to 'lua_toboolean'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::httpPost(lua_State*): error: undefined reference to 'luaL_checklstring'
/tmp/ccwTBxFB.ltrans10.ltrans.o:<artificial>:function LuaModule::Net::httpGetBatch(lua_State*): error: undefined reference to 'lua_rawseti'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function PlaygroundScript::print(lua_State*): error: undefined reference to 'lua_gettable'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function PlaygroundScript::print(lua_State*): error: undefined reference to 'lua_topointer'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function PlaygroundScript::print(lua_State*): error: undefined reference to 'lua_callk'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function LuaModule::ModuleBase::registerMemberFuncs(char const*, luaL_Reg const*): error: undefined reference to 'luaL_newmetatable'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function LuaModule::ModuleBase::registerMemberFuncs(char const*, luaL_Reg const*): error: undefined reference to 'luaL_setfuncs'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::ScriptBase(): error: undefined reference to 'luaL_newstate'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::ScriptBase(): error: undefined reference to 'luaL_openlibs'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::ScriptBase(): error: undefined reference to 'lua_pushlightuserdata'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::ScriptBase(): error: undefined reference to 'lua_settable'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function LuaModule::buildLuaItemTree(lua_State*, LuaItem*, QSet<unsigned long long>&): error: undefined reference to 'lua_next'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::~ScriptBase(): error: undefined reference to 'lua_close'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::pushValue(lua_State*, QVariant const&): error: undefined reference to 'lua_rawseti'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::setTable(char const*, QVariant const&, QVariant const&): error: undefined reference to 'lua_settable'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::getValue(lua_State*, bool): error: undefined reference to 'lua_pushinteger'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::getValue(lua_State*, bool): error: undefined reference to 'lua_next'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::getValue(lua_State*, bool): error: undefined reference to 'lua_next'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::getValue(lua_State*, bool): error: undefined reference to 'lua_typename'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::getValue(lua_State*, bool): error: undefined reference to 'lua_next'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::loadScript(QString const&): error: undefined reference to 'lua_setglobal'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::loadScript(QString const&): error: undefined reference to 'lua_settable'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::call(char const*, QList<QVariant> const&, int, QString&): error: undefined reference to 'lua_pcallk'
/tmp/ccwTBxFB.ltrans11.ltrans.o:<artificial>:function ScriptBase::pushValue(lua_State*, QVariant const&): error: undefined reference to 'lua_pushnumber'
/tmp/ccwTBxFB.ltrans12.ltrans.o:<artificial>:function ScriptBase::loadScriptStr(QString const&): error: undefined reference to 'luaL_loadstring'
/tmp/ccwTBxFB.ltrans12.ltrans.o:<artificial>:function ScriptBase::loadScriptStr(QString const&): error: undefined reference to 'lua_pcallk'
/tmp/ccwTBxFB.ltrans18.ltrans.o:<artificial>:function ScriptPlayground::ScriptPlayground(QWidget*): error: undefined reference to 'luaL_setfuncs'
/tmp/ccwTBxFB.ltrans18.ltrans.o:<artificial>:function ScriptPlayground::ScriptPlayground(QWidget*): error: undefined reference to 'lua_setglobal'
/tmp/ccwTBxFB.ltrans20.ltrans.o:<artificial>:vtable for ScriptSettingModel: error: undefined reference to 'ScriptSettingModel::index(int, int, QModelIndex const&) const'
/tmp/ccwTBxFB.ltrans20.ltrans.o:<artificial>:vtable for ScriptSettingModel: error: undefined reference to 'ScriptSettingModel::parent(QModelIndex const&) const'
/tmp/ccwTBxFB.ltrans20.ltrans.o:<artificial>:vtable for ScriptSettingModel: error: undefined reference to 'ScriptSettingModel::rowCount(QModelIndex const&) const'
/tmp/ccwTBxFB.ltrans56.ltrans.o:<artificial>:function LuaModule::ModuleBase::registerFuncs(char const*, luaL_Reg const*) [clone .constprop.0]: error: undefined reference to 'luaL_setfuncs'
/tmp/ccwTBxFB.ltrans56.ltrans.o:<artificial>:function LuaModule::ModuleBase::registerFuncs(char const*, luaL_Reg const*) [clone .constprop.0]: error: undefined reference to 'lua_setglobal'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1123: KikoPlay] Error 1
Protostars commented 1 year ago

那个文档里ArchLinux上的安装方式比较旧了,看起来是lua相关的一些头文件没有找到,可以直接用目前master最新代码编译试试,或者试试0.8.2,我记得这个版本之前有人还是可以在ArchLinux上编译用的

Alaskra commented 1 year ago

最新master编译就是报的上面的错误,使用0.8.2虽然能编译通过,但会段错误,应该是和 #44 一样的。 我看KikoPlay动态链接了liblua5.3.so.5.3和libluajit-5.1.so.2,怀疑这两个库冲突了。 另外,从mpv的FAQ中看到他们不会支持Lua5.3: image

Protostars commented 1 year ago

最新的代码是希望KikoPlay静态链接lua,可以从build.pro开始构建

Alaskra commented 1 year ago

我使用命令:

qmake build.pro
make

有关lua的错误是没了,但还是有以下报错

/usr/include/qt/QtCore/qlinkedlist.h:80:48: note: declared here
   80 |     Q_CORE_EXPORT static const QLinkedListData shared_null;
      |                                                ^
/tmp/ccFH9QZM.ltrans20.ltrans.o:<artificial>:vtable for ScriptSettingModel: error: undefined reference to 'ScriptSettingModel::index(int, int, QModelIndex const&) const'
/tmp/ccFH9QZM.ltrans20.ltrans.o:<artificial>:vtable for ScriptSettingModel: error: undefined reference to 'ScriptSettingModel::parent(QModelIndex const&) const'
/tmp/ccFH9QZM.ltrans20.ltrans.o:<artificial>:vtable for ScriptSettingModel: error: undefined reference to 'ScriptSettingModel::rowCount(QModelIndex const&) const'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.KikoPlay:1123: KikoPlay] Error 1
make[1]: Leaving directory '/home/alaskra/Downloads/KikoPlay'
make: *** [Makefile:45: sub-KikoPlay-pro-make_first] Error 2

不太懂qmake,之前直接执行qmake是相当于qmake KikoPlay.pro

Protostars commented 1 year ago

中间文件全清空再重新qmake试试,这个看着是缺了moc预处理

Alaskra commented 1 year ago

没用,还是一样报错

Protostars commented 1 year ago

问题应该还是和moc处理相关,不过因为我很久没有在linux上编译,不太清楚具体原因

Protostars commented 1 year ago

顺便,和这个是不是很像

Alaskra commented 1 year ago

是的,测试过后发现是这个commit引起的,原因见这里说:

如果在类体外定义inline函数,则心须将类定义和成员函数的定义都放在同一个头文件中,否则编译时无法进行置换。

我把Script/scriptsettingmodel.h内这三个函数inline关键字删除,确实编译通过了。

还有另外一个问题,虽然编译可以通过,但是运行还是发生coredump.

Protostars commented 1 year ago

具体是哪里coredump了呀,是这个

Alaskra commented 1 year ago

是的,一样的错误

Protostars commented 1 year ago

应该还是lua的问题,可以尝试静态链接KikoPlay用的lua5.3

Alaskra commented 1 year ago

qmake文件已经指定了是静态连接的lua5.3了呀。 还有,这个是ldd ./KikoPlay的输出:

    linux-vdso.so.1 (0x00007ffc047fe000)
    libmpv.so.1 => /usr/lib/libmpv.so.1 (0x00007f20f5ed6000)
    libz.so.1 => /usr/lib/libz.so.1 (0x00007f20f5ebc000)
    libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0x00007f20f5802000)
    libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f20f519b000)
    libQt5Sql.so.5 => /usr/lib/libQt5Sql.so.5 (0x00007f20f515b000)
    libQt5Network.so.5 => /usr/lib/libQt5Network.so.5 (0x00007f20f4fea000)
    libQt5Concurrent.so.5 => /usr/lib/libQt5Concurrent.so.5 (0x00007f20f4fe0000)
    libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f20f4abf000)
    libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f20f4a39000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f20f4802000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007f20f471a000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f20f46fa000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007f20f4511000)
    libasound.so.2 => /usr/lib/libasound.so.2 (0x00007f20f4423000)
    libcdio_paranoia.so.2 => /usr/lib/libcdio_paranoia.so.2 (0x00007f20f4419000)
    libcdio_cdda.so.2 => /usr/lib/libcdio_cdda.so.2 (0x00007f20f440f000)
    libcdio.so.19 => /usr/lib/libcdio.so.19 (0x00007f20f43e4000)
    libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f20f43ce000)
    libdvdnav.so.4 => /usr/lib/libdvdnav.so.4 (0x00007f20f43b4000)
    libdvdread.so.8 => /usr/lib/libdvdread.so.8 (0x00007f20f4392000)
    libEGL.so.1 => /usr/lib/libEGL.so.1 (0x00007f20f4380000)
    libavutil.so.57 => /usr/lib/libavutil.so.57 (0x00007f20f4177000)
    libavcodec.so.59 => /usr/lib/libavcodec.so.59 (0x00007f20f2d06000)
    libavformat.so.59 => /usr/lib/libavformat.so.59 (0x00007f20f2a5d000)
    libswscale.so.6 => /usr/lib/libswscale.so.6 (0x00007f20f29ba000)
    libavfilter.so.8 => /usr/lib/libavfilter.so.8 (0x00007f20f24e0000)
    libswresample.so.4 => /usr/lib/libswresample.so.4 (0x00007f20f24c0000)
    libgbm.so.1 => /usr/lib/libgbm.so.1 (0x00007f20f24af000)
    libwayland-egl.so.1 => /usr/lib/libwayland-egl.so.1 (0x00007f20f24aa000)
    libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x00007f20f2498000)
    libjack.so.0 => /usr/lib/libjack.so.0 (0x00007f20f2441000)
    libmujs.so => /usr/lib/libmujs.so (0x00007f20f23f4000)
    libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f20f2371000)
    liblcms2.so.2 => /usr/lib/liblcms2.so.2 (0x00007f20f230b000)
    libarchive.so.13 => /usr/lib/libarchive.so.13 (0x00007f20f2244000)
    libass.so.9 => /usr/lib/libass.so.9 (0x00007f20f220c000)
    libavdevice.so.59 => /usr/lib/libavdevice.so.59 (0x00007f20f21df000)
    libbluray.so.2 => /usr/lib/libbluray.so.2 (0x00007f20f2182000)
    libplacebo.so.208 => /usr/lib/libplacebo.so.208 (0x00007f20f20d7000)
    libluajit-5.1.so.2 => /usr/lib/libluajit-5.1.so.2 (0x00007f20f2047000)
    libpulse.so.0 => /usr/lib/libpulse.so.0 (0x00007f20f1ff2000)
    librubberband.so.2 => /usr/lib/librubberband.so.2 (0x00007f20f1fa3000)
    libfftw3.so.3 => /usr/lib/libfftw3.so.3 (0x00007f20f1d68000)
    libsamplerate.so.0 => /usr/lib/libsamplerate.so.0 (0x00007f20f1bf8000)
    libshaderc_shared.so.1 => /usr/lib/libshaderc_shared.so.1 (0x00007f20f1bdc000)
    libuchardet.so.0 => /usr/lib/libuchardet.so.0 (0x00007f20f1baa000)
    libva.so.2 => /usr/lib/libva.so.2 (0x00007f20f1b7a000)
    libva-drm.so.2 => /usr/lib/libva-drm.so.2 (0x00007f20f1b75000)
    libva-wayland.so.2 => /usr/lib/libva-wayland.so.2 (0x00007f20f1b6d000)
    libva-x11.so.2 => /usr/lib/libva-x11.so.2 (0x00007f20f1b65000)
    libvdpau.so.1 => /usr/lib/libvdpau.so.1 (0x00007f20f1b60000)
    libvulkan.so.1 => /usr/lib/libvulkan.so.1 (0x00007f20f1ae3000)
    libwayland-cursor.so.0 => /usr/lib/libwayland-cursor.so.0 (0x00007f20f1ad9000)
    libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f20f1a92000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f20f194d000)
    libXss.so.1 => /usr/lib/libXss.so.1 (0x00007f20f1948000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f20f1933000)
    libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f20f192e000)
    libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f20f1921000)
    libXv.so.1 => /usr/lib/libXv.so.1 (0x00007f20f1919000)
    libzimg.so.2 => /usr/lib/libzimg.so.2 (0x00007f20f184b000)
    libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f20f1812000)
    libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f20f1726000)
    libmd4c.so.0 => /usr/lib/libmd4c.so.0 (0x00007f20f1710000)
    libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f20f16bc000)
    libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f20f1625000)
    libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f20f1345000)
    libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f20f1268000)
    libdouble-conversion.so.3 => /usr/lib/libdouble-conversion.so.3 (0x00007f20f1252000)
    libicui18n.so.72 => /usr/lib/libicui18n.so.72 (0x00007f20f0f21000)
    libicuuc.so.72 => /usr/lib/libicuuc.so.72 (0x00007f20f0d20000)
    libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0x00007f20f0c90000)
    libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f20f0be7000)
    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f20f0aa8000)
    /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f20f6517000)
    libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f20f09f0000)
    libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007f20f09be000)
    librt.so.1 => /usr/lib/librt.so.1 (0x00007f20f09b7000)
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f20f09b2000)
    libmfx.so.1 => /usr/lib/libmfx.so.1 (0x00007f20f09a4000)
    libOpenCL.so.1 => /usr/lib/libOpenCL.so.1 (0x00007f20f0976000)
    libvpx.so.7 => /usr/lib/libvpx.so.7 (0x00007f20f06b1000)
    libwebpmux.so.3 => /usr/lib/libwebpmux.so.3 (0x00007f20f06a2000)
    libwebp.so.7 => /usr/lib/libwebp.so.7 (0x00007f20f0631000)
    liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f20f0607000)
    libdav1d.so.6 => /usr/lib/libdav1d.so.6 (0x00007f20f043e000)
    libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007f20f0428000)
    librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0x00007f20efb69000)
    libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f20efb06000)
    libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f20ef9e2000)
    libaom.so.3 => /usr/lib/libaom.so.3 (0x00007f20ef125000)
    libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007f20ef116000)
    libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007f20ef09e000)
    libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007f20ef075000)
    libopenjp2.so.7 => /usr/lib/libopenjp2.so.7 (0x00007f20ef007000)
    libopus.so.0 => /usr/lib/libopus.so.0 (0x00007f20eefad000)
    librav1e.so.0 => /usr/lib/librav1e.so.0 (0x00007f20eed1d000)
    libspeex.so.1 => /usr/lib/libspeex.so.1 (0x00007f20eed00000)
    libSvtAv1Enc.so.1 => /usr/lib/libSvtAv1Enc.so.1 (0x00007f20e6494000)
    libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x00007f20e645b000)
    libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x00007f20e6440000)
    libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007f20e6412000)
    libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x00007f20e6367000)
    libx264.so.164 => /usr/lib/libx264.so.164 (0x00007f20e60a0000)
    libx265.so.199 => /usr/lib/libx265.so.199 (0x00007f20e4dcf000)
    libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007f20e4cc0000)
    libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f20e4b56000)
    libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f20e4b43000)
    libmodplug.so.1 => /usr/lib/libmodplug.so.1 (0x00007f20e49b3000)
    libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f20e4910000)
    libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007f20e470d000)
    libsrt.so.1.5 => /usr/lib/libsrt.so.1.5 (0x00007f20e4643000)
    libssh.so.4 => /usr/lib/libssh.so.4 (0x00007f20e45d7000)
    libpostproc.so.56 => /usr/lib/libpostproc.so.56 (0x00007f20e45b6000)
    libbs2b.so.0 => /usr/lib/libbs2b.so.0 (0x00007f20e45af000)
    libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007f20e458f000)
    libvmaf.so.1 => /usr/lib/libvmaf.so.1 (0x00007f20e448f000)
    libvidstab.so.1.1 => /usr/lib/libvidstab.so.1.1 (0x00007f20e4478000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f20e442a000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f20e435b000)
    libsoxr.so.0 => /usr/lib/libsoxr.so.0 (0x00007f20e42d9000)
    libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0x00007f20e42c3000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f20e4296000)
    libffi.so.8 => /usr/lib/libffi.so.8 (0x00007f20e428b000)
    libdb-5.3.so => /usr/lib/libdb-5.3.so (0x00007f20e40cc000)
    libacl.so.1 => /usr/lib/libacl.so.1 (0x00007f20e40c2000)
    liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f20e40a0000)
    libraw1394.so.11 => /usr/lib/libraw1394.so.11 (0x00007f20e408c000)
    libavc1394.so.0 => /usr/lib/libavc1394.so.0 (0x00007f20e4085000)
    librom1394.so.0 => /usr/lib/librom1394.so.0 (0x00007f20e407f000)
    libiec61883.so.0 => /usr/lib/libiec61883.so.0 (0x00007f20e4071000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f20e4046000)
    libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f20e4041000)
    libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0x00007f20e4039000)
    libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007f20e402f000)
    libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0x00007f20e3e6b000)
    libv4l2.so.0 => /usr/lib/libv4l2.so.0 (0x00007f20e3e5b000)
    libunwind.so.8 => /usr/lib/libunwind.so.8 (0x00007f20e3e41000)
    libglslang.so.11 => /usr/lib/libglslang.so.11 (0x00007f20e3bdb000)
    libSPIRV.so => /usr/lib/libSPIRV.so (0x00007f20e31ff000)
    libepoxy.so.0 => /usr/lib/libepoxy.so.0 (0x00007f20e30cb000)
    libpulsecommon-16.1.so => /usr/lib/pulseaudio/libpulsecommon-16.1.so (0x00007f20e3043000)
    libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f20e2ffb000)
    libSPIRV-Tools.so => /usr/lib/libSPIRV-Tools.so (0x00007f20e2ea3000)
    libSPIRV-Tools-opt.so => /usr/lib/libSPIRV-Tools-opt.so (0x00007f20e2ca1000)
    libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f20e2c98000)
    libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f20e2c8b000)
    libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f20e2c69000)
    libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f20e2b8f000)
    libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f20e2b61000)
    libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f20e2b5b000)
    libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f20e2b4d000)
    libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0x00007f20e2b46000)
    libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f20e2b34000)
    libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f20e2b26000)
    libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f20e29dd000)
    libicudata.so.72 => /usr/lib/libicudata.so.72 (0x00007f20e0c0d000)
    libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f20e0b72000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f20e0b6d000)
    libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007f20e0b5f000)
    libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f20e0b19000)
    libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f20e094b000)
    libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f20e093b000)
    libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f20e08d3000)
    libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f20e08c3000)
    libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f20e0814000)
    libogg.so.0 => /usr/lib/libogg.so.0 (0x00007f20e0809000)
    libmvec.so.1 => /usr/lib/libmvec.so.1 (0x00007f20e070f000)
    libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f20e05dc000)
    libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007f20e0537000)
    libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f20e0527000)
    libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f20e0505000)
    libunistring.so.2 => /usr/lib/libunistring.so.2 (0x00007f20e0359000)
    libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f20e0342000)
    libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007f20e02ee000)
    libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007f20e02a5000)
    libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f20e025a000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f20e0255000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f20e024d000)
    libv4lconvert.so.0 => /usr/lib/libv4lconvert.so.0 (0x00007f20e01d3000)
    libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0x00007f20e0150000)
    libasyncns.so.0 => /usr/lib/libasyncns.so.0 (0x00007f20e0148000)
    libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f20e0122000)
    libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f20e011b000)
    libtiff.so.5 => /usr/lib/libtiff.so.5 (0x00007f20e0086000)
    libmount.so.1 => /usr/lib/libmount.so.1 (0x00007f20e0040000)
    libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f20e0028000)
    libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f20e001d000)
    libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f20dfffa000)
    libFLAC.so.12 => /usr/lib/libFLAC.so.12 (0x00007f20dffb7000)
    libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007f20dff7c000)
    libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f20dff72000)

这里面并没有lua5.3的动态链接,说明5.3已经被静态链接了。这里的luajit5.1是mpv的动态链接库。

Alaskra commented 1 year ago

@Protostars 我想尝试一下构建一个包含libmpv和lua的qt项目,更好的定位问题。请问你支持lua的方式是在哪里有教程吗

Protostars commented 1 year ago

只是参考了一些示例,没用什么教程

tickscn commented 1 year ago

@Protostars 代码库 lib/x64/linux 中的 liblua53.a 是一个软链接。我把他换成 Script/lua 中编译出来的 liblua53.a 之后可以编译通过,但是运行就是segmentation fault.。 死马当做活马医,我尝试用 Script/lua 中的CMakeLists.txt 生成了Makefile, 使用这个编译出来静态库再去编译 kikoplay,最后就可以运行了。我对C++ 不是很懂,不知道是不是 lua.pro 里面少了什么东西