ソースからのビルドの失敗

ソースからのビルドの失敗

Slackware64 14.2フルインストール時に最初からいくつかのソフトウェアを構築しようとしています。 Readmeファイルの指示に従いました。

 ./autogen.sh # only needed if building from git repo
 CFLAGS="-march=native" ./configure
# Use -march=native if building for a single machine
make

gitで複製してautogenを実行すると、次のように出力されます。

configure.ac:16: installing './compile'
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'

その後、マシンでビルドするときに次のコマンドを実行しましたが、エラーが発生しました。

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/xtd8865/data/builds/mine/cpuminer-multi/cpuminer-multi':
configure: error: C compiler cannot create executables
See `config.log' for more details

私が言ったように、これは完全なスラックウェアバージョンです。

gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/5.3.0/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../gcc-5.3.0/configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,go,java,lto,objc --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --with-python-dir=/lib64/python2.7/site-packages --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=gcc4-compatible --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --enable-lto --disable-install-libiberty --with-gnu-ld --verbose --enable-java-home --with-java-home=/usr/lib64/jvm/jre --with-jvm-root-dir=/usr/lib64/jvm --with-jvm-jar-dir=/usr/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar=/root/slackware64-current/source/d/gcc/antlr-runtime-3.4.jar --enable-java-awt=gtk --disable-gtktest --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
gcc version 5.3.0 (GCC) 

だから、なぜ実行ファイルを生成できないのか分かりません。私は標準ユーザーとしてこのコマンドを実行しました(rootとしても試しましたが、幸運ではありませんでした)。なぜ失敗したのですか?

config.logの出力はここにあります。 http://pastebin.com/QUqHW6zQ

ありがとう

ベストアンサー1

エラーは次の行にあります。

ac_cv_env_CFLAGS_value='*-march-native*'

何らかの理由でワイルドカード文字が含まれます。 gccで使用する前に、ログに使用法は表示されません。

  • ダウンロードにスクリプトエラーがあります。
  • 環境変数の設定によりスクリプトが混乱します。

スクリプトエラーを表示するには、シェルトレースをオンにして(set -x最初の行の後に追加)、出力をキャプチャして読み込む必要があります(stderrに進みます)。たくさんより長いログ...

おすすめ記事