Open firesxp opened 1 month ago
Bot detected the issue body's language is not English, translate it automatically.
Title: Cannot compile using bzip2
本地 Ubuntu 无法复现,可能是包仓库文件有缺失。用 xmake show
找到 packagedir
目录删了,然后再试一次
Bot detected the issue body's language is not English, translate it automatically.
It cannot be reproduced on local Ubuntu. It may be that the package warehouse file is missing. Use
xmake show
to delete allpackagedir
and try again
[Docker] ❯ xmake show The information of xmake: version: 2.9.5+20240925 host: linux/x86_64 programdir: /root/.local/share/xmake programfile: /root/.local/bin/xmake globaldir: .deps/.xmake tmpdir: /tmp/.xmake0/240927 workingdir: /workspaces/learn packagedir: .deps/.xmake/packages packagedir(cache): .deps/.xmake/cache/packages/2409
The information of project: learn plat: linux arch: x86_64 mode: debug buildir: build configdir: /workspaces/learn/.xmake/linux/x86_64 projectdir: /workspaces/learn projectfile: /workspaces/learn/xmake.lua
/workspaces/learn via 🌙 [Docker] ❯ rm -rf .deps/.xmake/cache/packages/2409
⬢ [Docker] ❯ xmake -vD @star-hengxing 还是报上面一样的错误
error: Invalid option: --enable_tools=true error: @programdir/core/sandbox/modules/os.lua:378: execv(/root/.local/bin/xmake f --diagnosis --verbose -y -c --plat=linux --arch=x86_64 --mode=release --kind=static --cxflags=-fPIC --buildir=build_8db6bd46 --enable_tools=true) failed(255) stack traceback: [C]: in function 'error' [@programdir/core/base/os.lua:1004]: [@programdir/core/sandbox/modules/os.lua:378]: [@programdir/core/sandbox/modules/os.lua:291]: in function 'vrunv' [@programdir/modules/package/tools/xmake.lua:511]: in function 'install' [...xmake/repositories/xmake-repo/packages/b/bzip2/xmake.lua:24]: in function 'script' [...dir/modules/private/action/require/impl/utils/filter.lua:114]: in function 'call' [.../modules/private/action/require/impl/actions/install.lua:392]:
=> install bzip2 1.0.8 .. failed error: @programdir/core/main.lua:329: @programdir/core/sandbox/modules/import/core/base/task.lua:65: @programdir/modules/async/runjobs.lua:325: .../modules/private/action/require/impl/actions/install.lua:494: install failed! stack traceback: [C]: in function 'error' [@programdir/core/base/os.lua:1004]: [.../modules/private/action/require/impl/actions/install.lua:494]: in function 'catch' [@programdir/core/sandbox/modules/try.lua:123]: in function 'try' [.../modules/private/action/require/impl/actions/install.lua:361]: [...modules/private/action/require/impl/install_packages.lua:496]: in function 'jobfunc' [@programdir/modules/async/runjobs.lua:241]:
stack traceback: [C]: in function 'error' @programdir/core/base/os.lua:1004: in function 'base/os.raiselevel' (...tail calls...) @programdir/core/main.lua:329: in upvalue 'cotask' @programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>
这个好像和重新指定XMAKE_GLOBALDIR位置有关(通过环境变量将XMAKE_GLOBALDIR设置为当前目录.deps)。还原XMAKE_GLOBALDIR,这个“error: Invalid option: --enable_tools=true”错误消失了
XMAKE_GLOBALDIR设置为当前目录.deps)
不要指向当前目录。.deps/.xmake/cache/packages/2409
里面的 xmake.lua port 构建,可能会被根目录 xmake.lua 干扰
Bot detected the issue body's language is not English, translate it automatically.
XMAKE_GLOBALDIR is set to the current directory.deps)
Do not point to the current directory. The xmake.lua port build in .deps/.xmake/cache/packages/2409
may be interfered by the root directory xmake.lua
之前是指向当前目录的子目录(XMAKE_GLOBALDIR=.deps),如果这也不行的话,XMAKE_GLOBALDIR岂不是没有存在的意义 @waruqi
Bot detected the issue body's language is not English, translate it automatically.
It used to point to a subdirectory of the current directory (XMAKE_GLOBALDIR=.deps). If this doesn't work, wouldn't XMAKE_GLOBALDIR have no meaning? @waruqi
Xmake 版本
xmake v2.9.5+20240925
操作系统版本和架构
Ubuntu 24.04.1 LTS
描述问题
无法编译使用bzip2库
期待的结果
正常编译使用bzip2库
工程配置
xmake.lua配置
源代码
附加信息和错误日志