CodeLite on MacOS ARM64 system

CodeLite installation/troubleshooting forum
willliamford35
CodeLite Enthusiast
Posts: 14
Joined: Sun Nov 27, 2022 1:37 am
Genuine User: Yes
IDE Question: C++
Contact:

CodeLite on MacOS ARM64 system

Post by willliamford35 »

Whenever I compile C++ source files the objects are of the type AMD64 and will not link with my libraries that are all built for ARM64. I have tried to fix this by placing the flag "-arch=arm64" as a compiler option, but the IDE strips this off. If I do a compilation by typing in the CodLite generated g++ command using a terminal, the compilation is correct. Is there something I can set in the IDE to solve this problem?

Thanks.

willliamford35
CodeLite Enthusiast
Posts: 14
Joined: Sun Nov 27, 2022 1:37 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite on MacOS ARM64 system

Post by willliamford35 »

Solved.

User avatar
Jarod42
CodeLite Expert
Posts: 237
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: CodeLite on MacOS ARM64 system

Post by Jarod42 »

It would be fine to tell how it is fixed. For reference and for people having the same issue.

RAD
CodeLite Curious
Posts: 4
Joined: Sun Feb 11, 2024 4:42 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite on MacOS ARM64 system

Post by RAD »

I am having exactly the same issue and would be keen to learn how this has been fixed. Adding the flag "-arch=arm64" is indeed not a recognised compiler option for Codelite. I am running Codelite on a MAC Studio and installed it via Brew. Was a bit surprised to see that it downloaded "https://downloads.codelite.org/codelite ... e-x86_64.a", which might explain why its default is the X86 instruction set. Maybe this provides a clue, however I don't know how to steer Brew to download a dedicated ARM64 version (if it even exists).

Any help/steer would be appreciated!

RAD
CodeLite Curious
Posts: 4
Joined: Sun Feb 11, 2024 4:42 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite on MacOS ARM64 system

Post by RAD »

I found the following workaround that doesn't use Brew:

1) Directly download the version codelite-macOS_14.0-arm64.app.tar.gz from the archived downloads into the MAC downloads folder.

2) Type in the terminal in de downloads folder: xattr -cr codelite.app (this avoids the error message about the file being corrupted).

This works fine for now (with one exception that I will post as a separate issue).

The issue clearly seems related this brew statement:

brew reinstall --cask codelite-official

that apparently doesn't recognise the (Apple M1/M2/M3) -hardware it is running on and always selects the X86-version.

Post Reply