-
-
Notifications
You must be signed in to change notification settings - Fork 782
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
Support to set mirror url to speedup download package #1358
Comments
done |
Are you sure you have updated to the latest dev version? and let me see your pac.lua |
No, I'm using xmake 2.5.3. When I try to build xmake on dev branch, I got the following errors: clean xmake
clean lcurses
clean sv
clean luajit
clean lua-cjson
clean tbox
clean xmake
clean demo
make xmake
make lcurses
make sv
make lua-cjson
make luajit
make tbox
make xmake
make[3]: *** No rule to make target 'sv/src/comp.c', needed by 'sv/src/comp.o'. Stop.
make[2]: *** [/home/wang/Downloads/xmake/core/suffix.mak:305: DEP_PROS_sv_all] Error 2
make[2]: *** Waiting for unfinished jobs....
compile.r lcurses.c
make[3]: *** No rule to make target 'luajit/src/lib_aux.c', needed by 'luajit/src/lib_aux.o'. Stop.
make[2]: *** [/home/wang/Downloads/xmake/core/suffix.mak:305: DEP_PROS_luajit_all] Error 2
make[3]: *** No rule to make target 'lua-cjson/dtoa.c', needed by 'lua-cjson/dtoa.o'. Stop.
make[2]: *** [/home/wang/Downloads/xmake/core/suffix.mak:305: DEP_PROS_lua-cjson_all] Error 2
compile.r engine.c
compile.r hash/sha256.c
compile.r hash/uuid4.c
compile.r io/file_close.c
compile.r io/file_flush.c
make[3]: *** No rule to make target 'tbox/src/tbox/algorithm/binary_find.c', needed by 'tbox/src/tbox/algorithm/binary_find.o'. Stop.
make[2]: *** [/home/wang/Downloads/xmake/core/suffix.mak:305: DEP_PROS_tbox_all] Error 2
compile.r io/file_isatty.c
compile.r io/file_open.c
compile.r io/file_rawfd.c
compile.r io/file_read.c
compile.r io/file_seek.c
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: engine.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: hash/sha256.o] Error 1
compile.r io/file_size.c
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: hash/uuid4.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_close.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_flush.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_isatty.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_open.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_rawfd.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: lcurses.o] Error 1
make[2]: *** [/home/wang/Downloads/xmake/core/suffix.mak:305: DEP_PROS_lcurses_all] Error 2
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_read.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_seek.o] Error 1
make[3]: *** [/home/wang/Downloads/xmake/core/suffix.mak:303: io/file_size.o] Error 1
make[2]: *** [/home/wang/Downloads/xmake/core/suffix.mak:305: DEP_PROS_xmake_all] Error 2
In file included from io/../prefix/prefix.h:27,
from io/../prefix.h:27,
from io/prefix.h:27,
from io/file_size.c:31:
io/../prefix/config.h:28:10: fatal error: tbox/tbox.h: No such file or directory
28 | #include "tbox/tbox.h"
| ^~~~~~~~~~~~~
compilation terminated.
|
only run |
你之前是怎么安装的,安装在哪个目录下,给我看下? 如果之前走 你得走完整更新,切到 ~/local/xmake: xmake update dev
source ~/.xmake/profile 可以自行找下 proxy.lua 对比下 是否跟 dev版本保持一致:https://github.com/xmake-io/xmake/blob/dev/xmake/modules/net/proxy.lua |
内容完全一致。 |
已经更新过去了?还是不行?/home/wang/.xmake/pac.lua 内容贴我下呢。。 |
ENV
pac.luafunction mirror(url)
return url:gsub("github.com", "hub.fastgit.org")
end |
既然已经更新了,按理应该可以的,这个就只能你这自己调下了。。比如到 本地 proxy.lua 下,这个位置,自己加点 print 看下 url 是否被正常替换了,,有没有执行进去 xmake/xmake/modules/net/proxy.lua Lines 82 to 88 in ef17fec
|
可以测试一下这个,github资源下载很快 function mirror(url)
return url:gsub("https://github.com/", "https://github.91chi.fun/https://github.com//")
end |
xmake g --proxy_pac=/xxx/pac.lua
default path:
~/.xmake/pac.lua
Switch to fastgit mirror for github site.
pac.lua
Some github mirror sites
related issues: #854
The text was updated successfully, but these errors were encountered: