Closed
Description
Following the steps to build a windows version with Windows Subsystem Linux installed causes -fPIC errors
clang: fatal error: unsupported option '-fPIC' for target 'x86_64-pc-windows-msvc'
Main issue is when you type 'bash' it starts up and instance of WSL. When running configure this logic is applied
os_name=$(uname -s)
os_vers=$(uname -r)
echo "${script_name}: detected ${os_name} kernel version ${os_vers}."
# Define a single variable off of which we can branch to tell if we are
# building for Windows.
is_win=no
if [[ $os_name == MSYS* ]] || \
[[ $os_name == MINGW* ]] || \
[[ $os_name == CYGWIN* ]] ; then
is_win=yes
fi
Thus is_win is not set to true, as when using WSL "uname -s" it returns "Linux" !!! (as it should as it is running linux)
Apart from manually modifying this not sure how this should be fixed.
A user with WSL installed could be using it to build a proper Linux version or a Windows version, but using "os_name" will not indicate what the user intended!!