阅读:827回复:38

slackware上的编译打包出错

楼主#
更多 发布于:2025-11-21 21:49
看了下,上次编译还是在 2024年1月,正常编译打包。过了1年大半,再次用 github最新代码编译,过程中出错,不知该怎么解决:
/usr/bin/ld: /usr/bin/../lib64/gcc/x86_64-slackware-linux/11.2.0/../../../../lib64/libcurl.so: undefined reference to `libssh2_session_set_read_timeout'
/usr/bin/ld: /usr/bin/../lib64/gcc/x86_64-slackware-linux/11.2.0/../../../../lib64/libcurl.so: undefined reference to `libssh2_crypto_engine'
/usr/bin/ld: /usr/bin/../lib64/gcc/x86_64-slackware-linux/11.2.0/../../../../lib64/libcurl.so: undefined reference to `libssh2_session_callback_set2'
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
沙发#
发布于:2025-11-24 21:40
帖内置顶  –  dgod  –  2025-11-25 21:48
dgod:需要修改build.txt
LIBS+=`pkg-config --libs gtk+-3.0`
改成
LIBS+=`pkg-config --libs gtk+-3.0 cairo`
回到原帖
尝试把 im/build.txt 和 config/build.txt 都按这样修改了,但还是没啥变化……
板凳#
发布于:2025-11-21 22:18
输入法最新依赖了libcurl(所有linux系统中应该都有),你安装libssh2包了吗?
由于输入法本身没有直接依赖libssh2,所以这不是我的问题。如果你确定安装了libssh2包,则可以考虑在编译yong-config时加入-lssh2或类似的编译参数看看。
地板#
发布于:2025-11-22 08:52
dgod:输入法最新依赖了libcurl(所有linux系统中应该都有),你安装libssh2包了吗?
由于输入法本身没有直接依赖libssh2,所以这不是我的问题。如果你确定安装了libssh2包,则可以考虑在编译yong-config时加入-ls...
回到原帖
谢谢,确实没装libssh2,装了后这个错误就解决了,但后面又遇到了其他错误:
clang -m64 -I/tmp/YWu/yong-20251121/llib -D_GNU_SOURCE -Wall -g -O2 -fno-plt -fno-strict-aliasing -Wno-format-truncation -fms-extensions -pipe -ffast-math -I/tmp/YWu/yong-20251121/include -I/tmp/YWu/yong-20251121/common -Wno-invalid-source-encoding  -Wno-microsoft-anon-tag `pkg-config --cflags gtk+-3.0` -Wno-deprecated-declarations -L/tmp/YWu/yong-20251121/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
undefined:41
        else
        ^^^^

SyntaxError: Unexpected token 'else'
    at _build_step (/tmp/YWu/yong-20251121/build.js:538:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v20.10.0
4楼#
发布于:2025-11-22 09:19
我这编译没问题,你的build.js好像不是最新的
5楼#
发布于:2025-11-22 18:49
dgod:我这编译没问题,你的build.js好像不是最新的回到原帖
确实,我忘了 build.js 是单独下的,不过还是有类似的错误,只是错误位置不一样了,我后面再排查一下了,但感觉这个可能超出我知识能力了……:
clang -m64 -I/tmp/YWu/yong-20251121/llib -D_GNU_SOURCE -Wall -g -O2 -fno-plt -fno-strict-aliasing -Wno-format-truncation -fms-extensions -pipe -ffast-math -I/tmp/YWu/yong-20251121/include -I/tmp/YWu/yong-20251121/common -Wno-invalid-source-encoding  -Wno-microsoft-anon-tag `pkg-config --cflags gtk+-3.0` -Wno-deprecated-declarations -L/tmp/YWu/yong-20251121/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
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
6楼#
发布于:2025-11-22 19:39
像是某个目录里的build.txt文件出问题了,可以逐个目录编译看看
cd xxxx
build l64
7楼#
发布于:2025-11-22 21:52
dgod:像是某个目录里的build.txt文件出问题了,可以逐个目录编译看看
cd xxxx
build l64
回到原帖
弱弱的问一句,这个 build l64 怎么操作?没有 build 命令
8楼#
发布于:2025-11-22 21:59
grep了一下,build.txt里与else有关的行,似乎也没什么异常的:
./build.txt:13: }else if(target=='w64'){
./build.txt:19: }else if(target=='l32'){
./build.txt:27: }else if(target=='l64'){
./build.txt:35: }else if(target=='js'){
./build.txt:46: } else {
./build.txt:88:} else if(!target || target=="all"){
./build.txt:90:} else {
9楼#
发布于:2025-11-22 22:03
又搜了下与 598行有 else 的文件:
./im/ui-common.c:598:   else/* if(InputTheme.line!=2)*/
./im/ui-common.c:598:   else/* if(InputTheme.line!=2)*/
./im/IMdkit/FrameMgr.c:598:        else
上一页
游客

返回顶部