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

Build fails if source code in cygwin home dir

XMLWordPrintable

    • b32
    • windows

        This was discovered while trying to help with a build problem on build-dev:
        https://mail.openjdk.java.net/pipermail/build-dev/2020-July/027917.html

        The problem is the --disable-absolute-paths-in-output option, which is default set to disable on release builds. When not allowing absolute paths, we rewrite absolute paths to relative in several types of build command lines. This rewrite relies on the WORKSPACE_ROOT variable to be fully resolved. Currently, if the workspace is located inside the cygwin root dir, the WORKSPACE_ROOT variable will have a path looking like "/home/user/jdk" while all other paths that we resolve files from will look like "/cygdrive/c/cygwin64/home/user/jdk". This causes the rewrite to fail and results in build errors like this:

        c1xx: fatal error C1083: Cannot open source file: '../../../..c:/cygwin64/home/young/jdk-master/jdk-master/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/BUILD_LIBJVM_pch.cpp': No such file or directory

        The fix is to make sure WORKSPACE_ROOT in basics.m4 only gets values that have been fixed using UTIL_FIXUP_PATH.

        This issue rarely occurs within Oracle, where Jib is already changing the working to be on the /cygdrive format, which is why we haven't seen it reported internally so far.

              erikj Erik Joelsson
              erikj Erik Joelsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: