- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P4                     
     - 
    Affects Version/s: 9
 - 
    Component/s: infrastructure
 - 
    None
 
- 
        b22
 - 
        linux
 
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8047282 | 8u25 | Alexey Semenyuk | P4 | Resolved | Fixed | b03 | 
| JDK-8044303 | 8u20 | Alexey Semenyuk | P4 | Resolved | Fixed | b19 | 
| JDK-8052890 | emb-8u26 | Alexey Semenyuk | P4 | Resolved | Fixed | b17 | 
                    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.
-----------------------------------------------------------------------------------
## 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.
- backported by
 - 
                    
JDK-8044303 Install build fails on Ubuntu with sh error in compile_async.sh
-         
     - Resolved
 
 -         
 - 
                    
JDK-8047282 Install build fails on Ubuntu with sh error in compile_async.sh
-         
     - Resolved
 
 -         
 - 
                    
JDK-8052890 Install build fails on Ubuntu with sh error in compile_async.sh
-         
     - Resolved
 
 -