swiftlang / swift-corelibs-libdispatch

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware
swift.org
Apache License 2.0
2.47k stars 461 forks source link

Make makefile more verbose #763

Closed etcwilde closed 2 years ago

etcwilde commented 2 years ago

We have a flaky modulemap file that is failing to get copied and we don't know why. It could be racing with the static libdispatch build, or it could be something else.

This is all we have to go on at the moment:

[8/30][ 26%][0.595s] Generating /home/build-user/swift-corelibs-libdispatch/dispatch/module.modulemap, /home/build-user/swift-corelibs-libdispatch/private/module.modulemap FAILED: /home/build-user/swift-corelibs-libdispatch/dispatch/module.modulemap /home/build-user/swift-corelibs-libdispatch/private/module.modulemap

cd home/build-user/build/buildbot_linux/swift-linux-aarch64/libdispatch-linux-aarch64-static-prefix/src/libdispatch-linux-aarch64-static-build && \
  /home/build-user/build/cmake-linux-aarch64/bin/cmake \
  -E copy_if_different \
  /home/build-user/swift-corelibs-libdispatch/dispatch/generic/module.modulemap \
  /home/build-user/swift-corelibs-libdispatch/dispatch/module.modulemap && \
  /home/build-user/build/cmake-linux-aarch64/bin/cmake \
  -E copy_if_different \
  /home/build-user/swift-corelibs-libdispatch/private/generic/module.modulemap \
  /home/build-user/swift-corelibs-libdispatch/private/module.modulemap

Error copying file (if different) from "/home/build-user/swift-corelibs-libdispatch/dispatch/generic/module.modulemap" to "/home/build-user/swift-corelibs-libdispatch/dispatch/module.modulemap".

etcwilde commented 2 years ago

@swift-ci please test Linux

etcwilde commented 2 years ago

As I was kind of afraid of, the output already seems to be at maximum verbosity. The output around generating the module map files is still pretty useless:

[293/1437][ 20%][9.214s] Performing build step for 'libdispatch-linux-x86_64-static'
[1/30][  3%][0.429s] Generating /home/build-user/swift-corelibs-libdispatch/dispatch/module.modulemap, /home/build-user/swift-corelibs-libdispatch/private/module.modulemap
[2/30][  6%][0.429s] Building C object src/CMakeFiles/dispatch.dir/allocator.c.o
...
[294/1437][ 20%][9.229s] Performing build step for 'libdispatch-linux-x86_64'
[1/30][  3%][0.191s] Generating /home/build-user/swift-corelibs-libdispatch/dispatch/module.modulemap, /home/build-user/swift-corelibs-libdispatch/private/module.modulemap
[2/30][  6%][0.192s] Building C object src/CMakeFiles/dispatch.dir/allocator.c.o

That all said, it's a little fishy that we're moving things around in the sources during the build and not confining the effects of the build just to the build directories. That can definitely spell trouble. If this is a race between the static and dynamic builds, limiting changes by the build system to the unique build directories would fix it.