Skip to content

PATH Environment Variable causing build issues #8052

@betatester3016

Description

@betatester3016

Version

Version 10.0.19043.1526

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.16.3-microsoft-standard-WSL2

Distro Version

Ubuntu 20.04 LTS

Other Software

  • build-essentials
  • C & C++

Repro Steps

Install WSL2
Follow these build steps

  • checkout latest 19 build (git checkout coreelec-19)
  • make image

The build fails.

Expected Behavior

Build completes successful.

Actual Behavior

Build fails.

Diagnostic Logs

Log

The log shows for some unknow reasons quotes are added.

"PATH=/home/user/

resulting in a failed build:

*********** FAILED COMMAND ***********
ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_TARGET}
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************

Additional Information

Checking the PATH environment variable reveals:

echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/User/AppData/Local/Microsoft/WindowsApps:/snap/bin

Correcting the PATH variable:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib

results in a successful build.

  • This behavior does not occur under Ubuntu 20.04 LTS on actual hardware, nor under Ubuntu 20.04 LTS under VMWare player 16

  • This behavior is consistent under MS Windows 10 Version 10.0.19043.1526 & MS Windows 11 Version 10.0.22000.318

  • Installation method used:

Environment Action
Elevated Command Prompt followed by PowerShell wsl --install -d Ubuntu followed by wsl --update

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions