trezor / trezor-firmware

:lock: Trezor Firmware Monorepo
https://trezor.io
Other
1.29k stars 637 forks source link

build failures on ubuntu-latest? #3988

Open prusnak opened 2 days ago

prusnak commented 2 days ago

ISTM that the current master does not build on ubuntu-latest in the github CI

See the following failures of the bitcoin-hwi project:

cc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
embed/lib/assert.h:43:47: error: ‘__FILE_NAME__’ undeclared (first use in this function)

It would be great if these issues were fixed so the HWI CI works again.

matejcik commented 2 days ago

both those problems are resolved by using gcc 12, which can be installed on ubuntu. wondering if there is any way to make that clearer to users who run into these issues

prusnak commented 2 days ago

both those problems are resolved by using gcc 12, which can be installed on ubuntu.

Feel free to close the issue unless you want to keep it open to address this part:

wondering if there is any way to make that clearer to users who run into these issues

I can't think of anything except for updating the build documentation to contain CC=gcc-12 for Ubuntu.

matejcik commented 1 day ago

i was thinking more along the lines of:

 #if __GNUC__ < 12
    #error "This code requires GCC 12.0 or later."
  #endif

which is the reason (along with docs update) to keep this issue open

prusnak commented 1 day ago

error "This code requires GCC 12.0 or later."

Don't we also support Clang?

matejcik commented 1 day ago

we do, i don't know the required version off the top of my head. 15 presumably?