Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 14:25
    lc-soft closed #637
  • 08:36
    lc-soft opened #637
  • Dec 06 12:38
    lc-soft closed #636
  • Dec 06 08:27
    lc-soft opened #636
  • Dec 06 06:49
    waruqi closed #623
  • Dec 06 06:12
    lc-soft closed #634
  • Dec 04 01:11
    rel1ve opened #635
  • Dec 03 14:17
    fasiondog closed #632
  • Dec 03 11:03
    lc-soft edited #634
  • Dec 03 11:02
    lc-soft opened #634
  • Dec 03 06:27
    fasiondog opened #632
  • Dec 02 01:07
    waruqi unlabeled #618
  • Nov 29 07:52
    Domain closed #612
  • Nov 28 23:40
    waruqi closed #629
  • Nov 27 13:05
    waruqi labeled #630
  • Nov 27 13:05
    waruqi labeled #630
  • Nov 27 10:40
    tomekw opened #630
  • Nov 27 08:40
    tangaoo opened #108
  • Nov 27 01:47
    tangaoo closed #106
  • Nov 26 02:39
    waruqi labeled #626
tboox_bot
@warrny
waruqi:
waruqi: 这里 deserialize 的时候 似乎出错了。。可以看下这里的 errors 串内容
tboox_bot
@warrny
Tony:
tboox_bot
@warrny
waruqi: @OpportunityLiu 你这还有遇到其他问题么,这个版本没啥问题的话,这两天我就发版了。
tboox_bot
@warrny
OpportunityLiu: 感觉不太对。。。:
tboox_bot
@warrny
waruqi: xmake-release mirror里面忘记传了。。现在好了。。你再试试 (re @OpportunityLiu: )
tboox_bot
@warrny
OpportunityLiu: ➜ ~ xmake update -v -D
checking for the unzip ... /usr/bin/unzip
checking for the git ... /usr/bin/git
checking for the gzip ... /bin/gzip
checking for the tar ... /bin/tar
checking for the ping ... /bin/ping
pinging for the host(gitee.com) ... 33 ms
pinging for the host(gitlab.com) ... 218 ms
checking for the nmap ... no
pinging for the host(github.com) ... 65535 ms
/usr/bin/git ls-remote --refs https://gitee.com/tboox/xmake.git
update version v2.2.8 from official source ..
prepared to download to temp dir /tmp/.xmake1001/190827/xmakesrc/v2.2.8 ..
=> downloading https://gitee.com/tboox/xmake.git .. /usr/bin/git clone https://gitee.com/tboox/xmake.git /tmp/.xmake1001/190827/xmakesrc/v2.2.8
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8'...
remote: Enumerating objects: 51316, done.
remote: Counting objects: 100% (51316/51316), done.
remote: Compressing objects: 100% (17414/17414), done.
remote: Total 51316 (delta 35183), reused 46520 (delta 31660)
接收对象中: 100% (51316/51316), 16.31 MiB | 1.65 MiB/s, 完成.
处理 delta 中: 100% (35183/35183), 完成.
/usr/bin/git checkout v2.2.8
注意:正在检出 'v2.2.8'。
您正处于分离头指针状态。您可以查看、做试验性的修改及提交,并且您可以通过另外
的检出分支操作丢弃在这个状态下所做的任何提交。
如果您想要通过创建分支来保留在此状态下所做的提交,您可以通过在检出命令添加
参数 -b 来实现(现在或稍后)。例如:
git checkout -b <新分支名>
HEAD 目前位于 6a2e390a update version
/usr/bin/git submodule update --init --recursive
子模组 'core/src/luajit/luajit'(https://gitee.com/xmake-io/xmake-core-luajit.git)已对路径 'core/src/luajit/luajit' 注册
子模组 'core/src/pdcurses/pdcurses'(https://gitee.com/xmake-io/xmake-core-pdcurses.git)已对路径 'core/src/pdcurses/pdcurses' 注册
子模组 'core/src/sv/sv'(https://gitee.com/xmake-io/xmake-core-sv.git)已对路径 'core/src/sv/sv' 注册
子模组 'core/src/tbox/tbox'(https://gitee.com/tboox/tbox.git)已对路径 'core/src/tbox/tbox' 注册
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/luajit/luajit'...
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/pdcurses/pdcurses'...
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/sv/sv'...
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/tbox/tbox'...
子模组路径 'core/src/luajit/luajit':检出 'd1ea93d1b5d175e29af653872ec5bb77f55241a5'
子模组路径 'core/src/pdcurses/pdcurses':检出 '46d2c800bee8b5c1a51a9dfbbbc77461e98b9ecb'
error: 服务器不允许请求未公开的对象 9a3cf7c8e589de4f70378824329882c4a047fffc
获取了子模组路径 'core/src/sv/sv',但是它没有包含 9a3cf7c8e589de4f70378824329882c4a047fffc。直接获取该提交失败。
/home/dps/.local/share/xmake/core/base/os.lua:719: execv(/usr/bin/git submodule update --init --recursive) failed(1)!
stack traceback:
[C]: in function 'error'
[/home/dps/.local/share/xmake/core/base/os.lua:719]: in function 'raise'
[./.local/share/xmake/core/sandbox/modules/os.lua:414]:
[./.local/share/xmake/core/sandbox/modules/os.lua:334]: in function 'vrunv'
[./.local/share/xmake/modules/devel/git/submodule/update.lua:71]: in function 'update'
[./.local/share/xmake/actions/update/main.lua:324]:
[C]: in function 'trycall'
[./.local/share/xmake/core/sandbox/modules/try.lua:121]: in function 'try'
[./.local/share/xmake/actions/update/main.lua:312]: in function 'download_task'
[./.local/share/xmake/actions/update/main.lua:353]:
[C]: in function 'load'
[/home/dps/.local/share/xmake/core/base/task.lua:508]: in function 'run'
[/home/dps/.local/share/xmake/core/main.lua:231]:
OpportunityLiu: => download https://gitee.com/tboox/xmake.git .. failed
=> downloading https://gitlab.com/tboox/xmake.git .. /usr/bin/git clone https://gitlab.com/tboox/xmake.git /tmp/.xmake1001/190827/xmakesrc/v2.2.8
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8'...
fatal: 不能读取当前工作目录: 没有那个文件或目录
/home/dps/.local/share/xmake/core/base/os.lua:719: execv(/usr/bin/git clone https://gitlab.com/tboox/xmake.git /tmp/.xmake1001/190827/xmakesrc/v2.2.8) failed(128)!
stack traceback:
[C]: in function 'error'
[/home/dps/.local/share/xmake/core/base/os.lua:719]: in function 'raise'
[./.local/share/xmake/core/sandbox/modules/os.lua:414]:
[./.local/share/xmake/core/sandbox/modules/os.lua:334]: in function 'vrunv'
[./.local/share/xmake/modules/devel/git/clone.lua:74]: in function 'clone'
[./.local/share/xmake/actions/update/main.lua:321]:
[C]: in function 'trycall'
[./.local/share/xmake/core/sandbox/modules/try.lua:121]: in function 'try'
[./.local/share/xmake/actions/update/main.lua:312]: in function 'download_task'
[./.local/share/xmake/actions/update/main.lua:353]:
[C]: in function 'load'
[/home/dps/.local/share/xmake/core/base/task.lua:508]: in function 'run'
[/home/dps/.local/share/xmake/core/main.lua:231]:
=> download https://gitlab.com/tboox/xmake.git .. failed
=> downloading https://github.com/xmake-io/xmake.git .. /usr/bin/git clone https://github.com/xmake-io/xmake.git /tmp/.xmake1001/190827/xmakesrc/v2.2.8
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8'...
fatal: 不能读取当前工作目录: 没有那个文件或目录
/home/dps/.local/share/xmake/core/base/os.lua:719: execv(/usr/bin/git clone https://github.com/xmake-io/xmake.git /tmp/.xmake1001/190827/xmakesrc/v2.2.8) failed(128)!
stack traceback:
[C]: in function 'error'
[/home/dps/.local/share/xmake/core/base/os.lua:719]: in function 'raise'
[./.local/share/xmake/core/sandbox/modules/os.lua:414]:
[./.local/share/xmake/core/sandbox/modules/os.lua:334]: in function 'vrunv'
[./.local/share/xmake/modules/devel/git/clone.lua:74]: in function 'clone'
[./.local/share/xmake/actions/update/main.lua:321]:
[C]: in function 'trycall'
[./.local/share/xmake/core/sandbox/modules/try.lua:121]: in function 'try'
[./.local/share/xmake/actions/update/main.lua:312]: in function 'download_task'
[./.local/share/xmake/actions/update/main.lua:353]:
[C]: in function 'load'
[/home/dps/.local/share/xmake/core/base/task.lua:508]: in function 'run'
[/home/dps/.local/share/xmake/core/main.lua:231]:
=> download https://github.com/xmake-io/xmake.git .. failed
error: /home/dps/.local/share/xmake/core/base/os.lua:719: download failed!
stack traceback:
[C]: in function 'error'
[/home/dps/.local/share/xmake/core/base/os.lua:719]: in function 'raise'
[./.local/share/xmake/actions/update/main.lua:346]: in function 'download_task'
[./.local/share/xmake/actions/update/main.lua:353]:
[C]: in function 'load'
[/home/dps/.local/share/xmake/core/base/task.lua:508]: in function 'run'
[/home/dps/.local/share/xmake/core/main.lua:231]:
OpportunityLiu: => download https://gitee.com/tboox/xmake.git .. failed
=> downloading https://gitlab.com/tboox/xmake.git .. /usr/bin/git clone https://gitlab.com/tboox/xmake.git /tmp/.xmake1001/190827/xmakesrc/v2.2.8
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8'...
tboox_bot
@warrny
waruqi: 你再试试,应该可以了,之前sv submodule 更新忘记提交到gitee了。。 (re @OpportunityLiu: ➜ ~ xmake update -v -D
checking for the unzip ... /usr/bin/unzip
checking for the git ... /usr/bin/git
checking for the gzip ... /bin/gzip
checking for the tar ... /bin/tar
checking for the ping ... /bin/ping
pinging for the host(gitee.com) ... 33 ms
pinging for the host(gitlab.com) ... 218 ms
checking for the nmap ... no
pinging for the host(github.com) ... 65535 ms
/usr/bin/git ls-remote --refs https://gitee.com/tboox/xmake.git
update version v2.2.8 from official source ..
prepared to download to temp dir /tmp/.xmake1001/190827/xmakesrc/v2.2.8 ..
=> downloading https://gitee.com/tboox/xmake.git .. /usr/bin/git clone https://gitee.com/tboox/xmake.git /tmp/.xmake1001/190827/xmakesrc/v2.2.8
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8'...
remote: Enumerating objects: 51316, done.
remote: Counting objects: 100% (51316/51316), done.
remote: Compressing objects: 100% (17414/17414), done.
remote: Total 51316 (delta 35183), reused 46520 (delta 31660)
接收对象中: 100% (51316/51316), 16.31 MiB | 1.65 MiB/s, 完成.
处理 delta 中: 100% (35183/35183), 完成.
/usr/bin/git checkout v2.2.8
注意:正在检出 'v2.2.8'。
您正处于分离头指针状态。您可以查看、做试验性的修改及提交,并且您可以通过另外
的检出分支操作丢弃在这个状态下所做的任何提交。
如果您想要通过创建分支来保留在此状态下所做的提交,您可以通过在检出命令添加
参数 -b 来实现(现在或稍后)。例如:
git checkout -b <新分支名>
HEAD 目前位于 6a2e390a update version
/usr/bin/git submodule update --init --recursive
子模组 'core/src/luajit/luajit'(https://gitee.com/xmake-io/xmake-core-luajit.git)已对路径 'core/src/luajit/luajit' 注册
子模组 'core/src/pdcurses/pdcurses'(https://gitee.com/xmake-io/xmake-core-pdcurses.git)已对路径 'core/src/pdcurses/pdcurses' 注册
子模组 'core/src/sv/sv'(https://gitee.com/xmake-io/xmake-core-sv.git)已对路径 'core/src/sv/sv' 注册
子模组 'core/src/tbox/tbox'(https://gitee.com/tboox/tbox.git)已对路径 'core/src/tbox/tbox' 注册
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/luajit/luajit'...
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/pdcurses/pdcurses'...
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/sv/sv'...
正克隆到 '/tmp/.xmake1001/190827/xmakesrc/v2.2.8/core/src/tbox/tbox'...
子模组路径 'core/src/luajit/luajit':检出 'd1ea93d1b5d175e29af653872ec5bb77f55241a5'
子模组路径 'core/src/pdcurses/pdcurses':检出 '46d2c800bee8b5c1a51a9dfbbbc77461e98b9ecb'
error: 服务器不允许请求未公开的对象 9a3cf7c8e589de4f70378824329882c4a047fffc
获取了子模组路径 'core/src/sv/sv',但是它没有包含 9a3cf7c8e589de4f70378824329882c4a047fffc。直接获取该提交失败。
/home/dps/.local/share/xmake/core/base/os.lua:719: execv(/usr/bin/git submodule update --init --recursive) failed(1)!
stack traceback:
[C]: in function 'error'
[/home/dps/.local/share/xmake/core/base/os.lua:719]: in function 'raise'
[./.local/share/xmake/core/sandbox/modules/os.lua:414]:
[./.local/share/xmake/core/sandbox/modules/os.lua:334]: in function 'vrunv'
[./.local/share/xmake/modules/devel/git/submodule/update.lua:71]: in function 'update'
[./.local/share/xmake/actions/update/main.lua:324]:
[C]: in function 'trycall'
[./.local/share/xmake/core/sandbox/modules/try.lua:121]: in function 'try'
[./.local/share/xmake/actions/update/main.lua:312]: in function 'download_task'
[./.local/share/xmake/actions/update/main.lua:353]:
[C]: in function 'load'
[/home/dps/.local/share/xmake/core/base/task.lua:508]: in function 'run'
[/home/dps/.local/share/xmake/core/main.lua:231]:)
tboox_bot
@warrny
liuxin1: PRSAT
tboox_bot
@warrny
twuid: xcapi
Alex Zelid
@zelid

Hello, I just started playing with xmake and linking simple dependencies like zlib
zlib got compiled but my target can't find neither zlib's includeno it's librarries

here is xmake.lua and c++ file:
https://gist.github.com/zelid/4d1eba93c4b24a9ba2b0379a50da367b

what is the right way to get zlib's includes and libs available for my target?

Alex Zelid
@zelid
my bad, extra character in the header name
ruki
@waruqi
@zelid ok, and you can use add_syslinks("pthread") instead of add_ldflags("-lpthread")
Ho Ming Tsui
@alantsui_gitlab
Do you have any telegram group? @waruqi
about XMake?
ruki
@waruqi
@alantsui_gitlab
chaodad
@chaodad

在编译arm的固件时遇到了链接脚本检查通不过的问题诶

checking for the flags (-nostdlib) ... ok
checking for the flags (-T./link.ld) ... no

加上', {force = true}'可以编译通过

ruki
@waruqi
是的 link flags是通过尝试链接来检测的 有可能存在一定的失败率 。加force就行了,回头检测失败 我加个提示好了
Daniel Fort
@thenaquad_twitter

hi. i've got the following project structure:


.
├── src
│   ├── main.cpp
│   ├── some10.cpp
│   ├── some10.hpp
│   ├── some10_test.cpp
│   ├── some1.cpp
│   ├── some1.hpp
│   ├── some1_test.cpp
│   ├── some2.cpp
│   ├── some2.hpp
│   ├── some2_test.cpp
│   ├── some3.cpp
│   ├── some3.hpp
│   ├── some3_test.cpp
│   ├── some4.cpp
│   ├── some4.hpp
│   ├── some4_test.cpp
│   ├── some5.cpp
│   ├── some5.hpp
│   ├── some5_test.cpp
│   ├── some6.cpp
│   ├── some6.hpp
│   ├── some6_test.cpp
│   ├── some7.cpp
│   ├── some7.hpp
│   ├── some7_test.cpp
│   ├── some8.cpp
│   ├── some8.hpp
│   ├── some8_test.cpp
│   ├── some9.cpp
│   ├── some9.hpp
│   └── some9_test.cpp
└── xmake.lua

files with _test suffix are tests that should be treated as a separate targets, they depend on corresponding .cpp & .hpp files w/o _test suffix (that is some7_test.cpp depends on some7.{hpp,cpp})

and a debug/release target which includes main.cpp and all files that don't have _test suffix.

i'm trying to figure out how to do that in xmake.

my approach is to add mode check and dynamically define targets sort of like this:

local sources = {}

for _, fname in ipairs(os.files("$(projectdir)/src/*.cpp")) do
   local bname = path.basename(fname)
   if string.match(bname, "_test") then
     if is_mode("check") then
        target(string.gsub(bname, "_test\\.cpp"))
           add_files(fname, strings.gsub(fname, "_test\\.cpp$", ".cpp"))
        target_end()
     end
   else
     table.insert(sources, fname)
   end
done

But none of that works as xmake has different runtime domains and this should be run only in script domain.

So my question is: can i define dynamic targets for my case or xmake is not suitable for such purpose?

ruki
@waruqi
@thenaquad_twitter It is supported, I'll explain it in detail in the next two days.
ruki
@waruqi

-- add debug/release modes
add_rules("mode.debug", "mode.release")

-- test targets
for _, testfile in ipairs(os.files(path.join(os.projectdir(), "src", "*_test.cpp"))) do
    local testname = path.basename(testfile)
    target(testname)
        set_kind("binary")
        set_default(false)
        add_files(testfile)
        add_files(path.join(path.directory(testfile), testname:gsub("_test", "") .. ".cpp"))
    target_end()
end

-- test task
task("test")
    set_menu {usage = "xmake test [options]", description = "run all tests.", options = {}}
    on_run(function ()
        -- build tests
        local tests = {}
        for _, testfile in ipairs(os.files(path.join(os.projectdir(), "src", "*_test.cpp"))) do
            local testname = path.basename(testfile)
            table.insert(tests, testname)
            os.exec("xmake build %s", testname)
        end

        -- run tests
        for _, testname in ipairs(tests) do
            os.exec("xmake run %s", testname)
        end
    end)

-- demo target
target("demo")
    set_kind("binary")
    add_files("src/*.cpp|*_test.cpp")
@thenaquad_twitter You can use this xmake.lua and run xmake test to try it.
All test targets (with set_default(false)) will be not built by default, you can run xmake test or xmake build xxx_test or xmake --all to force to build these test targets.
Robert Butler
@lighth7015
how do I change xmake's built-in text (e.g. xmake f --config)?
ruki
@waruqi
@lighth7015 What text?