Created
December 31, 2012 08:52
-
-
Save watermouth/4418360 to your computer and use it in GitHub Desktop.
Installing GSL in Mac OS X (version 10.7.5 ) の記録
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GSL - GNU Scientific Library - GNU Project - Free Software Foundation (FSF) | |
ライブラリの使用方法についてはmanual | |
http://www.gnu.org/software/gsl/manual/html_node/ | |
を参照する. | |
以下の通りに, 最終的には動作確認することができた. | |
0. ダウンロード | |
http://core.ring.gr.jp/pub/GNU/gsl/ | |
バージョンの一番新しいものをとる. .sigは無視. | |
今回は1.15 | |
1. 展開 | |
macならダブルクリックで展開できる | |
2. make | |
gsl-1.15 | |
にcdして | |
./configure | |
make | |
make clean (これは念の為) | |
[参考] | |
less README | |
Installation | |
============ | |
GSL follows the standard GNU installation procedure. Please consult | |
the INSTALL file in this distribution for more detailed instructions. | |
For information about specific platforms and compilers see the | |
"Compilation Notes" section in the INSTALL file. | |
less INSTALL | |
./configure もしくは ./configure --disable-shared (動的ライブラリなし) | |
make | |
make clean | |
3. テスト | |
make check > log 2>&1 | |
エラーが出ている… | |
make clean | |
./configure --disable-shared | |
make | |
make check > log 2>&1 | |
違うエラーではあるが. やはりエラーが出ている. | |
[Bug-gsl] gsl-1.15 fails 'make check' on Mac OS | |
これと同じように見える. | |
以下で詳しく議論されているようだ. | |
Re: [Bug-gsl] SV decomp failure | |
以下を試してみる. | |
make clean | |
export CFLAGS="-O0 -g" | |
./configure --disable-shared --disable-dependency-tracking | |
make | |
make check > log 2>&1補足Peter, could you try configuring a debug version (use 'export | |
CFLAGS="-O0 -g"' prior to configure) to see if you get the same | |
failure from 'make check' within the linalg directory?とあったからこれはデバッグ版なのだろう.-O1でも良いとある.-Osでも良い.最適化はできればO2までやりたいのであるが... | |
改めて, | |
CFLAGS = "-Os -g" ./configure | |
と実行した. | |
4. インストール | |
sudo make install | |
sudoをつけないといけない. | |
/usr/local/lib/ | |
に.a, .dylibファイル(静的・動的ライブラリ) | |
/usr/local/include/gsl/ | |
にヘッダファイル | |
がインストールされる. | |
5. 動作確認 | |
http://www.gnu.org/software/gsl/manual/html_node/Using-the-library.html | |
適当なディレクトリに例のファイル(bessel.cppとした)を保存. | |
コンパイル・リンク・実行 | |
g++ bessel.cpp -c | |
g++ -o bessel bessel.o -L /usr/local/lib/ -lgsl | |
./bessel | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment