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

Race condition generating PIO headers #761

Open
Gadgetoid opened this issue Apr 27, 2023 · 0 comments
Open

Race condition generating PIO headers #761

Gadgetoid opened this issue Apr 27, 2023 · 0 comments

Comments

@Gadgetoid
Copy link
Member

When building MicroPython from source including our C++ modules that include PIO headers, and typically with -j2 (or more) to parallelize the build tasks, it seems files depending on PIO headers are compiled before pioasm has even finished building 😬

It seems like a race condition relating to pico_generate_pio_header but I have yet to encounter it on non-MicroPython builds, so there might be something unique about our setup that's causing issues. EG:

[ 30%] Building CXX object CMakeFiles/pioasm.dir/pio_disassembler.cpp.o
[ 40%] Building CXX object CMakeFiles/pioasm.dir/gen/lexer.cpp.o
[ 50%] Building CXX object CMakeFiles/pioasm.dir/gen/parser.cpp.o
[ 60%] Building CXX object CMakeFiles/pioasm.dir/c_sdk_output.cpp.o
[ 70%] Building CXX object CMakeFiles/pioasm.dir/python_output.cpp.o
[ 80%] Building CXX object CMakeFiles/pioasm.dir/hex_output.cpp.o
[ 90%] Building CXX object CMakeFiles/pioasm.dir/ada_output.cpp.o
In file included from /home/runner/work/pimoroni-pico/pimoroni-pico/pimoroni-pico-f0975778f6a614886aa516a7d513625bfc194598/micropython/modules/picographics/picographics.cpp:1:
/home/runner/work/pimoroni-pico/pimoroni-pico/pimoroni-pico-f0975778f6a614886aa516a7d513625bfc194598/micropython/modules/../../drivers/st7789/st7789.hpp:14:10: fatal error: st7789_parallel.pio.h: No such file or directory
   14 | #include "st7789_parallel.pio.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/runner/work/pimoroni-pico/pimoroni-pico/pimoroni-pico-f0975778f6a614886aa516a7d513625bfc194598/micropython/modules/picographics/../../../drivers/st7789/st7789.cpp:1:
/home/runner/work/pimoroni-pico/pimoroni-pico/pimoroni-pico-f0975778f6a614886aa516a7d513625bfc194598/micropython/modules/picographics/../../../drivers/st7789/st7789.hpp:14:10: fatal error: st7789_parallel.pio.h: No such file or directory
   14 | #include "st7789_parallel.pio.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[100%] Linking CXX executable pioasm
[100%] Built target pioasm
[  4%] No install step for 'PioasmBuild'
[  4%] Completed 'PioasmBuild'
[  4%] Built target PioasmBuild
[  4%] Generating bs2_default.bin
[  4%] Generating bs2_default_padded_checksummed.S
[  4%] Built target bs2_default_padded_checksummed_asm
[  4%] Generating cyw43_bus_pio_spi.pio.h
[  4%] Built target cyw43_driver_picow_cyw43_bus_pio_spi_pio_h
[  4%] Generating st7789_parallel.pio.h
[  4%] Built target usermod_picographics_st7789_parallel_pio_h
[  4%] Generating apa102.pio.h
[  4%] Built target usermod_plasma_apa102_pio_h
[  4%] Generating ws2812.pio.h
[  4%] Built target usermod_plasma_ws2812_pio_h
[  5%] Generating pwm_cluster.pio.h
[  5%] Built target usermod_pwm_pwm_cluster_pio_h
[  5%] Generating encoder.pio.h
[  5%] Built target usermod_encoder_encoder_pio_h
Gadgetoid added a commit that referenced this issue Apr 27, 2023
Gadgetoid added a commit that referenced this issue Apr 28, 2023
CI: Single-job builds to avoid #761.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant