Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001907

build-infra: issues with 'cut' when printing makefile durations on Solaris

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • infrastructure

      When I rewrote and compated the output of build times per top-level target, I wanted to remove the name of the target from the time (which was otherwise included as part of the file).

      In MakeHelper.gmk we have this line in TargetExit (~ line 144):
          $(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
              "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d " "`"

      However, on all Tendril solaris machines, this results in:
      /bin/sh: : cannot execute
      ## Finished langtools (build time 00:00:19 langtools)

      instead of
      ## Finished langtools (build time 00:00:19)

      It seems the $CAT does work, but not the $CUT, which turns into a "sh: : cannot execute". Does CUT resolve to the empty string? That's weird.

      Previously, I had $(CUT) -d " " -f 1 (note the order of arguments), and then I got even worse results.

      I couldn't reproduce this when running manually on some selected Solaris machine.

      I don't know what to make of this, but it's annoying.

            erikj Erik Joelsson
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: