V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
proxytoworld
V2EX  ›  问与答

rust 交叉编译,从 windows 编译到 Linux ,卡住不动

  •  
  •   proxytoworld · 2022-07-29 17:47:56 +08:00 · 1207 次点击
    这是一个创建于 640 天前的主题,其中的信息可能已经有所发展或是发生改变。

    .cargo/config

    [target.x86_64-unknown-linux-musl]
    linker = "rust-lld"
    

    执行命令 cargo build --target x86_64-unknown-linux-musl 如下图,卡住不动了,有没有老哥知道怎么搞

    rustup show 结果:

    PS > rustup show
    Default host: x86_64-pc-windows-gnu
    rustup home:  C:\Users\test\.rustup
    
    installed toolchains
    --------------------
    
    stable-x86_64-pc-windows-gnu (default)
    stable-x86_64-pc-windows-msvc
    
    installed targets for active toolchain
    --------------------------------------
    
    x86_64-pc-windows-gnu
    x86_64-unknown-linux-gnu
    x86_64-unknown-linux-musl
    
    active toolchain
    ----------------
    
    stable-x86_64-pc-windows-gnu (default)
    rustc 1.62.1 (e092d0b6b 2022-07-16)
    
    
    
    3 条回复    2023-02-26 20:21:18 +08:00
    hangbale
        1
    hangbale  
       2022-07-29 18:25:51 +08:00
    用 GitHub Action 多环境编译
    elechi
        2
    elechi  
       2022-08-01 15:20:24 +08:00
    没用过 rust ,看 atcive toolchain 下没有 linux 的 toolchain
    ilanyu
        3
    ilanyu  
       2023-02-26 20:21:18 +08:00
    我也这样,x86_64-pc-windows-gnu 改为用 x86_64-pc-windows-msvc 后好了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4723 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:04 · PVG 18:04 · LAX 03:04 · JFK 06:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.