Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用clang-cl构建verilator失败 #5679

Open
Arteiimis opened this issue Nov 6, 2024 · 1 comment
Open

使用clang-cl构建verilator失败 #5679

Arteiimis opened this issue Nov 6, 2024 · 1 comment
Labels

Comments

@Arteiimis
Copy link
Contributor

Arteiimis commented Nov 6, 2024

Xmake 版本

v2.9.6

操作系统版本和架构

Windows10 22H2

描述问题

使用clang-cl构建verilator失败,提示cannot copy file .../verilator_bin.exe, file not found!,并且如果不指定使用clang-cl构建,即使设置了xmake g --policies=package.cmake_generator.ninja,也不会使用ninja构建。

期待的结果

正常安装

工程配置

add_requires("verilator[toolchains=clang-cl,cxxflags=[/EHsc]]")

target("hello")
    add_rules("verilator.binary")
    set_toolchains("@verilator")
    add_files("src/*.v")
    add_files("src/*.cpp")

附加信息和错误日志

-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/verilated_vcd_sc.h
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/verilated_vpi.cpp
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/verilated_vpi.h
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/vltstd
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/vltstd/svdpi.h
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/vltstd/vpi_user.h
error: @programdir\core\sandbox\modules\os.lua:100: cannot copy file F:\xmake\.xmake\packages\v\verilator\v5.016\4592400b65434d67a2b52f6580eea7da\bin\verilator_bin.exe, file not found!
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1004]:
    [@programdir\core\sandbox\modules\os.lua:100]: in function 'cp'
    [...e\repositories\xmake-repo\packages\v\verilator\xmake.lua:44]: 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 verilator v5.016 .. 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>
@Arteiimis Arteiimis added the bug label Nov 6, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: Failed to build verilator using clang-cl

Xmake version

v2.9.6

Operating system version and architecture

Windows 10 22H2

Describe the problem

Building verilator using clang-cl failed, prompting verilator_bin.exe, file not found!, and if you do not specify using clang-cl to build, even if xmake g --policies=package.cmake_generator.ninja is set, it will not Built using ninja.

Expected results

Normal installation

Project configuration

add_requires("verilator[toolchains=clang-cl,cxxflags=[/EHsc]]")

target("hello")
    add_rules("verilator.binary")
    set_toolchains("@verilator")
    add_files("src/*.v")
    add_files("src/*.cpp")

Additional information and error logs

-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/verilated_vcd_sc.h
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/verilated_vpi.cpp
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/verilated_vpi.h
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/vltstd
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/vltstd/svdpi.h
-- Installing: F:/xmake/.xmake/packages/v/verilator/v5.016/4592400b65434d67a2b52f6580eea7da/include/vltstd/vpi_user.h
error: @programdir\core\sandbox\modules\os.lua:100: cannot copy file F:\xmake\.xmake\packages\v\verilator\v5.016\4592400b65434d67a2b52f6580eea7da\bin\verilator_bin.exe, file not found!
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1004]:
    [@programdir\core\sandbox\modules\os.lua:100]: in function 'cp'
    [...e\repositories\xmake-repo\packages\v\verilator\xmake.lua:44]: 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 verilator v5.016 .. 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants