Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micropython fails to build with the latest GCC 13 release #11464

Closed
stratakis opened this issue May 11, 2023 · 4 comments
Closed

Micropython fails to build with the latest GCC 13 release #11464

stratakis opened this issue May 11, 2023 · 4 comments
Labels

Comments

@stratakis
Copy link

Micropython on Fedora started failing with our latest updates to GCC 13.

Error:

../py/stackctrl.c: In function 'mp_stack_ctrl_init':
../py/stackctrl.c:32:32: error: storing the address of local variable 'stack_dummy' in 'mp_state_ctx.thread.stack_top' [-Werror=dangling-pointer=]
   32 |     MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
../py/stackctrl.c:31:18: note: 'stack_dummy' declared here
   31 |     volatile int stack_dummy;
      |                  ^~~~~~~~~~~
In file included from ../py/runtime.h:29,
                 from ../py/stackctrl.c:27:
../py/mpstate.h:296:23: note: 'mp_state_ctx' declared here
  296 | extern mp_state_ctx_t mp_state_ctx;
      |                       ^~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [../py/mkrules.mk:83: build/py/stackctrl.o] Error 1

Full build log attached.

build.log

@stratakis stratakis added the bug label May 11, 2023
@dlech
Copy link
Sponsor Contributor

dlech commented May 11, 2023

Should be fixed by #11402

@stratakis
Copy link
Author

Thanks for pointing it out. Trying out the fix.

@stratakis
Copy link
Author

Indeed the issue is fixed by #11402 . Sorry for the noise. Closing this.

@dpgeorge
Copy link
Member

If you need to build v1.20.0 without the error, try adding CFLAGS_EXTRA="-Wno-dangling-pointer" to the make invocation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants