lv_platformio icon indicating copy to clipboard operation
lv_platformio copied to clipboard

CI: force use more fresh compiler for `native` on OSX

Open puzrin opened this issue 4 years ago • 3 comments

Problem:

  • native (emulator) build uses default OS's gcc compiler
  • gcc in OSX is VERY old (they prefer llvm)

As a result, when you try to use some modern libs like ETL, build will fail. See https://github.com/puzrin/dispenser/blob/master/.github/workflows/ci.yml#L52-L54


I consider this as bug of PIO, but problem still exists.

puzrin avatar Jan 22 '21 00:01 puzrin

Yes, this is a good point!

There is no gcc port for the Apple Silicone Macs (M1, M1 Pro and M1 Max)

andrew-elsayeh avatar Jan 19 '22 14:01 andrew-elsayeh

Do PR, if you know how to fix https://github.com/lvgl/lv_platformio/blob/master/.github/workflows/ci.yml#L56-L76

puzrin avatar Jan 19 '22 15:01 puzrin

After lots of gyrations, I did manage to compile and execute this project on a Mac M1. The change was simple. Add a few items to build_flags in platformio.ini -arch arm64 -I /opt/homebrew/include -L /opt/homebrew/lib

bobwolff68 avatar Sep 20 '22 01:09 bobwolff68