Bug 14561

Summary: OpenJDK does not compile when building in WSL
Product: buildroot Reporter: Colin Foster <colin.foster>
Component: OtherAssignee: unassigned
Status: RESOLVED MOVED    
Severity: normal CC: buildroot, yann.morin.1998
Priority: P5    
Version: 2021.11   
Target Milestone: ---   
Hardware: All   
OS: Windows   
Host: Target:
Build:

Description Colin Foster 2022-01-31 18:10:58 UTC
Tested in 2021.11. As the summary suggests, when building in WSLv2, OpenJDK fails. If I were to wager a guess, OpenJDK is trying to be too smart about the fact that it is building on a Windows OS. Jumping to a Linux machine and compiling with the same config works as expected.

checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for a sed that does not truncate output... /usr/bin/sed
checking for df... /usr/bin/df
checking for nice... /usr/bin/nice
checking for greadlink... [not found]
checking for readlink... /usr/bin/readlink
checking for cygpath... [not found]
checking for wslpath... /usr/bin/wslpath
checking for lsb_release... /usr/bin/lsb_release
checking for cmd.exe... /mnt/c/Windows/system32/cmd.exe
checking for cmp... /usr/bin/cmp
checking for uniq... /usr/bin/uniq
checking build system type... x86_64-pc-wsl
checking host system type... arm-buildroot-linux-gnueabihf
checking target system type... arm-buildroot-linux-gnueabihf
checking openjdk-build os-cpu... windows-x86_64
checking openjdk-target os-cpu... linux-arm
checking openjdk-target C library... default
checking compilation type... cross
/home/colin/src/buildroot/output/build/openjdk-17.0.1+12/build/.configure-support/generated-configure.sh: line 34833: import: command not found
/home/colin/src/buildroot/output/build/openjdk-17.0.1+12/build/.configure-support/generated-configure.sh: line 34834: verify: command not found
configure: error: The path of TOPDIR, which resolves as "/home/colin/src/buildroot/output/build/openjdk-17.0.1+12", could not be imported.
configure exiting with result code 1
make: *** [package/pkg-generic.mk:285: /home/colin/src/buildroot/output/build/openjdk-17.0.1+12/.stamp_configured] Error 1
Comment 1 Yann E. MORIN 2024-06-15 15:00:32 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!