0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rustのクロスコンパイルでerror: linking with `cc` failedが出る

Posted at

TL;DR

リンカーを導入して/.cargo/configに指定する。

遭遇したエラー

Ubuntu on Docker(amd64)でcargo build --target armv5te-unknown-linux-musleabiを実行したところ、error: linking with cc failedが発生した。

対処

  1. リンカーをインストールする。
    $ apt-get update; apt-get install gcc-arm-linux-gnueabi binutils-arm-linux-gnueabi
    
  2. リンカーを指定する。
    .cargo/config
    [target.armv5te-unknown-linux-musleabi]
    linker = "arm-linux-gnueabi-gcc"
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?