Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu 20.04 编译失败 #312

Closed
ghost opened this issue Jan 26, 2023 · 4 comments
Closed

ubuntu 20.04 编译失败 #312

ghost opened this issue Jan 26, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jan 26, 2023

描述问题

预期行为:编译 nekoray

实际行为:失败。

似乎在 Action 中的编译也是失败的。

如何复现

按照编译教程编译,到了 ninja 命令时报错。

Cmakeninja 都是用 apt 安装的,并且使用了 lib 中的脚本安装了依赖。

日志

[79/79] Linking CXX executable nekoray
FAILED: nekoray 
: && /usr/bin/c++     CMakeFiles/nekoray.dir/nekoray_autogen/mocs_compilation.cpp.o CMakeFiles/nekoray.dir/main/main.cpp.o CMakeFiles/nekoray.dir/main/NekoRay.cpp.o CMakeFiles/nekoray.dir/main/NekoRay_Utils.cpp.o CMakeFiles/nekoray.dir/main/QJS.cpp.o CMakeFiles/nekoray.dir/main/HTTPRequestHelper.cpp.o CMakeFiles/nekoray.dir/3rdparty/base64.cpp.o CMakeFiles/nekoray.dir/3rdparty/qrcodegen.cpp.o CMakeFiles/nekoray.dir/3rdparty/QtExtKeySequenceEdit.cpp.o CMakeFiles/nekoray.dir/qv2ray/v2/ui/LogHighlighter.cpp.o CMakeFiles/nekoray.dir/qv2ray/v2/ui/QvAutoCompleteTextEdit.cpp.o CMakeFiles/nekoray.dir/qv2ray/v2/components/proxy/QvProxyConfigurator.cpp.o CMakeFiles/nekoray.dir/qv2ray/v2/ui/widgets/common/QJsonModel.cpp.o CMakeFiles/nekoray.dir/qv2ray/v2/ui/widgets/editors/w_JsonEditor.cpp.o CMakeFiles/nekoray.dir/qv2ray/v3/components/GeositeReader/GeositeReader.cpp.o CMakeFiles/nekoray.dir/qv2ray/v3/components/GeositeReader/picoproto.cpp.o CMakeFiles/nekoray.dir/rpc/gRPC.cpp.o CMakeFiles/nekoray.dir/db/Database.cpp.o CMakeFiles/nekoray.dir/db/TrafficLooper.cpp.o CMakeFiles/nekoray.dir/db/ProfileFilter.cpp.o CMakeFiles/nekoray.dir/db/ConfigBuilder.cpp.o CMakeFiles/nekoray.dir/fmt/AbstractBean.cpp.o CMakeFiles/nekoray.dir/fmt/Bean2CoreObj_ray.cpp.o CMakeFiles/nekoray.dir/fmt/Bean2CoreObj_box.cpp.o CMakeFiles/nekoray.dir/fmt/Bean2External.cpp.o CMakeFiles/nekoray.dir/fmt/Bean2Link.cpp.o CMakeFiles/nekoray.dir/fmt/InsecureHint.cpp.o CMakeFiles/nekoray.dir/fmt/Link2Bean.cpp.o CMakeFiles/nekoray.dir/sub/GroupUpdater.cpp.o CMakeFiles/nekoray.dir/sys/ExternalProcess.cpp.o CMakeFiles/nekoray.dir/sys/AutoRun.cpp.o CMakeFiles/nekoray.dir/ui/ThemeManager.cpp.o CMakeFiles/nekoray.dir/ui/Icon.cpp.o CMakeFiles/nekoray.dir/ui/mainwindow_grpc.cpp.o CMakeFiles/nekoray.dir/ui/mainwindow.cpp.o CMakeFiles/nekoray.dir/ui/edit/dialog_edit_profile.cpp.o CMakeFiles/nekoray.dir/ui/edit/dialog_edit_group.cpp.o CMakeFiles/nekoray.dir/ui/edit/edit_chain.cpp.o CMakeFiles/nekoray.dir/ui/edit/edit_socks_http.cpp.o CMakeFiles/nekoray.dir/ui/edit/edit_shadowsocks.cpp.o CMakeFiles/nekoray.dir/ui/edit/edit_vmess.cpp.o CMakeFiles/nekoray.dir/ui/edit/edit_trojan_vless.cpp.o CMakeFiles/nekoray.dir/ui/edit/edit_naive.cpp.o CMakeFiles/nekoray.dir/ui/edit/edit_custom.cpp.o CMakeFiles/nekoray.dir/ui/dialog_basic_settings.cpp.o CMakeFiles/nekoray.dir/ui/dialog_manage_groups.cpp.o CMakeFiles/nekoray.dir/ui/dialog_manage_routes.cpp.o CMakeFiles/nekoray.dir/ui/dialog_vpn_settings.cpp.o CMakeFiles/nekoray.dir/ui/dialog_hotkey.cpp.o CMakeFiles/nekoray.dir/ui/widget/ProxyItem.cpp.o CMakeFiles/nekoray.dir/ui/widget/GroupItem.cpp.o CMakeFiles/nekoray.dir/nekoray_autogen/PNK5WDWK6L/qrc_neko.cpp.o CMakeFiles/nekoray.dir/nekoray_autogen/3WNQF2Z6YU/qrc_qss.cpp.o CMakeFiles/nekoray.dir/nekoray_autogen/JU62CA5L7X/qrc_translations.cpp.o  -o nekoray  -Wl,-rpath,/usr/local/Qt/5.15.2/gcc_64/lib  /usr/local/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5.15.2  /usr/local/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5.15.2  3rdparty/qjs/libquickjs.a  libmyproto.a  ../libs/deps/built/lib/libyaml-cpp.a  ../libs/deps/built/lib/libZXing.a  3rdparty/QHotkey/libqhotkey.a  /usr/local/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5.15.2  ../libs/deps/built/lib/libprotobuf.a  -lpthread  /usr/lib/x86_64-linux-gnu/libX11.so  /usr/local/Qt/5.15.2/gcc_64/lib/libQt5X11Extras.so.5.15.2  /usr/local/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5.15.2  /usr/local/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5.15.2 && :
/usr/bin/ld: 3rdparty/qjs/libquickjs.a(quickjs-libc.c.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

如果使用预编译版本,./nekoray 会报错 :

./nekoray: error while loading shared libraries: libQt5Network.so.5: cannot open shared object file: No such file or directory

./launcher 则显示以下内容后,就结束了。

2023/01/26 09:37:39 exe: launcher exe dir: /home/username/下载/nekoray
2023/01/26 09:37:39 Running as launcher
2023/01/26 09:37:39 LD_LIBRARY_PATH=/home/username/下载/nekoray/usr/lib QT_PLUGIN_PATH=/home/username/下载/nekoray/usr/plugins ./nekoray

已使用 sudo apt install libxcb-xinerama0

@arm64v8a
Copy link
Contributor

第一个问题稍后会修复

第二个问题是你没装 Qt

第三个问题缺少日志,建议运行 ./launcher -debug

@arm64v8a arm64v8a added the bug Something isn't working label Jan 26, 2023
@ghost
Copy link
Author

ghost commented Jan 27, 2023

第二个问题是你没装 Qt

我装了 Qt,不然连 cmake -GNinja .. 都无法使用。

$ qmake -v
QMake version 3.1
Using Qt version 5.15.2 in /usr/local/Qt/5.15.2/gcc_64/lib

第三个问题缺少日志,建议运行 ./launcher -debug

2023/01/27 08:57:02 exe: launcher exe dir: /home/username/下载/nekoray
2023/01/27 08:57:02 Running as launcher
2023/01/27 08:57:02 LD_LIBRARY_PATH=/home/username//下载/nekoray/usr/lib QT_PLUGIN_PATH=/home/username//下载/nekoray/usr/plugins ./nekoray
./nekoray: error while loading shared libraries: libpcre2-16.so.0: cannot open shared object file: No such file or directory

@ghost
Copy link
Author

ghost commented Jan 28, 2023

能用预编译的了(./nekoray + ./launcher),缺什么就装什么,只要把大写改成小写:

libQt5Network,就sudo apt install libqt5Network

@ghost
Copy link
Author

ghost commented Jan 28, 2023

编译时,不附加 quicjs 就可以了。

@ghost ghost closed this as completed Jan 28, 2023
@ghost ghost mentioned this issue Apr 1, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant