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

JDK build fails with incorrect fixpath script

    XMLWordPrintable

Details

    • b28
    • generic
    • windows

    Backports

      Description

        Building JDK fails with the following error:
        ```
        Compiling 8 files for BUILD_TOOLS_LANGTOOLS
        error: file not found: C:\adecygwin64\tmp\fixpath.jp24ce\atfile
        ToolsLangtools.gmk:36: recipe for target '/cygdrive/c/ade/projects/jdk/git/jdk/build/windows-x64/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch' failed
        make[3]: *** [/cygdrive/c/ade/projects/jdk/git/jdk/build/windows-x64/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch] Error 3
        make/Main.gmk:74: recipe for target 'buildtools-langtools' failed
        make[2]: *** [buildtools-langtools] Error 2
        make[2]: *** Waiting for unfinished jobs....
        ```

        It seems to be caused by incorrectly generated fixpath script. In this case the following is created in `build/windows-x64` directory:
        ```
        #!/bin/bash
        export PATH="$PATH:/cygdrive/c/ade/cygwin64/var/tmp/jib-nsato/install/jdk/15/36/bundles/windows-x64/jdk-15_windows-x64_bin.zip/jdk-15/bin:/cygdrive/c/ade/cygwin64/var/tmp/jib-nsato/install/jpg/infra/builddeps/gnumake-cygwin_x64/4.0+1.0/gnumake-cygwin_x64-4.0+1.0.tar.gz/cygwin/bin:/cygdrive/c/ade/cygwin64/var/tmp/jib-nsato/install/jtreg/5.1/b01/bundles/jtreg_bin-5.1.zip/jtreg/bin:/cygdrive/c/ade/cygwin64/var/tmp/jib-nsato/install/jpg/infra/builddeps/autoconf-cygwin_x64/2.69+1.0.1/autoconf-cygwin_x64-2.69+1.0.1.tar.gz:/cygdrive/c/ade/cygwin64/var/tmp/jib-nsato/install/jpg/infra/builddeps/pandoc-windows_x64/2.3.1+1.0/pandoc-windows_x64-2.3.1+1.0.tar.gz/pandoc:/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Java/jdk-14.0.1/bin:/var/tmp/jib-ns~1/install/jpg/infra/buildd~1/devkit~1/vs2019~1.0/devkit~1.gz/vc/bin/x64:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/Users/nsato/AppData/Local/Programs/Microsoft VS Code/bin"
        . /cygdrive/c/ade/projects/jdk/git/jdk/open/make/scripts/fixpath.sh -e /usr/bin/cygpath -p /cygdrive -r C:\\ade\cygwin64 -t /tmp -c /cygdrive/c/Windows/system32/cmd.exe -q "$@"
        ```
        where the `-r C:\\ade\cygwin64` argument near the very end lacks an extra backslash (thus the temporary dir path gets incorrect). If I insert the extra backslash (`-r C:\\ade\\cygwin64`), the build continues.

        [~mikael] suggested the following patch:
        ```
        diff --git a/make/autoconf/basic_windows.m4 b/make/autoconf/basic_windows.m4
        index 8681442fe61..098205674ea 100644
        --- a/make/autoconf/basic_windows.m4
        +++ b/make/autoconf/basic_windows.m4
        @@ -158,7 +158,7 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
           else
             WINENV_PREFIX_ARG="$WINENV_PREFIX"
           fi
        - FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT/\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
        + FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
           FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh $FIXPATH_ARGS"
           FIXPATH="$FIXPATH_BASE exec"
        ```
        It looks correct to replace all the backslash characters in the root path, but result was the same.

        Attachments

          Issue Links

            Activity

              People

                ihse Magnus Ihse Bursie
                naoto Naoto Sato
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: