2017-08-21 20 views
4

私はUdemy Haskellコースに従っています。これは、ある時点でStackオプションを使用してHaskellをダウンロードするように表示されています。問題に遭遇したときに$ PATHを設定してスタック設定を実行しました。Haskell Stack Setup - CPPプログラムを認識できない

configure: WARNING: configure can't recognize your CPP program, you may need to set --with-hs-cpp-flags=FLAGS explicitly 
configure: error: in `/Users/Dylan/.stack/programs/x86_64-osx/ghc-8.0.2.temp/ghc-8.0.2': 
configure: error: C compiler cannot create executables 

私は.stack/programs/x86_64-osx/ghc-8.0.2.temp/ghc-8.0.2/config.logに見て、この発見した...

configure:2234: checking for path to top of build tree 
configure:2255: result: /Users/Dylan/.stack/programs/x86_64-osx/ghc-8.0.2.temp/$ 
configure:2981: checking for perl 
configure:2999: found /usr/bin/perl 
configure:3011: result: /usr/bin/perl 
configure:3070: checking for a BSD-compatible install 
configure:3138: result: /usr/bin/install -c 
configure:3152: checking whether ln -s works 
configure:3156: result: yes 
configure:3168: checking for gsed 
configure:3199: result: sed 
configure:3211: checking XCode version 
configure:3222: result: 8.3.3 
configure:3226: XCode version component 1: 8 
configure:3228: XCode version component 2: 3 
configure:3263: checking for gcc 
configure:3281: found /usr/bin/gcc 
configure:3293: result: /usr/bin/gcc 
configure:3573: WARNING: configure can't recognize your CPP program, you may ne$ 
configure:3623: checking for llc-3.7 
configure:3656: result: no 
configure:3739: checking for llc 
configure:3772: result: no 
configure:3872: checking for opt-3.7 
configure:3905: result: no 
configure:3988: checking for opt 
configure:4021: result: no 
configure:4120: checking for ld 
configure:4138: found /usr/bin/ld 
configure:4150: result: /usr/bin/ld 
configure:4388: checking for gcc 
configure:4415: result: /usr/bin/gcc 
configure:4644: checking for C compiler version 
configure:4653: /usr/bin/gcc --version >&5 

私はconfigure: WARNING: configure can't recognize your CPP program, you may need to set --with-hs-cpp-flags=FLAGS explicitlyを読み取ることができるが、私はそれを行うには方法や場所を確認していません。私はsettings.inファイルを見つけました...

[("GCC extra via C opts", "@[email protected]"), 
("C compiler command", "@[email protected]"), 
("C compiler flags", "@[email protected]"), 
("C compiler link flags", "@[email protected]"), 
("C compiler supports -no-pie", "@[email protected]"), 
("Haskell CPP command","@[email protected]"), 
("Haskell CPP flags","@[email protected]"), 
("ld command", "@[email protected]"), 
("ld flags", "@[email protected]"), 
("ld supports compact unwind", "@[email protected]"), 
("ld supports build-id", "@[email protected]"), 
("ld supports filelist", "@[email protected]"), 
("ld is GNU ld", "@[email protected]"), 
("ar command", "@[email protected]"), 
("ar flags", "@[email protected]"), 
("ar supports at file", "@[email protected]"), 
("touch command", "@[email protected]"), 
("dllwrap command", "@[email protected]"), 
("windres command", "@[email protected]"), 
("libtool command", "@[email protected]"), 
("perl command", "@[email protected]"), 
("cross compiling", "@[email protected]"), 
("target os", "@[email protected]"), 
("target arch", "@[email protected]"), 
("target word size", "@[email protected]"), 
("target has GNU nonexec stack", "@[email protected]"), 
("target has .ident directive", "@[email protected]"), 
("target has subsections via symbols", "@[email protected]"), 
("Unregisterised", "@[email protected]"), 
("LLVM llc command", "@[email protected]"), 
("LLVM opt command", "@[email protected]") 
] 

また、私はそれをどうすればいいのか分かりません。申し訳ありませんが、私の質問が基本的だが、私は前にこれに似た何かをしていない、そして私がオンラインで見つけたものは、それが自分の状況にどのように適用できるかを解釈するのは難しい。

ご協力いただければ幸いです。

+0

関連する可能性があります。https://stackoverflow.com/questions/10357804/configure-error-c-compiler-cannot-create-executables –

+0

@ n.m。あなたのリンクで受け入れられた答えを読んだ後、私はXcodeコマンドラインツールのバージョンをチェックするように導かれました。私のバージョンは問題ありませんでしたが、私は 'config.log'に追加の行があることに気付きました。 'Xcode/iOSライセンスに同意するには管理者権限が必要です。sudo xcodebuild -licenseを実行してから、このコマンドを再試行してください。' 'sudo xcodebuild -license'を実行すると問題が解決しました。リードn.mに感謝します。 –

答えて

3

@ n.m xcodeでリストされたバージョンの開発者コマンドラインツールをチェックすることを推奨する質問の回答につながるリンクをコメントしました。私のバージョンはうまくいきましたが、後で私の問題の解決に導いた.stack/programs/x86_64-osx/ghc-8.0.2.temp/ghc-8.0.2/config.logにこの行が見つかりました。

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command 

sudo xcodebuild -license

は私がして正常 stack installを実行することができました。

関連する問題