###導入
Octaveでpkg install -forge controlと入力してcontrolパッケージを入れようとした際に一部で以下のようなエラーが現れ,インストールは失敗しました.
###エラーメッセージ
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin17.0.0/7.2.0' ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin17.0.0/7.2.0/../../..' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [__control_slicot_functions__.oct] Error 1 tar -xzf slicot.tar.gz /usr/local/Cellar/octave/4.2.1_6/bin/mkoctfile-4.2.1 __control_helper_functions__.cc mkdir sltmp mv slicot/src/*.f ./sltmp mv slicot/src_aux/*.f ./sltmp cp TG04BX.fortran ./sltmp/TG04BX.f cp TB01ZD.fortran ./sltmp/TB01ZD.f cd sltmp; /usr/local/Cellar/octave/4.2.1_6/bin/mkoctfile-4.2.1 -c *.f ar -rc slicotlibrary.a ./sltmp/*.o rm -rf sltmp slicot LFLAGS="-L/usr/local/Cellar/octave/4.2.1_6/lib/octave/4.2.1 -L/usr/local/Cellar/octave/4.2.1_6/lib -L/usr/local/opt/veclibfort/lib -lvecLibFort -L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin17.0.0/7.2.0 -L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin17.0.0/7.2.0/../../.. -lgfortran -lquadmath -lm" \ /usr/local/Cellar/octave/4.2.1_6/bin/mkoctfile-4.2.1 __control_slicot_functions__.cc common.cc slicotlibrary.a pkg: error running `make' for the control package. error: called from configure_make at line 95 column 9 install at line 192 column 7 pkg at line 394 column 9
とりあえず上2行の警告文から潰していこうと考えたのですが,ここで"x86_64-apple-darwin17.0.0"が存在せず代わりに"x86_64-apple-darwin16.7.0"が存在していることがわかりました.しかし,"gcc -v"のコマンドを与えた時
$gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.0.0 (clang-900.0.38) Target: x86_64-apple-darwin17.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
と表示され,Targetに"x86_64-apple-darwin17.0.0"が指定されていることがわかりました.
###本題
どのようにすれば"x86_64-apple-darwin17.0.0"ディレクトリが作られるのでしょうか.
またはどのようにすればgccのTargetを"x86_64-apple-darwin16.7.0"に変更することができるでしょうか.
###試したこと
苦し紛れに"x86_64-apple-darwin16.7.0"のディレクトリ名を"x86_64-apple-darwin17.0.0"に変更してみましたが,また違ったエラーメッセージが表示されControlパッケージを入れることはできませんでした.
###補足情報
MacBook Air(macOS HighSierra)
Xcode(version9.1)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。