Apr 9, 2009

Install Gnu Scientific library (gsl) for 64 bit compilation on x86_64 architecture machine(eg intel quad core xeon)

Download GSL. Follow the download link to download the latest version on the GNU site.
GNU

Step 1:
-------
Unzip the file

> untar xvfz gsl-1.12.tar.gz

Step 2:
-------
For 64 bit library in the x86_64 architecture in Mac OS 10.5.6 do the following steps.
Go inside the gsl folder then
run the configuration file with addition CFLAGS command.
> cd gsl
> ./configure CFLAGS="-m64 -arch m86_64"

Step 3:
-------
run the make command
> make

Step 4:
install the gsl
> sudo make install

The gsl default location is:
/usr/local
For include file it is
/usr/local/include
For lib file it is
/usr/local/lib

3 comments:

Anonymous said...

I think that the option should be:

./configure CFLAGS="-m64 -arch x86_64"

with an x86_64 rather than ./configure CFLAGS="-m64 -arch m86_64"

Just to clear up :)

stlandroidfan said...

Yes - you're right. I just stumbled upon this page and tried compiling GSL v. 1.14 under my 10.6.3 Snow Leopard MBP. It failed with the author's version - kept getting the gcc error. I then tried yours and it worked. Either way - I'm thankful to both of you!

Md. Alimoor Reza said...

I am glad that this post was helpful to others.

Carlo Cipolla's Laws of Stupidity

    "By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...