Closed thanhnguyen2187 closed 4 months ago
Removing ${FAQ}
helps, but I really wonder if it is the case :sweat_smile:
try
xmake create test
cd test
tree
cat xmake.lua
xmake -vD
Here you go
xmake create test
# create test ...
# error: cannot open file: xmake.lua, Not access because it is busy
cd test
tree
# .
# ├── src
# │  └── main.cpp
# └── xmake.lua
cat xmake.lua
# add_rules("mode.debug", "mode.release")
#
# target("${TARGETNAME}")
# set_kind("binary")
# add_files("src/*.cpp")
#
# ${FAQ}
xmake -vD
# error: ./xmake.lua:7: unexpected symbol near '$'
# checking for platform ... linux
# checking for architecture ... x86_64
# checking for gcc ... /nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/gcc
# checkinfo: cannot runv(zig version), No such file or directory
# checking for zig ... no
# checkinfo: cannot runv(zig version), No such file or directory
# checking for zig ... no
# checkinfo: cannot runv(nim --version), No such file or directory
# checking for nim ... no
# checkinfo: cannot runv(nim --version), No such file or directory
# checking for nim ... no
# error: @programdir/core/main.lua:329: @programdir/core/sandbox/modules/import/core/base/task.lua:65: @programdir/core/project/project.lua:956: ./xmake.lua:7: unexpected symbol near '$'
# stack traceback:
# [C]: in function 'error'
# [@programdir/core/base/os.lua:973]:
# [@programdir/core/project/project.lua:956]: in function 'options'
# [...dir/core/sandbox/modules/import/core/project/project.lua:79]: in function 'check_options'
# [@programdir/actions/config/main.lua:367]:
# [C]: in function 'xpcall'
# [@programdir/core/base/utils.lua:275]:
# [@programdir/core/base/task.lua:491]: in function 'run'
# [@programdir/core/sandbox/modules/import/core/base/task.lua:63]: in function 'run'
# [@programdir/actions/build/main.lua:191]:
# [C]: in function 'xpcall'
# [@programdir/core/base/utils.lua:275]:
# [@programdir/core/base/task.lua:491]: in function 'run'
# [@programdir/core/main.lua:327]: in function 'cotask'
# [@programdir/core/base/scheduler.lua:406]:
#
# stack traceback:
# [C]: in function 'error'
# @programdir/core/base/os.lua:973: 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>
error: cannot open file: xmake.lua, Not access because it is busy
I don't know why. Maybe a file read/write permission issue
xmake cannot write xmake.lua and do replace vars
I see. It seems plausible. Do you mean ${FAQ}
of xmake.lua
should be replaced when we run xmake create ...
I see. It seems plausible. Do you mean
${FAQ}
ofxmake.lua
should be replaced when we runxmake create ...
it will create a template xmake.lua file with ${FAQ}
string, then it will be replaced in xmake.lua file. but xmake write file failed.
Thanks. I was wondering if this is related to nix
and the way xmake
is packaged. I made it work by removing ${FAQ}
from xmake.lua
. Let's close this for now.
xmake v2.9.5 should work https://github.com/NixOS/nixpkgs/issues/314313
Xmake Version
2.9.1
Operating System Version and Architecture
Linux nixos 6.9.4 #1-NixOS SMP PREEMPT_DYNAMIC Wed Jun 12 09:39:59 UTC 2024 x86_64 GNU/Linux
Describe Bug
Running
xmake
in a newly created project doesn't workExpected Behavior
The project is built successfully
Project Configuration
Minimal reproduce steps:
Additional Information and Error Logs
Output of
xmake -vD
:Content of
xmake.lua
: