web-dev-qa-db-ja.com

「Make」コマンドのコンパイルエラー

C++で書かれたプログラムをローカルにインストールしようとしています。プログラムをダウンロードし、プログラムの指示に従ってプログラムをコンパイルするために「make」コマンドを使用しようとしています。しかし、私はこのエラーを受け取ります:

/usr/include/stdc-predef.h:30:26: fatal error: bits/predefs.h: No such file or directory 
compilation terminated.

インターネットを見回すと、一部の人々はこの問題に対処するようです

 Sudo apt-get install libc6-dev-i386

このパッケージがインストールされているかどうかを確認しました。インストールされていません。インストールしようとすると

E: Unable to locate package libc6-dev-i386 

私はすでに走った

Sudo apt get update   

これは新人の質問だと思いますが、13.10 32ビットを実行しています。

更新:同様のエラーで見つかった他の提案を試しました。私が管理しているのは、異なるが同様のエラーです。ここに私が得るものがあります。

Geoffrey@Geoffrey-Latitude-E6400:/usr/local/src/trinityrnaseq_r2013_08_14$ make
Using gnu compiler for Inchworm and Chrysalis
cd Inchworm && (test -e configure || autoreconf) \
                && ./configure --prefix=`pwd`  && make install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for library containing cos... none required
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make[1]: Entering directory `/usr/local/src/trinityrnaseq_r2013_08_14/Inchworm'
Making install in src
make[2]: Entering directory `/usr/local/src/trinityrnaseq_r2013_08_14/Inchworm/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -pedantic -fopenmp -Wall -Wextra -Wno-long-long -Wno-deprecated -m64 -g -O2 -MT Fasta_entry.o -MD -MP -MF ".deps/Fasta_entry.Tpo" -c -o Fasta_entry.o Fasta_entry.cpp; \
then mv -f ".deps/Fasta_entry.Tpo" ".deps/Fasta_entry.Po"; else rm -f ".deps/Fasta_entry.Tpo"; exit 1; fi
In file included from Fasta_entry.hpp:4:0,
             from Fasta_entry.cpp:1:
/usr/include/c++/4.8/string:38:28: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
                        ^
compilation terminated.
make[2]: *** [Fasta_entry.o] Error 1
make[2]: Leaving directory `/usr/local/src/trinityrnaseq_r2013_08_14/Inchworm/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/trinityrnaseq_r2013_08_14/Inchworm'
make: *** [inchworm] Error 2
3
G_T

buntu 13.10 AMD64で、
問題/usr/include/stdc-predef.h:30:26: fatal error: bits/predefs.h: No such file or directory compilation terminated.は次のように解決されました。

$ Sudo apt-get install build-essential
$ Sudo apt-get install libc6-dev-i386
$ Sudo apt-get install g++-4.8-multilib
5
Boris

ビルドターゲットアーキテクチャを変更して、この問題を解決しました。 G ++ 4.8.0以降では、メーリングリストで参照されているように、multilibサポートが壊れているようです。 64ビットのネイティブマシンを使用していますが、32ビットでコンパイルしようとするとエラーが発生します。ただし、64ビットでのコンパイルは正常に機能します。後でラップトップを調べて、この問題を回避するためにインストールしたパッケージを確認します。

0
Michael