actboy168 / luamake Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Here is such a error:
8/96] Compile C++ build/obj/source_bee/subprocess_posix.obj
FAILED: build/obj/source_bee/subprocess_posix.obj
clang -MMD -MT build/obj/source_bee/subprocess_posix.obj -MF build/obj/source_bee/subprocess_posix.obj.d -std=c++17 -O2 -Wall -Werror -fvisibility=hidden -mmacosx-version-min=10.15 -I3rd/bee.lua -DNDEBUG -Wunguarded-availability -o build/obj/source_bee/subprocess_posix.obj -c 3rd/bee.lua/bee/subprocess/subprocess_posix.cpp
3rd/bee.lua/bee/subprocess/subprocess_posix.cpp:231:13: error: use of undeclared identifier 'posix_spawn_file_actions_addchdir_np'; did you mean 'posix_spawn_file_actions_addinherit_np'?
posix_spawn_file_actions_addchdir_np(&spawnfile_, cwd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
posix_spawn_file_actions_addinherit_np
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/spawn.h:174:5: note: 'posix_spawn_file_actions_addinherit_np' declared here
int posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *,
^
3rd/bee.lua/bee/subprocess/subprocess_posix.cpp:231:63: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const char *'
posix_spawn_file_actions_addchdir_np(&spawnfile_, cwd);
^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/spawn.h:175:6: note: passing argument to parameter here
int) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
^
2 errors generated.
[9/96] Compile C++ build/obj/source_bee/format.obj
[10/96] Compile C++ build/obj/source_bee/file_handle.obj
ninja: build stopped: subcommand failed.
-mmacosx-version-min=10.15 and ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED == 101500
These options cause a compilation error by changing the source values to 101600 and replacing min_macos_version with 10.13, compile succeeded.
ent 编译的时候无法区分CPU和版本?
在 PowerShell 下,用 MinGW 工具链编译,这一步的单元测试不通过,看起来实际上读到的是脏值
PS E:\src\luamake> ninja -f .\compile\ninja\mingw.ninja
[0/1] build\mingw\bin\bootstrap.exe 3rd\bee.lua\test\test.lua
OS: Windows
Arch: x86_64
Compiler: GCC 10.3.0
CRT: libstdc++ 20210408
DEBUG: false
......................................................................F...................................
Failed tests:
-------------
1) subprocess.test_env
3rd\bee.lua\test/test_subprocess.lua:265: expected: 0, actual: 3221225781
stack traceback:
3rd\bee.lua\test/test_subprocess.lua:265: in local 'test_env'
3rd\bee.lua\test/test_subprocess.lua:280: in upvalue 'subprocess.test_env'
Ran 106 tests in 10.960 seconds, 105 successes, 1 failures
FAILED: build/mingw/_/test
build\mingw\bin\bootstrap.exe 3rd\bee.lua\test\test.lua
ninja: build stopped: subcommand failed.
请问这种情况可能是什么原因?
F:\projects_3rd\luamake>ninja -f build\msvc\compile.ninja
[59/66] Link Exe build/msvc/bin/luamake.exe
正在创建库 build/msvc/obj/luamake.lib 和对象 build/msvc/obj/luamake.exp
正在生成代码
已完成代码的生成
[60/66] build/msvc/bin/luamake.exe 3rd/bee.lua/test/test.lua
OS: Windows
Arch: x86_64
Compiler: MSVC 191627045.0
CRT: MSVC STL 201809L
DEBUG: false
......................................F.F..............................................................
Failed tests:
-------------
1) filesystem.test_copy_file
exists: 拒绝访问。: "temp2.txt"
stack traceback:
3rd/bee.lua/test/test_filesystem.lua:551: in local 'copy_file_ok'
3rd/bee.lua/test/test_filesystem.lua:569: in upvalue 'filesystem.test_copy_file'
2) filesystem.test_pairs
create_directories: 拒绝访问。: "temp/temp"
stack traceback:
3rd/bee.lua/test/test_filesystem.lua:671: in upvalue 'filesystem.test_pairs'
Ran 109 tests in 9.812 seconds, 107 successes, 2 failures
[64/66] Link Dll build/msvc/bin/lua54.dll
正在创建库 build/msvc/obj/lua54/lua54.lib 和对象 build/msvc/obj/lua54/lua54.exp
正在生成代码
已完成代码的生成
[65/66] Copy build/msvc/bin/lua54.dll tools/lua54.dll
FAILED: build/msvc/_/test
build/msvc/bin/luamake.exe 3rd/bee.lua/test/test.lua
ninja: build stopped: subcommand failed.
F:\projects_3rd\luamake>
lm:executable("luajit/lua") {
rootdir = luajitDir,
bindir = bindir,
objdeps = {
"lj_vm.obj",
"lj_folddef.h",
"lj_bcdef.h",
"lj_ffdef.h",
"lj_libdef.h",
"lj_recdef.h",
},
deps = "lj_str_hash.c",
sources = {
"luajit.c",
"lj_*.c",
"lib_*.c",
"!lj_str_hash.c",
lm.bindir .. "/lj_vm.obj",
},
includes = {
".",
lm.bindir
},
}
更新luamake之后我发现编译的时候没有被转换到sources列表中
local sources = get_sources(rootdir, attribute.sources)
sources中已经没有这个值了
在 https://github.com/actboy168/luamake/blob/3ebd3db3b88aee8dae8043b9f762022b0e98cc9f/compile/ninja/linux.ninja
中三行涉及 -lstdc++
的代码: command = $cc --shared $in -o $out -lpthread -Wl,-Bstatic -lstdc++ $ -Wl,-Bdynamic -static-libgcc -s
会导致构建失败:
[57/59] Link Dll build/linux/bin/bee.so
FAILED: build/linux/bin/bee.so
gcc --shared build/linux/obj/bee/lua-seri.obj build/linux/obj/bee/error.obj build/linux/obj/bee/fsevent_linux.obj build/linux/obj/bee/endpoint.obj build/linux/obj/bee/socket.obj build/linux/obj/bee/format.obj build/linux/obj/bee/os.obj build/linux/obj/bee/subprocess_posix.obj build/linux/obj/bee/file_helper.obj build/linux/obj/bee/path_helper.obj build/linux/obj/bee/lua_embed.obj build/linux/obj/bee/lua_filesystem.obj build/linux/obj/bee/lua_filewatch.obj build/linux/obj/bee/lua_platform.obj build/linux/obj/bee/lua_serialization.obj build/linux/obj/bee/lua_socket.obj build/linux/obj/bee/lua_subprocess.obj build/linux/obj/bee/lua_thread.obj build/linux/obj/bee/lua_time.obj -o build/linux/bin/bee.so -lpthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
/usr/bin/ld: 找不到 -lstdc++
collect2: 错误:ld 返回 1
ninja: build stopped: subcommand failed.
目前已知的办法是将 $cc
更换为 c++
并移除 -lstdc++
选项
上述编译指令在单文件中测试成功,但是这里不清楚为什么失败,我并没有手写 ninja 文件的经验
Can we get a versioned release tarball, so distro maintainers don't need to depend on the tip of the default branch? Would appreciate if it also included the required submodules as a bundle.
Thanks :)
Since BSD support has been added. Building on FreeBSD 13-RELEASE fails for me with the following error message:
[0/1] Run test.
ld-elf.so.1: /usr/local/lib/gcc10/libstdc++.so.6: version GLIBCXX_3.4.29 required by /usr/home/ap/Downloads/sourcecode/luamake/build/freebsd/bin/luamake not found
FAILED: build/freebsd/obj/test.stamp
build/freebsd/bin/luamake 3rd/bee.lua/test/test.lua --touch build/freebsd/obj/test.stamp
ninja: build stopped: subcommand failed.
I am not sure what the problem really is here, gcc10
is installed via pkg
.
There was a discussion on FreeBSD forums a few months back, coming from a similar error message. Not sure if that might help debugging this.
Thanks for any help!
OS: Linux
Arch: x86_64
Compiler: GCC 11.2.1
CRT: libstdc++ 20211203 glibc 2.34
DEBUG: false
FAILED: build/linux/bin/luamake
gcc build/linux/obj/source_bootstrap/main.obj build/linux/obj/source_bootstrap/progdir.obj build/linux/obj/source_bee/lua-seri.obj build/linux/obj/source_bee/error.obj build/linux/obj/source_bee/fsevent_linux.obj build/linux/obj/source_bee/endpoint.obj build/linux/obj/source_bee/socket.obj build/linux/obj/source_bee/format.obj build/linux/obj/source_bee/os.obj build/linux/obj/source_bee/subprocess_posix.obj build/linux/obj/source_bee/simplethread_posix.obj build/linux/obj/source_bee/file_helper.obj build/linux/obj/source_bee/path_helper.obj build/linux/obj/source_bee/lua_filesystem.obj build/linux/obj/source_bee/lua_filewatch.obj build/linux/obj/source_bee/lua_platform.obj build/linux/obj/source_bee/lua_serialization.obj build/linux/obj/source_bee/lua_socket.obj build/linux/obj/source_bee/lua_subprocess.obj build/linux/obj/source_bee/lua_thread.obj build/linux/obj/source_bee/lua_time.obj build/linux/obj/source_lua/lapi.obj build/linux/obj/source_lua/lauxlib.obj build/linux/obj/source_lua/lbaselib.obj build/linux/obj/source_lua/lcode.obj build/linux/obj/source_lua/lcorolib.obj build/linux/obj/source_lua/lctype.obj build/linux/obj/source_lua/ldblib.obj build/linux/obj/source_lua/ldebug.obj build/linux/obj/source_lua/ldo.obj build/linux/obj/source_lua/ldump.obj build/linux/obj/source_lua/lfunc.obj build/linux/obj/source_lua/lgc.obj build/linux/obj/source_lua/linit.obj build/linux/obj/source_lua/liolib.obj build/linux/obj/source_lua/llex.obj build/linux/obj/source_lua/lmathlib.obj build/linux/obj/source_lua/lmem.obj build/linux/obj/source_lua/loadlib.obj build/linux/obj/source_lua/lobject.obj build/linux/obj/source_lua/lopcodes.obj build/linux/obj/source_lua/loslib.obj build/linux/obj/source_lua/lparser.obj build/linux/obj/source_lua/lstate.obj build/linux/obj/source_lua/lstring.obj build/linux/obj/source_lua/lstrlib.obj build/linux/obj/source_lua/ltable.obj build/linux/obj/source_lua/ltablib.obj build/linux/obj/source_lua/ltm.obj build/linux/obj/source_lua/lundump.obj build/linux/obj/source_lua/lutf8lib.obj build/linux/obj/source_lua/lvm.obj build/linux/obj/source_lua/lzio.obj -o build/linux/bin/luamake -lm -ldl -lpthread -Wl,-E -lpthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Link flags seem to be incorrect.
I guess your intention is to static link libgcc
and libstdc++
, but not the other libs?
Changing to this:
rule link_luamake
command = $cc $in -o $out $
-s -lm -ldl -lpthread -lstdc++ $
-Wl,-E -static-libgcc -static-libstdc++
seems to work fine (for my CRT + GCC version).
I guess you'd want to also change the gcc compiler flags.
I don't work with C/C++, so I'm not sure which gcc version supports -static-libstdc++
, if it's even standard, or if what I suggest is correct.
大佬,这是什么原因?
filewatch.test_2
create_directories: 拒绝访问。
: "C:/Users/lmmxx/AppData/Local/Temp/test_bee/temp/"
stack traceback:
bee.lua/test/test_filewatch.lua:20: in upvalue 'test'
bee.lua/test/test_filewatch.lua:38: in upvalue 'filewatch.test_2'
filewatch.test_symlink
create_directories: 拒绝访问。
: "C:/Users/lmmxx/AppData/Local/Temp/test_bee/temp/"
stack traceback:
bee.lua/test/test_filewatch.lua:86: in upvalue 'filewatch.test_symlink'
Ran 98 tests in 2.730 seconds, 96 successes, 2 failures
[0/1] Run test.
FAILED: build/mingw/obj/test.stamp
build/mingw/bin/bootstrap.exe bee.lua/test/test.lua --touch build/mingw/obj/test.stamp
ninja: build stopped: subcommand failed.
ninja msvc_deps_prefix 配置好后,配置报找不到头文件,应该是我的系统原因,可能是设置不了英文导致
因为我想编译你的 lua-debug 插件学习一下,发现需要使用到 luamake 因为ninja 编译不了,所以我翻译了ninja 的工程文件
下面是我用 xmake 工具写的 最后段 luamake 生成的看不懂的,luamake 又找不到二进制的包下载,不知道能否提供一个二进制的下载包不?
add_rules("mode.debug", "mode.release")
local lua_home = "3rd/bee.lua/3rd/lua/"
local seri_home = "3rd/bee.lua/3rd/lua-seri/"
local binding_home = "3rd/bee.lua/binding/"
local bootstrap_home = "3rd/bee.lua/bootstrap/"
local test_home = "3rd/bee.lua/test/"
local bee_homoe = "3rd/bee.lua/bee/"
target("lua54.dll")
set_basename("lua54")
set_kind("shared")
add_headerfiles(lua_home .. "**.h")
add_files(lua_home .. "**.c|lua.c|luac.c|utf8_lua.c")
add_defines("LUA_BUILD_AS_DLL")
add_includedirs(lua_home,{public=true})
target("lua54.exe")
set_basename("lua54")
set_kind("binary")
add_deps("lua54.dll")
add_files(lua_home .. "utf8_crt.c")
add_files(lua_home .. "utf8_lua.c")
target("bee.dll")
set_languages("c89","cxx17")
set_basename("bee")
set_kind("shared")
add_deps("lua54.dll")
--seri_home
add_headerfiles(seri_home .. "**.h")
add_files(seri_home .. "**.c")
add_includedirs(seri_home,{public=true})
--bee
add_headerfiles(bee_homoe .. "*.h")
add_files(bee_homoe .. "*.cpp")
add_includedirs(bee_homoe,{public=true})
--binding
add_files(binding_home .. "*.cpp")
--other
add_headerfiles(bee_homoe .. "lua/*.h")
add_files(bee_homoe .. "net/*.cpp")
add_headerfiles(bee_homoe .. "net/*.h")
add_headerfiles(bee_homoe .. "nonstd/**.h")
add_files(bee_homoe .. "**.cc")
add_files(bee_homoe .. "utility/*.cpp")
if is_plat("windows") then
add_files(bee_homoe .."fsevent/fsevent_win.cpp")
add_headerfiles(bee_homoe .. "fsevent/fsevent_win.h")
add_files(bee_homoe .."subprocess/**.cpp|subprocess_posix.cpp")
add_headerfiles(bee_homoe .. "subprocess/*h|subprocess_posix.h")
add_files(bee_homoe .."platform/*.cpp")
add_headerfiles(bee_homoe .. "platform/*.h")
add_links("lua54")
add_links("advapi32","ws2_32","ole32","user32","version","wbemuuid","oleAut32")
end
add_cxflags("/I3rd/bee.lua")
add_cxflags("/I3rd/bee.lua/bee/nonstd")
add_cflags("/I3rd/bee.lua/3rd/lua-seri")
add_defines("BEE_INLINE")
target("bootstrap")
set_languages("c89","cxx17")
set_kind("binary")
add_deps("lua54.dll")
add_files(lua_home .. "utf8_crt.c")
add_files(bootstrap_home .. "**.cpp")
after_build(function (target)
os.trycp(bootstrap_home .. "main.lua",target:targetdir() .. "/main.lua")
-- os.run("ldid -S %s", target:targetfile())
-- if os.exists("$(targetdir)") then
-- print(bootstrap_home .. "main.lua")
-- end
-- print(target:targetdir())
end)
On OpenBSD-current (next 7.2 release) on amd64, with the recent commits (b806f0f), luamake
build is OK.
But I have an error when I try to exec luamake
binary :
$ ./luamake
Please use `./compile/install.sh`.
./luamake: ./scripts/writer.lua:910: exe_path: No such file or directory
stack traceback:
[C]: in function 'bee.filesystem.exe_path'
./scripts/writer.lua:910: in upvalue 'get_luamake'
./scripts/writer.lua:972: in function 'writer.generate'
./scripts/simulator.lua:250: in function 'simulator.generate'
./scripts/action.lua:60: in function 'action.generate'
./scripts/command/make.lua:3: in main chunk
[C]: in function 'dofile'
./scripts/main.lua:12: in local 'command'
./scripts/main.lua:29: in main chunk
[C]: in function 'require'
./main.lua:8: in main chunk
[C]: in ?
After some debug, it seems that bee::path_helper::exe_path
function in 3rd/bee.lua/bee/utility/path_helper.cpp
is invalid for OpenBSD :
if defined(__OpenBSD__)
fs::read_symlink("/proc/self/exe", ec)
(line 99) is not valid (no /proc/self/exe
on OpenBSD).I maintain the lua_ls port in FreeBSD, and I have to do some patching every time luamake is updated. It'd be nice if some of the changes were merged in here, rather than patching on every release.
freebsd.ninja
be updated to use it instead of gcc?-I/usr/loca/include
, and linker commands need -L/usr/local/lib
-Wno-maybe-uninitialized
does not exist and causes clang to error out. Can it be -Wno-uninitialized
instead?-Wl,-E
causes clang to error, so we drop that word entirelyYou can see FreeBSD's luamake patch here: https://github.com/freebsd/freebsd-ports/blob/main/devel/lua-language-server/files/patch-3rd_luamake_compile_ninja_freebsd.ninja
Thank you for all the work you've done to support FreeBSD!
C:\User\Ai164\Desktop\luamake>ninja -f ninja/mingw.ninja
[0/4] cd 3rd/bee.lua && ninja -f ninja/mingw.ninja
FAILED: build/mingw/_/bee
cd 3rd/bee.lua && ninja -f ninja/mingw.ninja
CreateProcess failed: The system cannot find the file specified.
ninja: build stopped: subcommand failed.
C:\User\Ai164\Desktop\luamake>cd 3rd\bee.lua
C:\User\Ai164\Desktop\luamake\3rd\bee.lua>ninja -f ninja/mingw.ninja
[1/67] Compile C build/mingw/obj/lua54/lapi.obj
FAILED: build/mingw/obj/lua54/lapi.obj
gcc -MMD -MT build/mingw/obj/lua54/lapi.obj -MF build/mingw/obj/lua54/lapi.obj.d -std=c11 -O2 -Wall -DLUA_BUILD_AS_DLL -DLUAI_MAXCSTACK=1000 -DNDEBUG -o build/mingw/obj/lua54/lapi.obj -c 3rd/lua/src/lapi.c
CreateProcess failed: The system cannot find the file specified.
[2/67] Compile C build/mingw/obj/lua54/lauxlib.obj
FAILED: build/mingw/obj/lua54/lauxlib.obj
gcc -MMD -MT build/mingw/obj/lua54/lauxlib.obj -MF build/mingw/obj/lua54/lauxlib.obj.d -std=c11 -O2 -Wall -DLUA_BUILD_AS_DLL -DLUAI_MAXCSTACK=1000 -DNDEBUG -o build/mingw/obj/lua54/lauxlib.obj -c 3rd/lua/src/lauxlib.c
CreateProcess failed: The system cannot find the file specified.
[3/67] Compile C build/mingw/obj/lua54/lbaselib.obj
FAILED: build/mingw/obj/lua54/lbaselib.obj
gcc -MMD -MT build/mingw/obj/lua54/lbaselib.obj -MF build/mingw/obj/lua54/lbaselib.obj.d -std=c11 -O2 -Wall -DLUA_BUILD_AS_DLL -DLUAI_MAXCSTACK=1000 -DNDEBUG -o build/mingw/obj/lua54/lbaselib.obj -c 3rd/lua/src/lbaselib.c
CreateProcess failed: The system cannot find the file specified.
[4/67] Compile C build/mingw/obj/lua54/lcode.obj
FAILED: build/mingw/obj/lua54/lcode.obj
gcc -MMD -MT build/mingw/obj/lua54/lcode.obj -MF build/mingw/obj/lua54/lcode.obj.d -std=c11 -O2 -Wall -DLUA_BUILD_AS_DLL -DLUAI_MAXCSTACK=1000 -DNDEBUG -o build/mingw/obj/lua54/lcode.obj -c 3rd/lua/src/lcode.c
CreateProcess failed: The system cannot find the file specified.
[5/67] Compile C build/mingw/obj/lua54/lctype.obj
FAILED: build/mingw/obj/lua54/lctype.obj
gcc -MMD -MT build/mingw/obj/lua54/lctype.obj -MF build/mingw/obj/lua54/lctype.obj.d -std=c11 -O2 -Wall -DLUA_BUILD_AS_DLL -DLUAI_MAXCSTACK=1000 -DNDEBUG -o build/mingw/obj/lua54/lctype.obj -c 3rd/lua/src/lctype.c
CreateProcess failed: The system cannot find the file specified.
ninja: build stopped: subcommand failed.
子模块已经在克隆luamake 时一并克隆了
$ git clone --recursive https://github.com/actboy168/luamake.git
luamake 为master分支
bee.lua 也是master
ninja 我直接下载的二进制文件
https://github.com/ninja-build/ninja/releases
已经添加环境变量
for path, status in fs.pairs(dir) do --dir is /Users/apple/lua-debug/3rd/bee.lua/3rd/lua-seri'
end
读出的status
是nil
,然后glob_match
里面直接读了status:is_directory()
❯ ninja -f ninja/linux.ninja
[0/3] cd 3rd/bee.lua && ninja -f ninja/linux.ninja
[2/2] build/linux/bin/bootstrap test/test.lua
FAILED: build/linux//test
build/linux/bin/bootstrap test/test.lua
OS: Linux
Arch: 64
Compiler: GCC 10.1.0
CRT: libstdc++ 20200507
DEBUG: false
....
ninja: build stopped: subcommand failed.
FAILED: build/linux//bee
cd 3rd/bee.lua && ninja -f ninja/linux.ninja
ninja: build stopped: subcommand failed.
Hello. When I trying to install Luamake, I encounter with a ninja build error, the error should be like this:
╭─lua4life@localhost ~/luamake ‹master›
╰─$ ./compile/install.sh
[27/29] Run test.
OS: Linux
Arch: arm
Compiler: GCC 11.2.0
CRT: libstdc++ 20220324 glibc 2.35
DEBUG: false
...................................................F................................................
Failed tests:
-------------
1) filesystem.test_fullpath
3rd/bee.lua/test/test_filesystem.lua:982: expected: <userdata:/tmp/test_bee/.l2s.temp.txt0001.0002>, actual: <userdata:/tmp/test_bee/temp.hardlink>
stack traceback:
3rd/bee.lua/test/test_filesystem.lua:982: in upvalue 'filesystem.test_fullpath'
Ran 100 tests in 0.953 seconds, 99 successes, 1 failures
[28/29] Copy build/linux/bin/luamake luamake
FAILED: build/linux/obj/test.stamp
build/linux/bin/luamake 3rd/bee.lua/test/test.lua --touch build/linux/obj/test.stamp
ninja: build stopped: subcommand failed.
╭─lua4life@localhost ~/luamake ‹master›
╰─$ 1 ↵
I'm running Termux within Ubuntu Proot
As your luamake
is used in many other LUA project might you consider looking into BSD (FreeBSD, NetBSD) support?
If it's not possible because of missing build (or development) machine I'm more than welcome to sponsor shell access.
Nix uses a relatively old SDK for mac. Just wondering if it would be possible to add support?
想编译安装luamake,但是出现了下面的错误,并且编译出来的luamake.exe似乎也是没啥作用。。请问下大佬这是啥问题呀?感谢~
使用Chocolatey(choco install mingw命令)安装的环境,并且添加了相应的环境变量。
~/Desktop/github/luamake (master) gcc --version
gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/Desktop/github/luamake (master) ninja --version
1.10.2
~/Desktop/github/luamake (master) ninja -f compile/ninja/mingw.ninja
[31/36] Run test.
[32/36] lua 3rd/bee.lua/bootstrap/forward_lua.lua 3rd/bee.lua/3rd/lua 3rd/bee.lua/bootstrap/forward_lua.h luamake.exe gcc
FAILED: 3rd/bee.lua/bootstrap/forward_lua.h
luamake lua 3rd/bee.lua/bootstrap/forward_lua.lua 3rd/bee.lua/3rd/lua 3rd/bee.lua/bootstrap/forward_lua.h luamake.exe gcc
FAILED: build/mingw/obj/test.stamp
build/mingw/bin/luamake.exe 3rd/bee.lua/test/test.lua --touch build/mingw/obj/test.stamp
ninja: build stopped: subcommand failed.
~/Desktop/github/luamake (master) ls
3rd cmd.txt LICENSE main.lua README.md tools
build compile luamake.exe make.lua scripts
最后把报错的profile.ps1文件删掉就没报错了
C:\Work\luamake>ninja -f build\msvc\compile.ninja
[22/42] Compile ASM build/msvc/obj/source_lua/fast_setjmp_x86_64.obj
Assembling: bee.lua/3rd/lua/fast_setjmp_x86_64.s
[26/42] Compile C build/msvc/obj/source_lua/utf8_crt.obj
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): warning C5105: 生成“已定义”的宏扩展具 有未定义的行为
[33/42] Compile C build/msvc/obj/source_lua/onelua.obj
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): warning C5105: 生成“已定义”的宏扩展具 有未定义的行为
[35/42] Link Exe build/msvc/bin/bootstrap.exe
正在创建库 build/msvc/obj/bootstrap.lib 和对象 build/msvc/obj/bootstrap.exp
正在生成代码
已完成代码的生成
[36/42] Copy bee.lua/bootstrap/main.lua build/msvc/bin/main.lua
& : 无法将“C:\ProgramData\Anaconda3\Scripts\conda.exe”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的
拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 C:\Users\1\Documents\WindowsPowerShell\profile.ps1:4 字符: 4
+ (& "C:\ProgramData\Anaconda3\Scripts\conda.exe" "shell.powershell" "h ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
[36/42] Run test.
OS: windows 10.0.19041
Arch: x86_64
Compiler: MSVC 192930040.0
CRT: MSVC STL 202104L
DEBUG: false
..............................................................................
.....................
Ran 99 tests in 3.059 seconds, 99 successes, 0 failures
OK
[37/42] Copy build/msvc/bin/bootstrap.exe luamake.exe
& : 无法将“C:\ProgramData\Anaconda3\Scripts\conda.exe”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的
拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 C:\Users\1\Documents\WindowsPowerShell\profile.ps1:4 字符: 4
+ (& "C:\ProgramData\Anaconda3\Scripts\conda.exe" "shell.powershell" "h ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
[40/42] Link Dll build/msvc/bin/lua54.dll
正在创建库 build/msvc/obj/lua54/lua54.lib 和对象 build/msvc/obj/lua54/lua54.exp
正在生成代码
已完成代码的生成
[41/42] Copy build/msvc/bin/lua54.dll tools/lua54.dll
& : 无法将“C:\ProgramData\Anaconda3\Scripts\conda.exe”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的
拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 C:\Users\1\Documents\WindowsPowerShell\profile.ps1:4 字符: 4
+ (& "C:\ProgramData\Anaconda3\Scripts\conda.exe" "shell.powershell" "h ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException```
I'm getting this error when I run my project:
./luamake
[0/3] cd 3rd/bee.lua && ninja -f ninja/linux.ninja
[1/2] mkdir -p build/linux/bin && cp bootstrap/main.lua build/linux/bin/main.lua
[2/2] build/linux/bin/bootstrap test/test.lua
...................................................................................
Ran 83 tests in 0.162 seconds, 83 successes, 0 failures
OK
[2/3] cp 3rd/bee.lua/build/linux/bin/bootstrap luamake
FAILED: build/linux/_/copy_bee_1
cp 3rd/bee.lua/build/linux/bin/bootstrap luamake
cp: cannot create regular file 'luamake': Text file busy
[3/3] cp 3rd/bee.lua/build/linux/bin/bee.so bee.so
ninja: build stopped: subcommand failed.
Segmentation fault (core dumped)
I traced down the actual build command to ninja -f ./compile/ninja/openbsd.ninja
, which generated the same message as mentioned in the title. Then the ninja build file was reviewed to see what building entailed. What immediately piqued my curiosity was the specification of gcc
as a dependency when the build process will take place in clang. This might prove to be doubly problematic since gcc
has been moved to egcc
on OpenBSD systems. Why in the name of cheesy tortillas, OpenBSD chose to rename /usr/local/bin/gcc
to /usr/local/bin/egcc
only the BSD cosmos knows, but if ninja is looking for specifically the gcc
binary, it won't find it.
Full output is rather lacking in any specific identification of the cause of the segmentation fault:
$> ninja -d explain -d stats -d keeprsp -d keepdepfile -f ./compile/ninja/openbsd.ninja
ninja explain: output build/openbsd/obj/test.stamp doesn't exist
ninja explain: build/openbsd/obj/test.stamp is dirty
[0/1] Run test.
OS: openbsd 7.3.0
Arch: x86_64
Compiler: Clang 13.0.0
CRT: libc++ 13000
DEBUG: false
............................................................................
..............Segmentation fault (core dumped)
FAILED: build/openbsd/obj/test.stamp
build/openbsd/bin/bootstrap bee.lua/test/test.lua --touch build/openbsd/obj/test.stamp
ninja: build stopped: subcommand failed.
metric count avg (us) total (ms)
.ninja parse 1 910.0 0.9
node stat 177 5.2 0.9
.ninja_log load 1 388.0 0.4
.ninja_deps load 1 325.0 0.3
node stat 175 5.4 0.9
StartEdge 1 857.0 0.9
FinishCommand 1 132.0 0.1
path->node hash load 0.74 (292 entries / 397 buckets)
Tried it shortly to install, but so far, this is hard/not packageable whichout headache.
luamake should search a compile time defined path for lua scripts it ships. Those need to be installed into a absolute target, like
/usr/local/[lib|share] and the file installed into $PREFIX/bin needs to search this path.
Changing $HOME/.profile|.... is a strict nogo for every unix package.
debug调试一加断点就闪退。先启动调试再加断点也会闪退。
与xmake有什么异同?
我执行了 compile\install.bat 报这个错,说没有配置 msvc_deps_prefix 可能是我安装了vs2019 vs2017需要配置的SDK路径?
When trying to use this command:
ninja -f ninja/linux.ninja
It gives following error.
[0/3] cd 3rd/bee.lua && ninja -f ninja/linux.ninja
ninja: error: loading 'ninja/linux.ninja': No such file or directory
FAILED: build/linux/_/bee
cd 3rd/bee.lua && ninja -f ninja/linux.ninja
ninja: build stopped: subcommand failed.
ninja version: 1.9.0
system: Manjaro 15.10
5、从https://github.com/actboy168/lua-debug拉取lua-debug代码
5-1、然后进入目录执行git submodule update --init --recursive
6、(十分重要)将luamake目录下的luamake、bee.so、main.lua、scripts文件和目录复制到lua-debug的目录下
7、使用vscode打开拉取的lua-debug代码目录
前面几步都完成了,但是后面rebuild 和 copy publish 找不到
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.