Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-40739

"sbt packageBin" fails in cygwin or other windows bash session

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3.0
    • 3.4.0
    • Build, Windows
    • The problem occurs in Windows if sbt is started from a (non-WSL) bash session.

      See the spark PR link for detailed symptoms.

    Description

       In a Windows SHELL environment, such as cygwin or msys2/mingw64, etc,  Core.settings in project/SparkBuild.scala calls the wrong bash.exe if WSL bash is present (typically at C:\Windows), causing a build failure.  This occurs even though the proper bash.exe is in the PATH ahead of WSL bash.exe.

      This is fixed by spark PR 38228

      There are 3 parts to the fix, implemented in project/SparkBuild.scala :

      • determine the absolute path of the first bash.exe in the command line. 
      • determine the build environment (e.g., Linux, Darwin, CYGWIN, MSYS2, etc.)
      • For Windows SHELL environments, the first argument to the spawned Process is changed from "bash" to the absolute path.

      Attachments

        Activity

          People

            philwalk Phil Walker
            philwalk Phil Walker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: