bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] Re: [Help-gsl] compiling with gsl on MAC OS X


From: Timothy Frasier
Subject: [Bug-gsl] Re: [Help-gsl] compiling with gsl on MAC OS X
Date: Sat, 26 Mar 2011 12:59:54 -0300

Hi Peter,

That did the trick!   Thank you very much, this has been causing me a headache 
for a while now.  I really appreciate your timely and helpful response.

-Tim

On 2011-03-26, at 11:52 AM, Peter Johansson wrote:

> Hi Tim,
> 
> Please keep list in cc.
> 
> If I understand correctly, the problem is that your libgsl is 64-bit and your 
> gcc builds 32-bit by default. I'm not sure how to change the behavior of your 
> gcc, so I think the easiest path would be to rebuild your gsl and configure 
> it for multiple architectures as described in the INSTALL file. In short: If 
> you already have a gsl directory issue 'make clean' before you configure. 
> Then configure with
> 
> ./configure CC="gcc -arch i386 -arch x86_64" CPP="gcc -E" CXXCPP="g++ -E"
> 
> that is you will build a library for both i386 and x86_64
> 
> followed by
> $ make
> $ make install
> as usual I think it may work.
> 
> Cheers,
> Peter
> 
> 
> On 3/26/11 10:37 AM, Timothy Frasier wrote:
>> Hi Peter,
>> 
>> Thanks for the quick reply.  I have installed gsl using several different 
>> methods to try to solve this, but get the same error every time.  I 
>> originally built it myself (using the approach outlined in the README and 
>> INSTALL files that come with gsl), so that the library and header files were 
>> in /usr/local/, and have also tried using fink, with the library and header 
>> files in /opt/local/.  My compiling commands for each are:
>> 
>> For my own build:
>> gcc -Wall -ggdb program.c -I/usr/local/include -L/usr/local/lib -lgsl 
>> -lgslcblas -lm -o outfile
>> (I realize that the search path automatically looks in /usr/local/ but I 
>> have tried with and without including specifying these locations, with the 
>> same result each time.
>> 
>> For fink installation:
>> gcc -Wall -ggdb program.c -I/opt/local/include -L/opt/local/lib -lgsl 
>> -lgslcblas -lm -o outfile
>> 
>> Does this raise any red flags?
>> 
>> -Tim
>> 
>> On 2011-03-26, at 11:17 AM, Peter Johansson wrote:
>> 
>>> Hi Tim,
>>> 
>>> I use gsl successfully on both snow leopard and tiger daily. Seems you have 
>>> built gsl with different architecture than how you build your own program. 
>>> How did you install gsl? Did you build it yourself or did you use for 
>>> example mac port or fink? How more exactly did you compile (link) your own 
>>> program. It's hard to help without more details.
>>> 
>>> Cheers,
>>> Peter
>>> 
>>> On 3/26/11 10:17 AM, Timothy Frasier wrote:
>>>> Hi,
>>>> 
>>>> I usually write and compile code with gsl on a LINUX machine, and that has 
>>>> always worked fine.  However, I need some of my programs to work on a MAC, 
>>>> and I am having trouble with gsl on my MAC (with snow leopard).  When I 
>>>> try to compile my program, I get the following error "file was built for 
>>>> i386 which is not the architecture being linked (x86_64).  I get this same 
>>>> error compiling from the command line, and using XCode.   I would greatly 
>>>> appreciate any help that you could give to solve this issue.  Thanks in 
>>>> advance.
>>>> 
>>>> Sincerely,
>>>> Tim Frasier
>>>> 
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> Timothy R. Frasier
>>>> Department of Biology
>>>> Saint Mary's University
>>>> 923 Robie Street
>>>> Halifax, NS B3H 3C3
>>>> Canada
>>>> E-mail: address@hidden
>>>> Tel: (902) 491-6382
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Help-gsl mailing list
>>>> address@hidden
>>>> http://lists.gnu.org/mailman/listinfo/help-gsl
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Timothy R. Frasier
>> Department of Biology
>> Saint Mary's University
>> 923 Robie Street
>> Halifax, NS B3H 3C3
>> Canada
>> E-mail: address@hidden
>> Tel: (902) 491-6382
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 
>> 
>> 
>> 
>> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Timothy R. Frasier
Department of Biology
Saint Mary's University
923 Robie Street
Halifax, NS B3H 3C3
Canada
E-mail: address@hidden
Tel: (902) 491-6382
~~~~~~~~~~~~~~~~~~~~~~~~~~~








reply via email to

[Prev in Thread] Current Thread [Next in Thread]