Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Try Cross Compile Then Fail

Avatar for wshino wshino
April 24, 2019

Try Cross Compile Then Fail

Avatar for wshino

wshino

April 24, 2019
Tweet

More Decks by wshino

Other Decks in Technology

Transcript

  1. SSHの躓き
 @ DMM.com OpenSSH 7.8以降はデフォルトでOpenSSH形式の鍵を生成する
 私のMac(Mojave) -> ssh -V ->

    OpenSSH_7.9p1, LibreSSL 2.7.3
 OpenSSH形式の鍵はIntelliJは未対応
 PEMフォーマットで鍵を生成して登録し直す
 Support OpenSSH format private keys https://youtrack.jetbrains.com/issue/PY-33521
  2. 簡易的なものをCross Compile
 @ DMM.com jp(Like jq, but with json pointers)で検証


    諸々clangなどを入れて `rustup target add x86_64-apple-darwin`
 .cargo/configにlinkerの設定をしてビルド
 成果物はmacOSで動く(嬉しい)
 Cross compiling Rust from Linux to macOS https://wapl.es/rust/2019/02/17/rust-cross-compile-linux-to-macos.ht ml OS X cross toolchain for Linux, *BSD and Windows (Cygwin) https://github.com/tpoechtrager/osxcross
  3. SubstrateをCross Compile
 @ DMM.com cargo build --target x86_64-apple-darwin
 error: linking

    with `cc` failed: exit code: 1
 fatal error: 'os/availability.h' file not foundとか
 OpenSSLのバージョンがあかんとか
 胆力が足りず諦めた