如果是xmake相关编译问题,请加上-vD参数运行,并给出详细编译输出信息。
D:\WORK\xmake-labs-vxworks-v2>xmake -r -vD
checkinfo: cannot runv(gcc@ccmips.exe --version), No such file or directory
checking for gcc@ccmips ... no
checking for the linker (ld: gcc@ccmips) ... no
error: @programdir\core\main.lua:294: @programdir\actions\build\main.lua:146: ...mdir\core\sandbox\modules\import\core\base\scheduler.lua:87: ...mdir\core\sandbox\modules\import\core\base\scheduler.lua:47: @programdir\modules\private\async\runjobs.lua:217: @programdir\core\project\target.lua:586: cannot get program for ld
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:793]: in function 'raise'
[@programdir\core\project\target.lua:586]: in function 'linker'
[@programdir\core\project\target.lua:1004]: in function 'targetfile'
[@programdir\actions\build\build.lua:34]: in function '_clean_target'
[@programdir\actions\build\build.lua:144]: in function 'jobfunc'
[@programdir\modules\private\async\runjobs.lua:193]:
[C]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:121]: in function 'try'
[@programdir\modules\private\async\runjobs.lua:186]: in function 'cotask'
[@programdir\core\base\scheduler.lua:342]:
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:793: in function 'raise'
@programdir\modules\private\async\runjobs.lua:217: in function 'catch'
@programdir\core\sandbox\modules\try.lua:127: in function 'try'
@programdir\modules\private\async\runjobs.lua:186: in function 'cotask'
@programdir\core\base\scheduler.lua:342: in function <@programdir\core\base\scheduler.lua:339>
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:793: in function 'raise'
...mdir\core\sandbox\modules\import\core\base\scheduler.lua:47: in function 'co_start_named'
@programdir\modules\private\async\runjobs.lua:184: in function <@programdir\modules\private\async\runjobs.lua:144>
[C]: in function 'trycall'
@programdir\core\base\scheduler.lua:455: in function 'co_group_begin'
...mdir\core\sandbox\modules\import\core\base\scheduler.lua:85: in function 'co_group_begin'
@programdir\modules\private\async\runjobs.lua:144: in function 'runjobs'
@programdir\actions\build\build.lua:222: in function 'build'
@programdir\actions\build\main.lua:133: in function <@programdir\actions\build\main.lua:123>
[C]: in function 'trycall'
@programdir\core\sandbox\modules\try.lua:121: in function 'try'
@programdir\actions\build\main.lua:122: in function <@programdir\actions\build\main.lua:96>
[C]: in function 'load'
@programdir\core\base\task.lua:519: in function 'run'
@programdir\core\main.lua:292: in function 'cotask'
@programdir\core\base\scheduler.lua:342: in function <@programdir\core\base\scheduler.lua:339>
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:793: in function 'raise'
@programdir\core\main.lua:294: in function 'cotask'
@programdir\core\base\scheduler.lua:342: in function <@programdir\core\base\scheduler.lua:339>
相关环境
请提供编译和运行环境信息,下面是一些必须填写的基础信息,便于我们针对性排查问题:
xmake版本:2.5.3
xmake运行平台:Win10 x64
xmake目标平台:VxWorks
其他信息
-- define toolchain
toolchain("vxworks-gcc")
-- set homepage
set_homepage("https://www.wrs.com/")
set_description("WindRiver GNU Compiler Collection")
-- mark as standalone toolchain
set_kind("standalone")
-- set toolset
set_toolset("cc", "gcc@ccmips")
set_toolset("cxx", "g++@c++mips")
set_toolset("ld", "gcc@ccmips")
set_toolset("sh", "g++@c++mips")
set_toolset("ar", "ar@armips")
描述问题
自定义toolchains设定中无法使用set_toolset("cc", "gcc@ccmips")设定,但以同样方式在全局根作用域使用正常。
期待的结果
希望能在自定义toolchains设定中使用set_toolset("cc", "gcc@ccmips")设定。
错误信息
stack traceback: [C]: in function 'error' @programdir\core\base\os.lua:793: in function 'raise' @programdir\modules\private\async\runjobs.lua:217: in function 'catch' @programdir\core\sandbox\modules\try.lua:127: in function 'try' @programdir\modules\private\async\runjobs.lua:186: in function 'cotask' @programdir\core\base\scheduler.lua:342: in function <@programdir\core\base\scheduler.lua:339> stack traceback: [C]: in function 'error' @programdir\core\base\os.lua:793: in function 'raise' ...mdir\core\sandbox\modules\import\core\base\scheduler.lua:47: in function 'co_start_named' @programdir\modules\private\async\runjobs.lua:184: in function <@programdir\modules\private\async\runjobs.lua:144> [C]: in function 'trycall' @programdir\core\base\scheduler.lua:455: in function 'co_group_begin' ...mdir\core\sandbox\modules\import\core\base\scheduler.lua:85: in function 'co_group_begin' @programdir\modules\private\async\runjobs.lua:144: in function 'runjobs' @programdir\actions\build\build.lua:222: in function 'build' @programdir\actions\build\main.lua:133: in function <@programdir\actions\build\main.lua:123> [C]: in function 'trycall' @programdir\core\sandbox\modules\try.lua:121: in function 'try' @programdir\actions\build\main.lua:122: in function <@programdir\actions\build\main.lua:96> [C]: in function 'load' @programdir\core\base\task.lua:519: in function 'run' @programdir\core\main.lua:292: in function 'cotask' @programdir\core\base\scheduler.lua:342: in function <@programdir\core\base\scheduler.lua:339> stack traceback: [C]: in function 'error' @programdir\core\base\os.lua:793: in function 'raise' @programdir\core\main.lua:294: in function 'cotask' @programdir\core\base\scheduler.lua:342: in function <@programdir\core\base\scheduler.lua:339>
相关环境
请提供编译和运行环境信息,下面是一些必须填写的基础信息,便于我们针对性排查问题:
其他信息
-- define toolchain toolchain("vxworks-gcc")
toolchain_end()
target("helloworld_dkm_smp.out") set_kind("binary")
通过初步分析,主要出现问题在xmake\core\tool\toolchain.lua中的
-- check the given tool path function _instance:_checktool(toolkind, toolpath)
local tool = find_tool(program, {cachekey = self:cachekey(), program = program, paths = self:bindir(), envs = self:get("runenvs")})
无法正确处理包含@的信息