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

Compiler invocation not printed with --verbose #2025

Closed
varungandhi-src opened this issue Aug 13, 2022 · 3 comments · Fixed by #2230
Closed

Compiler invocation not printed with --verbose #2025

varungandhi-src opened this issue Aug 13, 2022 · 3 comments · Fixed by #2230
Labels

Comments

@varungandhi-src
Copy link

Steps to reproduce the behavior

Apply an incorrect patch to readline.c that causes compilation to fail (to mimic the situation I'm in, I don't have a minimal reproducer yet). Try building with --verbose. You'll see something like:

readline.c: ... error: <compiler error message>

1 error generated.
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2

<other stuff>

Inspect or clean up the working tree at /tmp/ruby-build.20220813172251.84708.XSQCpi
Results logged to /tmp/ruby-build.20220813172251.84708.log

The failing invocation itself is not printed (I checked the mentioned log as well), perhaps because the verbose is not being passed through to the make invocation.

Expected vs. actual behavior

With --verbose, I would expect all compiler invocations to be printed, so that one can narrow down the cause of the failure quickly, and potentially compare the invocation with a successful build in a different configuration.

Logs

n/a -- this bug isn't about my specific failure (I'll investigate that), but about --verbose.

@varungandhi-src
Copy link
Author

It wasn't too hard to work around this by using a custom CC which logs the invocations, so I think it's OK to close this if you want --verbose to not be so verbose. IIRC the compiler invocations for OpenSSL are printed though, so this behavior seems inconsistent and potentially unintentional.

@eregon
Copy link
Member

eregon commented Aug 14, 2022

It depends on what the Makefile prints, for openssl it seems to print command lines, for ruby the Makefile prints something like compiling foo.c. Not sure if there is a way to tweak that.

@mislav
Copy link
Member

mislav commented Sep 21, 2022

Agreed that ruby-build could logging names of external commands and the arguments that it invokes them with. These would be generally useful in logs, not just in --verbose mode.

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

Successfully merging a pull request may close this issue.

3 participants