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

Install build fails on Ubuntu with sh error in compile_async.sh

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b22
    • OS:
      linux

      Backports

        Description

        When I run a full JDK9 build, including the install directory, I get the following error:

        -----------------------------------------------------------------------------------
        ## Starting installer
        ...
        Sanity check passed.
        + command -v nproc
        /usr/bin/nproc
        + nproc
        + processor_count=4
        + min_job_count=2
        + max_job_count=5
        /localhome/kcr/java/jdk9-client/install/make/smartmake//compile_async.sh: 35: /localhome/kcr/java/jdk9-client/install/make/smartmake//compile_async.sh: Syntax error: "(" unexpected
        make[2]: *** [/localhome/kcr/java/jdk9-client/build/linux-x86_64-normal-server-release/install/lib/libcommon.a] Error 2
        make[1]: *** [/localhome/kcr/java/jdk9-client/build/linux-x86_64-normal-server-release/install/_install.timestamp] Error 2
        Reaping losing child 0x01c510a0 PID 4948
        Removing child 0x01c510a0 PID 4948 from chain.
        Reaping losing child 0x00b58750 PID 4919
        make: *** [installer-only] Error 2
        Removing child 0x00b58750 PID 4919 from chain.
        -----------------------------------------------------------------------------------

        The reason for the failure is that the script relies on bash features that are not standard POSIX shell features supported by the default "dash" shell. On Ubuntu Linux /bin/sh is sym-linked to /bin/dash so specifying "sh myscript.sh" will run the dash shell. The script in question does specify:

        #!/bin/bash

        so it is intended to be executed by bash, but something in the Makefile is specifying "sh" or "/bin/sh" explicitly.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                asemenyuk Alexey Semenyuk
                Reporter:
                kcr Kevin Rushforth
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: