|
10楼#
发布于:2025-11-22 22:36
laolang_cool:又搜了下与 598行有 else 的文件:不是这个,它报的是某个build.txt中的41行有错误 |
|
|
11楼#
发布于:2025-11-22 22:37
laolang_cool:弱弱的问一句,这个 build l64 怎么操作?没有 build 命令回到原帖node /path/to/build.js l64 |
|
|
12楼#
发布于:2025-11-23 08:51
dgod:node /path/to/build.js l64回到原帖应该就是l64编不过去了 # node ./build.js l64 undefined:41 else ^^^^ SyntaxError: Unexpected token 'else' at _build_step (/tmp/YWu/yong-20251121/build.js:598:13) at process.processTicksAndRejections (node:internal/process/task_queues:77:11) Node.js v20.10.0 我查了下 build.txt 的41行的内容,不知能否直接看去可能有问题的地方: === ./im/build.txt === else === ./im/gtk4-im/build.txt === }else { === ./im/qt5-im/build.txt === MOC='/usr/bin/moc'; === ./im/gtk-im/build.txt === } else { === ./llib/build.txt === env('AR:=$(CROSS_COMPILE)ar'); === ./mb/build.txt === } else { === ./install/build.txt === cp('../im/gtk-im/$(BUILD)-gtk2/im-yong.so','yong/$(BUILD)/gtk-im/im-yong-gtk2.so'); === ./config/build.txt === env("LIBS+=-lgdi32 -lcomctl32 -lcomdlg32 -lws2_32 -lole32 -luuid -lwinhttp"); |
|
|
14楼#
发布于:2025-11-23 09:36
dgod:你重新拉一下两个仓库,都有更新回到原帖还是一样的错误,虽然行数又变了…… clang -m64 -I/tmp/YWu/yong-20251123/llib -D_GNU_SOURCE -Wall -g -O2 -fno-plt -fno-strict-aliasing -Wno-format-truncation -fms-extensions -pipe -ffast-math -I/tmp/YWu/yong-20251123/include -I/tmp/YWu/yong-20251123/common -Wno-invalid-source-encoding -Wno-microsoft-anon-tag `pkg-config --cflags gtk+-3.0` -Wno-deprecated-declarations -L/tmp/YWu/yong-20251123/llib/l64 -Wl,--hash-style=sysv -Wl,-rpath,'$ORIGIN' config_ui.o config_main.o translate.o sync.o aes.o update.o config_gtk.o session_curl.o -o ./yong-config -ll `pkg-config --libs gtk+-3.0` -lcurl -ldl /tmp/YWu/yong-20251123/im/build.txt:41 else ^^^^ SyntaxError: Unexpected token 'else' at new Script (node:vm:99:7) at _build_step (/tmp/YWu/yong-20251123/build.js:604:11) at process.processTicksAndRejections (node:internal/process/task_queues:77:11) Node.js v20.10.0 我看这个 build.txt 的 41行是这个函数: function run(target){ cd(target); include("../../rules.txt"); var ARCH=target.split('-')[0]; var GTK=target.split('-')[1]; if("GTK_CFLAGS" in process.env) env("CFLAGS","+=",process.env.GTK_CFLAGS); env("CFLAGS+=`pkg-config --cflags gtk+-4.0` -Wno-unused-const-variable"); else env("CFLAGS+=`pkg-config --cflags gtk+-3.0` -Wno-unused-const-variable"); var OBJS=wildcard(SRCS,function(input){ return input.replace(/\.c$/,'.o'); }); begin(); cc(SRCS,OBJS); end(function(){ env("LDFLAGS+=-L$(TOPDIR)/im/IMdkit/$(BUILD)"); if("GTK_LDFLAGS" in process.env) env("LDFLAGS","+=",process.env.GTK_LDFLAGS); if(support('x11')) env('LIBS+=-lX11 -lXimd'); env("LIBS+=`pkg-config --libs gtk+-4.0`"); else env("LIBS+=`pkg-config --libs gtk+-3.0`"); ld(OBJS,'$(DESTDIR)/yong'); }); } |
|
|
15楼#
发布于:2025-11-23 09:45
laolang_cool:还是一样的错误,虽然行数又变了……不好意思周大,迟点我自己也排查一下,也可能是我这边的编译脚本有关系,我有几句相关的操作: if [ ! -d "/usr/lib/gtk-4.0" ]; then sed -i '/gtk4/d' im/build.txt sed -i "s/,'l\(32\|64\)-gtk4'//" config/build.txt sed -i 's/,"l\(32\|64\)-gtk4"//' config/build.txt sed -i '/gtk4/d' install/build.txt fi if [ "$ARCH" = "x86_64" ]; then sed -i '/l32/d' install/build.txt else sed -i '/l64/d' install/build.txt fi if [ ! -d "/usr/lib/qt/plugins/platforminputcontexts" ]; then sed -i '/qt5/d' im/build.txt fi 可能是有关系的。 |
|
|
17楼#
发布于:2025-11-23 17:44
|
|
|
18楼#
发布于:2025-11-23 17:51
加了一条强行过去了……:
sed -i '/gtk+-4/d' im/build.txt 但又卡在这里: /tmp/YWu/yong-20251123/im/wayland/ybus-wayland.c:21:10: fatal error: 'gtk-layer-shell/gtk-layer-shell.h' file not found #include <gtk-layer-shell/gtk-layer-shell.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. 我查了下,似乎和Wayland有关,有没有个选项可以跳过wayland呢? 我强行删了 wayland 依赖: sed -i "s/,'ybus-wayland\.c'//" im/build.txt sed -i '/wayland/d' im/build.txt 现在还是有一个错误: /usr/bin/ld: ui-draw.o: in function `get_pixel_alpha': /tmp/YWu/yong-20251123/im/ui-draw.c:487: undefined reference to `cairo_image_surface_get_data' /usr/bin/ld: /tmp/YWu/yong-20251123/im/ui-draw.c:488: undefined reference to `cairo_image_surface_get_stride' /usr/bin/ld: ui-draw.o: in function `ui_image_region': /tmp/YWu/yong-20251123/im/ui-draw.c:513: undefined reference to `cairo_region_union_rectangle' /usr/bin/ld: /tmp/YWu/yong-20251123/im/ui-draw.c:530: undefined reference to `cairo_region_union_rectangle' clang-13: error: linker command failed with exit code 1 (use -v to see invocation) |
|
|
19楼#
发布于:2025-11-23 20:25
laolang_cool:加了一条强行过去了……:wayland编译无法跳过 你不会连cairo库都没装吧 |
|