help-gsl
[Top][All Lists]
Advanced

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

Re: Required architecture 'x86_64' for GSL


From: Castellana Michele
Subject: Re: Required architecture 'x86_64' for GSL
Date: Wed, 4 Dec 2024 08:30:35 +0000

Dear Mark,
Thank you for your reply. I added the flags to ‘Other linker flags’ in Xcode 
(see screenshot attached), where I usually put these flags, but I get the same 
error.

[cid:547877e3-1574-43c2-aaf4-477b447e2dd4@FRAP264.PROD.OUTLOOK.COM]



What is strange is that this error goes away is I switch from ‘Release’ build 
mode to ‘Debug’ build mode, keeping the same build settings. Do you have any 
idea of why this error pops up?

Thank you
Best,
Michele

> On 3 Dec 2024, at 23:50, Mark Galassi <mark@galassi.org> wrote:
>
>
> Dear Michele,
>
> It looks to me like you are linking with libgsl, but not with libgslcblas.  
> You need both to resolve some gsl functions.
>
> This is usually handled by the "pkg-config" mechanism - on a linux system you 
> would add `pkg-config gsl --libs` to your linking line, or `gsl-config 
> --libs`.
>
> To show you what those outputs look like on my system:
>
> ~ $ pkg-config gsl --libs
> -lgsl -lgslcblas -lm
>
> Maybe you can add those three link instructions (-lgsl -lgslcblas -lm) 
> directly in your own build system, and then your final executable should link.
>
> Castellana Michele <Michele.Castellana@curie.fr> writes:
>
>> Hello everyone,
>> I am on macOS 14.6 and I am trying to build, with Xcode, an application 
>> which I created and which uses GSL. I installed GSL with
>>
>>
>> ./configure CC="gcc -m64" CXX="g++ -m64" CPP="gcc -E" CXXCPP="g++ -E"
>>
>> make
>> make install
>>
>> The installation works ok, but when I build with Xcode I get the warning 
>> message
>>
>>
>> ld: warning: ignoring file '/usr/local/lib/libgsl.28.dylib': found 
>> architecture 'arm64', required architecture 'x86_64'
>>
>> Undefined symbols for architecture x86_64:
>>
>>  "_gsl_blas_ddot", referenced from:
>>
>> […]
>>
>> and the build fails.
>>
>> Do you know how to fix this ?
>>
>> Thank you!
>> Best,

PNG image


reply via email to

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