Problem compiling with WSL

Hello with recent commit i have this problem. Think this is cause by
space in PATH variable
Can this be fixed?

autoreconf: [configure.ac](http://configure.ac/): not using Libtool
autoreconf: running:
/home/ansuel/openwrt/staging_dir/host/bin/autoconf --include=m4
--include=. --prepend-include=/home/ansuel/openwrt/staging_dir/host/share/aclocal
--force
autoreconf: [configure.ac](http://configure.ac/): not using Autoheader
autoreconf: running:
/home/ansuel/openwrt/staging_dir/host/bin/automake --add-missing
--force-missing
autoreconf: Leaving directory `.'
(cd /home/ansuel/openwrt/build_dir/hostpkg/intltool-0.51.0/; if [ -x
configure ]; then cp -fpR
/home/ansuel/openwrt/scripts/config.{guess,sub}
/home/ansuel/openwrt/build_dir/hostpkg/intltool-0.51.0// && CC="ccache
gcc" CFLAGS="-O2 -I/home/ansuel/openwrt/staging_dir/host/include
-I/home/ansuel/openwrt/staging_dir/hostpkg/include
-I/home/ansuel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/host/include"
CXX="ccache g++"
CPPFLAGS="-I/home/ansuel/openwrt/staging_dir/host/include
-I/home/ansuel/openwrt/staging_dir/hostpkg/include
-I/home/ansuel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/host/include"
LDFLAGS="-L/home/ansuel/openwrt/staging_dir/host/lib
-L/home/ansuel/openwrt/staging_dir/hostpkg/lib
-L/home/ansuel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/host/lib"
CONFIG_SHELL="/usr/bin/env bash"
PATH=/home/ansuel/openwrt/staging_dir/hostpkg/bin:/home/ansuel/openwrt/staging_dir/hostpkg/usr/bin:/home/ansuel/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-9.1.0_musl_eabi/bin:/home/ansuel/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-9.1.0_musl_eabi/bin:/home/ansuel/openwrt/staging_dir/host/bin:/home/ansuel/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-9.1.0_musl_eabi/bin:/home/ansuel/openwrt/staging_dir/host/bin:/home/ansuel/openwrt/staging_dir/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/PROGRAMDATA/ORACLE/JAVA/JAVAPATH:/mnt/c/PROGRAM:FILES/BROADCOM/BROADCOM:802.11:NETWORK:ADAPTER:/mnt/c/WINDOWS/SYSTEM32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/SYSTEM32/WBEM:/mnt/c/WINDOWS/SYSTEM32/WINDOWSPOWERSHELL/V1.0/:/mnt/c/PROGRAM:FILES:(X86)/NVIDIA:CORPORATION/PHYSX/COMMON:/mnt/c/PROGRAM:FILES:(X86)/GNU/GNUPG/PUB:/mnt/c/PROGRAM:FILES:(X86)/PUTTY/:/mnt/c/PROGRAM:FILES/GIT/CMD:/mnt/c/USERS/ANSUE/APPDATA/LOCAL/MICROSOFT/WINDOWSAPPS:/mnt/c/PROGRAM:FILES:(X86)/NMAP:/mnt/c/ADB:/mnt/c/PROGRAM:FILES:(X86)/SKYPE/PHONE/:/mnt/c/WINDOWS/SYSTEM32/LIBRESSL/:/mnt/c/WINDOWS/SYSTEM32/OPENSSH/:/mnt/c/PROGRAM:FILES/NVIDIA:CORPORATION/NVIDIA:NVDLISR:/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/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/Ansue/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program:Files:(x86)/Nmap:/mnt/c/Users/Ansue/AppData/Local/Programs/Fiddler:/mnt/c/Users/Ansue/AppData/Local/Microsoft/WindowsApps:/snap/bin
 bash ./configure --target=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--program-prefix="" --program-suffix=""
--prefix=/home/ansuel/openwrt/staging_dir/hostpkg
--exec-prefix=/home/ansuel/openwrt/staging_dir/hostpkg
--sysconfdir=/home/ansuel/openwrt/staging_dir/hostpkg/etc
--localstatedir=/home/ansuel/openwrt/staging_dir/hostpkg/var
--sbindir=/home/ansuel/openwrt/staging_dir/hostpkg/bin ; fi )
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `(cd
/home/ansuel/openwrt/build_dir/hostpkg/intltool-0.51.0/; if [ -x
configure ]; then cp -fpR
/home/ansuel/openwrt/scripts/config.{guess,sub}
/home/ansuel/openwrt/build_dir/hostpkg/intltool-0.51.0// && CC="ccache
gcc" CFLAGS="-O2 -I/home/ansuel/openwrt/staging_dir/host/include
-I/home/ansuel/openwrt/staging_dir/hostpkg/include
-I/home/ansuel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/host/include"
CXX="ccache g++"
CPPFLAGS="-I/home/ansuel/openwrt/staging_dir/host/include
-I/home/ansuel/openwrt/staging_dir/hostpkg/include
-I/home/ansuel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/host/include"
LDFLAGS="-L/home/ansuel/openwrt/staging_dir/host/lib
-L/home/ansuel/openwrt/staging_dir/hostpkg/lib
-L/home/ansuel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/host/lib"
CONFIG_SHELL="/usr/bin/env bash"
PATH=/home/ansuel/openwrt/staging_dir/hostpkg/bin:/home/ansuel/openwrt/staging_dir/hostpkg/usr/bin:/home/ansuel/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-9.1.0_musl_eabi/bin:/home/ansuel/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-9.1.0_musl_eabi/bin:/home/ansuel/openwrt/staging_dir/host/bin:/home/ansuel/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-9.1.0_musl_eabi/bin:/home/ansuel/openwrt/staging_dir/host/bin:/home/ansuel/openwrt/staging_dir/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/PROGRAMDATA/ORACLE/JAVA/JAVAPATH:/mnt/c/PROGRAM:FILES/BROADCOM/BROADCOM:802.11:NETWORK:ADAPTER:/mnt/c/WINDOWS/SYSTEM32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/SYSTEM32/WBEM:/mnt/c/WINDOWS/SYSTEM32/WINDOWSPOWERSHELL/V1.0/:/mnt/c/PROGRAM:FILES:(X86)/NVIDIA:CORPORATION/PHYSX/COMMON:/mnt/c/PROGRAM:FILES:(X86)/GNU/GNUPG/PUB:/mnt/c/PROGRAM:FILES:(X86)/PUTTY/:/mnt/c/PROGRAM:FILES/GIT/CMD:/mnt/c/USERS/ANSUE/APPDATA/LOCAL/MICROSOFT/WINDOWSAPPS:/mnt/c/PROGRAM:FILES:(X86)/NMAP:/mnt/c/ADB:/mnt/c/PROGRAM:FILES:(X86)/SKYPE/PHONE/:/mnt/c/WINDOWS/SYSTEM32/LIBRESSL/:/mnt/c/WINDOWS/SYSTEM32/OPENSSH/:/mnt/c/PROGRAM:FILES/NVIDIA:CORPORATION/NVIDIA:NVDLISR:/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/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/Ansue/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program:Files:(x86)/Nmap:/mnt/c/Users/Ansue/AppData/Local/Programs/Fiddler:/mnt/c/Users/Ansue/AppData/Local/Microsoft/WindowsApps:/snap/bin
 bash ./configure --target=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--program-prefix="" --program-suffix=""
--prefix=/home/ansuel/openwrt/staging_dir/hostpkg
--exec-prefix=/home/ansuel/openwrt/staging_dir/hostpkg
--sysconfdir=/home/ansuel/openwrt/staging_dir/hostpkg/etc
--localstatedir=/home/ansuel/openwrt/staging_dir/hostpkg/var
--sbindir=/home/ansuel/openwrt/staging_dir/hostpkg/bin ; fi )'
make[3]: *** [Makefile:43:
/home/ansuel/openwrt/build_dir/hostpkg/intltool-0.51.0/.configured]
Error 1
make[3]: Leaving directory '/home/ansuel/openwrt/feeds/packages/libs/intltool'
time: package/feeds/packages/intltool/host-compile#2.10#0.29#4.51
make[2]: *** [package/Makefile:107:
package/feeds/packages/intltool/host/compile] Error 2
make[2]: Leaving directory '/home/ansuel/openwrt'
make[1]: *** [package/Makefile:103:
/home/ansuel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/stamp/.package_compile]
Error 2
make[1]: Leaving directory '/home/ansuel/openwrt'
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib"

Try to clean your wsl path

Hi this is a bit of necroposting... Anyway the correct fix is by excluding windows path from WSL

Also i advise to use WSL2 for openwrt compilation (buildroot require lots of IO speed and WSL1 is problematic with that)

1 Like

And you should also include the OpenWrt Wiki's WSL page in your solution! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.