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

Shimmed make is silencing warnings even with --verbose #1034

Closed
3 tasks done
jtanx opened this issue Sep 20, 2016 · 7 comments
Closed
3 tasks done

Shimmed make is silencing warnings even with --verbose #1034

jtanx opened this issue Sep 20, 2016 · 7 comments
Labels
outdated PR was locked due to age

Comments

@jtanx
Copy link

jtanx commented Sep 20, 2016

Please follow the general troubleshooting steps first:

  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • If you're seeing permission errors tried running sudo chown -R $(whoami) $(brew --prefix)?

Bug reports:

I was running into an issue where what should have been outputting a ton of warnings gave off no warnings at all - example build log: https://travis-ci.org/fontforge/fontforge/jobs/161231014

And I was very perplexed. Some further digging suggests that the shimmed make which makes use of xcrun which is also shimmed is piping the output to /dev/null? This is totally unexpected behaviour, as I should be able to see all warnings when building with --verbose.

If I just run /usr/bin/xcrun /usr/bin/make (from within the interactive shell), warnings appear as they should, but whatever the xcrun shim is doing is dumping all warnings into the void.


Just tried - --env=std doesn't help.

@MikeMcQuaid
Copy link
Member

Thanks for the bug report. Just to let you know that this write-up is good and it's on my list of things to work on.

@MikeMcQuaid MikeMcQuaid added the help wanted We want help addressing this label Nov 6, 2016
@ilovezfs
Copy link
Contributor

This should probably be reserved for debug mode.

@MikeMcQuaid
Copy link
Member

This is no longer on my list of things to work on but I'll happily help someone else who wishes to do so.

@amyspark
Copy link
Contributor

amyspark commented Dec 3, 2017

Are there any (easy) examples to trigger this? AFAIK everything is rerouted to the log:

$stderr.reopen(out)

and printed only in case of failure:
unless $CHILD_STATUS.success?
log_lines = ENV["HOMEBREW_FAIL_LOG_LINES"]
log_lines ||= "15"
log.flush
if !verbose || verbose_using_dots
puts "Last #{log_lines} lines from #{logfn}:"
Kernel.system "/usr/bin/tail", "-n", log_lines, logfn
end
log.puts
require "system_config"
require "build_environment"
env = ENV.to_hash
SystemConfig.dump_verbose_config(log)
log.puts
Homebrew.dump_build_env(env, log)
raise BuildError.new(self, cmd, args, env)

@jtanx
Copy link
Author

jtanx commented Dec 3, 2017

It's been a long time since I bothered looking at Homebrew, so not sure of an easy standalone example. But easy enough is what does the output from a current build of FontForge (from Homebrew) look like?

Compare against our Travis build which runs without: https://travis-ci.org/fontforge/fontforge/jobs/310179410

There are a ton of compiler warnings, which should show up similarly when built under Homebrew.

@amyspark
Copy link
Contributor

amyspark commented Dec 3, 2017

@jtanx Thanks for the tip.
Redirecting stderr to the log file prevents the warnings from showing up. Perhaps we should copy $stderr output to both screen and log when using --verbose? E.g. like this stackoverflow question .

@MikeMcQuaid
Copy link
Member

AFAIK everything is rerouted to the log

I'm going to close this as "expected behaviour" then (partly as well because it's been literally years with no work on it). Sorry!

@ghost ghost removed the help wanted We want help addressing this label Jan 24, 2018
@lock lock bot added the outdated PR was locked due to age label May 6, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

4 participants