Raspberry Pi 3で動く実行ファイルをUbuntu(18.04.2 LTS 64bit)上でつくりたいです。
ubuntu上でクロスコンパイルをすればよさそうだということがわかったので、実施してみたら、エラーが出力され、先に進めない状態です。
以下のツールチェーンを使いました。
https://github.com/raspberrypi/tools
以下のコマンドで、画面にhelloと表示するだけの簡単なコードをクロスコンパイルしようとしました。
$ ~/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ hello.cpp
すると、以下のエラーが出力されました。
たぶん「機種依存のライブラリがあるから、どうにかして下さい」といってるような気がするんですが、解消方法がわかりません。
In file included from /usr/include/wchar.h:30:0, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cwchar:44, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/bits/postypes.h:40, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/iosfwd:40, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/ios:38, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/ostream:38, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/iostream:39, from hello.cpp:1: /usr/include/bits/floatn.h:75:70: エラー: 不明なマシンモード ‘__TC__’ です typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); ^ /usr/include/bits/floatn.h:87:9: エラー: ‘__float128’ does not name a type typedef __float128 _Float128; ^ In file included from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cwchar:44:0, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/bits/postypes.h:40, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/iosfwd:40, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/ios:38, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/ostream:38, from /home/aiueo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/iostream:39, from hello.cpp:1: /usr/include/wchar.h:406:8: エラー: ‘_Float128’ does not name a type extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, ^ /usr/include/wchar.h:523:8: エラー: ‘_Float128’ does not name a type extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr, ^
自分で調べてみたところ、以下のサイトにあるツールチェーン(?)を使うと、もしかしたら解消されるかもしれない、ということがわかったのですが、難易度が高そうなので、試して見る前にまずはteratailで伺った次第です。
https://aur.archlinux.org/packages/?O=0&SeB=nd&K=distccd-alarm
回答2件
あなたの回答
tips
プレビュー