発生している問題・エラーメッセージ
Raspberry Pi3 でgccを利用してCプログラムをコンパイルできまません。
先日Raspberry Pi3を購入し、早速以下のCプログラムを組みました。
-------------------------------------------- /****test.c****/ #include<stdio.h> int main(void){ int i =0; i = i +1; printf("i = %d \n",i); return 0; } --------------------------------------------
その後,ターミナルで以下の様にgccにてコンパイルを試みると、下記エラーが発生してしまいます。
pi@raspberrypi:~ $ gcc test.c <built-in>:internal compiler error:Segmentation fault Please submit a full bug report, with preprocessed source if approprize. See<file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
コンパイラが内部エラーを起こしたとのことで、コンパイルができません。
###試したこと
gccの入れ直しで解消できるか試すため、
pi@raspberrypi:~ $ sudo apt-get autoremove gcc pi@raspberrypi:~ $ sudo apt-get install gcc
上記試してみましたが、解消しませんでした。
また、ダメ元で下記サイト記載の一連の作業をしてみましたが、症状は変わりませんでした。
□https://qiita.com/garyo/items/21cb79d03ac54bbdd43f
当症状を解決する方法をご存知でしょうか?
補足情報(FW/ツールのバージョンなど)
gccのバージョンは以下となります。
pi@raspberrypi:~ $ gcc --version gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Cソースコード作成にはemacsを用いました。
ソースコードはホームディレクトリに保存しています・
README.Bugsの内容
不要と思いますが、README.Bugsの内容は、お問い合わせ方法のようでした。
Reporting Bugs in the GNU Compiler Collection for Raspbian ======================================================== Before reporting a bug, please ------------------------------ - Check that the behaviour really is a bug. Have a look into some ANSI standards document. - Check the list of well known bugs: http://gcc.gnu.org/bugs.html#known - Try to reproduce the bug with a current GCC development snapshot. You usually can get a recent development snapshot from the gcc-snapshot - Try to find out if the bug is a regression (an older GCC version does not show the bug). - Check if the bug is already reported in the bug tracking systems. Upstream: http://gcc.gnu.org/bugzilla/
以下、割愛。
あなたの回答
tips
プレビュー