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

Print last logfile after encountering an error #4

Open
kpcyrd opened this issue Apr 17, 2022 · 2 comments
Open

Print last logfile after encountering an error #4

kpcyrd opened this issue Apr 17, 2022 · 2 comments

Comments

@kpcyrd
Copy link
Contributor

kpcyrd commented Apr 17, 2022

I encountered an error and had trouble figuring out what went wrong because the script just failed with "make indicated an error":

Running ['./scripts/feeds', 'install', '-a'] in /asdf/rebuild
Downloading https://downloads.cdn.openwrt.org/releases/21.02.2/targets/zynq/generic/config.buildinfo
Running ['make', "IGNORE_ERRORS='n m'", 'BUILD_LOG=1', 'BUILD_LOG_DIR=/tmp/rebuilderdawkrmT/out/logs', '-j5', 'defconfig'] in /asdf/rebuild
Running ['make', "IGNORE_ERRORS='n m'", 'BUILD_LOG=1', 'BUILD_LOG_DIR=/tmp/rebuilderdawkrmT/out/logs', '-j5', 'clean', 'V=s'] in /asdf/rebuild
Running ['make', "IGNORE_ERRORS='n m'", 'BUILD_LOG=1', 'BUILD_LOG_DIR=/tmp/rebuilderdawkrmT/out/logs', '-j5', 'download'] in /asdf/rebuild
Downloading https://downloads.cdn.openwrt.org/releases/21.02.2/targets/zynq/generic/packages/Packages
storing to /asdf/rebuild/Packages
Downloading https://downloads.cdn.openwrt.org/releases/21.02.2/targets/zynq/generic/sha256sums
storing to /asdf/rebuild/sha256sums_origin
Running ['make', "IGNORE_ERRORS='n m'", 'BUILD_LOG=1', 'BUILD_LOG_DIR=/tmp/rebuilderdawkrmT/out/logs', '-j5', 'tools/tar/compile'] in /asdf/rebuild
Error running ['make', "IGNORE_ERRORS='n m'", 'BUILD_LOG=1', 'BUILD_LOG_DIR=/tmp/rebuilderdawkrmT/out/logs', '-j5', 'tools/tar/compile']
[2022-04-17T19:16:59Z INFO  rebuilderd_worker::proc] "/usr/local/libexec/rebuilderd/rebuilder-openwrt.sh" exited with exit=exit status: 0, captured 169697 bytes
[2022-04-17T19:16:59Z INFO  rebuilderd_worker::rebuild] No output artifact found, marking as BAD: "/tmp/rebuilderdawkrmT/out/openwrt-21.02.2-zynq-avnet_zynq-zed-squashfs-sdcard.img.gz"
[2022-04-17T19:16:59Z ERROR rebuilderd_worker] Package failed to verify

After catting all files in the log folder and going through the output I found the root cause, but maybe this should've been available on stdout of the rebuild log?

checking for mkfifo... yes
checking whether mkfifo rejects trailing slashes... yes
checking whether mknod can create fifo without root privileges... configure: error: in `/asdf/rebuild/build_dir/host/tar-1.32':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
make[2]: *** [Makefile:32: /asdf/rebuild/build_dir/host/tar-1.32/.configured] Error 1
time: tools/tar/compile#14.57#7.36#24.34

Thanks!

@aparcar
Copy link
Owner

aparcar commented Apr 19, 2022

I somewhat disabled verbose logs as it slows down the CIs, it's just massive amounts of text. I think I could implement something like printing the error.txt file so people know where to look specifically.

@aparcar
Copy link
Owner

aparcar commented Apr 19, 2022

Does this solve the issue? #6

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

2 participants