lv_platformio
lv_platformio copied to clipboard
Why does GCC compiler using ARM64 format on Apple silicon compile X86_64 format?
I set platform=native on Mac M1 and it compiles using my native gcc compiler. Why is my native gcc compiler in ARM64 format and able to compile x86_64 files? This caused an error when linking to sdl2 in arm64 format that homebrew downloaded
I ran into the same problem.
For my situation, the Platform IO installed was Darwin_x86_64. It is because platform IO's builtin python is Intel for some reason.
pio system info
-------------------------- ---------------------------------------------
PlatformIO Core 6.1.13
Python 3.11.7-final.0
System Type darwin_x86_64
To fix, I did the following
- Uninstall the PlatformIO ID extension from VSCode.
- Change VSCode config
"platformio-ide.useBuiltinPython": false(default was true) - Exit VSCode.
- Remove the
$HOME/.platformiocreated by the PlatformIO IDE - Reinstall the PlatformIO. Now I got the right version.
pio system info
-------------------------- ---------------------------------------------
PlatformIO Core 6.1.13
Python 3.9.6-final.0
System Type darwin_arm64
Just in case someone else stumbles upon this issue. I gave up on using the VSCode IDE and instead just installed paltformio via homebrew
brew install platformio
I also had to change python to python3 in the platformio.ini file (Or, you can set an alias from python -> python)