visualfc / liteide

LiteIDE is a simple, open source, cross-platform Go IDE.
GNU Lesser General Public License v2.1
7.6k stars 971 forks source link

Debugging from LiteIDE on MacOS M1 runs into Rosetta error #1313

Open oceanborn2 opened 1 month ago

oceanborn2 commented 1 month ago

Please answer these questions before submitting your issue. Thanks! Please download LiteIDE latest version and test before submitting your issue. Thanks! Done

What version of LiteIDE are you using (LiteIDE About - Version and Build Qt Version)?

LiteIDE X38.3 / QT 5.15.2

What version of Go are you using (go version)?

Go 1.23.1

What operating system and processor architecture are you using(go env)?

running on MacOS M1 (macbook pro) darwin/arm64

What did you do?

Trying to debug a program, I ran into an issue about Rosetta (apple tool for running amd64 code)

If possible, provide a recipe for reproducing the error. Simply running a debug session on the Mac from the Debug menu in LiteIDE

What did you expect to see?

Debugging session starting in graphics mode under LiteIDE debug window.

What did you see instead?

Message in the console: API server listening at: 127.0.0.1:64129 could not launch process: can not run under Rosetta, check that the terminal/shell in use is right for your CPU architecture

Checks I made on the CPU architecture of tools: % file ~/go/bin/dlv ~/go/bin/dlv: Mach-O 64-bit executable arm64

% file /Applications/LiteIDE.app/Contents/MacOS/gotools /Applications/LiteIDE.app/Contents/MacOS/gotools: Mach-O 64-bit executable arm64

% file /Applications/LiteIDE.app/Contents/MacOS/gocode /Applications/LiteIDE.app/Contents/MacOS/gocode: Mach-O 64-bit executable arm64

% file /Applications/LiteIDE.app/Contents/MacOS/gomodifytags /Applications/LiteIDE.app/Contents/MacOS/gomodifytags: Mach-O 64-bit executable x86_64

% file /Applications/LiteIDE.app/Contents/MacOS/dlv /Applications/LiteIDE.app/Contents/MacOS/dlv: Mach-O 64-bit executable arm64

% file /Applications/LiteIDE.app/Contents/MacOS/LiteIDE /Applications/LiteIDE.app/Contents/MacOS/LiteIDE: Mach-O 64-bit executable x86_64

so effectively, the binary is an x86_64 arch. So my question: Is there a way to build from sources the LiteIDE application so that it targets the ARM64 cpu architecture?

I did not see any such build on the sourceforge.

Is it related to building the C/C++ code?

Thanks for LiteIDE. It is very valuable.

Pascal

oceanborn2 commented 1 month ago

I did not spot earlier but the issue also goes true with the gomodifytags executable. What is the purpose of this tool?

the delve (dlv) command is fine.

I meant : "sourceforge & github downloads", not just sourceforge.