Windows build appears broken on WSL (buntu okay) #10269

issue AllanDoensen opened this issue on April 24, 2017
  1. AllanDoensen commented at 2:33 PM on April 24, 2017: contributor

    Get the latest WSL on windows 10. clone a clean copy of core. This is on Windows 10. Ubuntu looks okay.

    allan@DESKTOP-U9EV6QE:~$ git clone https://github.com/Bitcoin/Bitcoin.git Cloning into 'Bitcoin'... remote: Counting objects: 91026, done. remote: Compressing objects: 100% (3/3), done. remote: Total 91026 (delta 5), reused 4 (delta 4), pack-reused 91019 Receiving objects: 100% (91026/91026), 79.40 MiB | 137.00 KiB/s, done. Resolving deltas: 100% (67842/67842), done. Checking connectivity... done. Checking out files: 100% (1491/1491), done. allan@DESKTOP-U9EV6QE:~$ cd Bitcoin/ .cache/ core/ Desktop/ .subversion/ BitcoinUnlimited/ .ccache/ .dbus/ .gconf/ bu2/ .config/ .dbus-keyrings/ .mozilla/ allan@DESKTOP-U9EV6QE:~$ cd Bitcoin allan@DESKTOP-U9EV6QE:~/Bitcoin$ cd depends/ allan@DESKTOP-U9EV6QE:~/Bitcoin/depends$ make HOST=x86_64-w64-mingw32 Fetching ccache-3.3.3.tar.bz2 from https://samba.org/ftp/ccache % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 261 100 261 0 0 28 0 0:00:09 0:00:09 --:--:-- 55 100 337k 100 337k 0 0 20729 0 0:00:16 0:00:16 --:--:-- 77660 /home/allan/Bitcoin/depends/work/download/native_ccache-3.3.3/ccache-3.3.3.tar.bz2.temp: OK Extracting native_ccache... /home/allan/Bitcoin/depends/sources/ccache-3.3.3.tar.bz2: OK Preprocessing native_ccache... Configuring native_ccache... /bin/sh: 1: Syntax error: "(" unexpected make: *** [/home/allan/Bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-43ca3e6a03b/./.stamp_configured] Error 2 allan@DESKTOP-U9EV6QE:~/Bitcoin/depends$

  2. fanquake added the label Windows on Apr 24, 2017
  3. laanwj commented at 2:55 PM on April 24, 2017: member
  4. AllanDoensen commented at 3:14 PM on April 24, 2017: contributor

    Yes. I believe this is an issue with latest WSL. It was working a week or so ago.

  5. achow101 commented at 5:51 PM on April 24, 2017: member

    I was able to replicate the issue. It seems like an issue with WSL itself and not with this project

  6. AllanDoensen commented at 3:36 AM on April 25, 2017: contributor

    This is an issue with the latest version of Microsofts WSL. If I roll back the core code to a version that I have previously built in the past, then it now fails. I have also tried this on two separate windows machines. A set by step guild on how to cause the issue:

    From the WSL bash shell:

    sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-x86-64-dev git clone https://github.com/bitcoin/bitcoin.git cd bitcoin cd depends make HOST=x86_64-w64-mingw32

    The build fails as above. So if you build on windows then do not upgrade.

  7. laanwj added the label Upstream on Apr 25, 2017
  8. laanwj commented at 5:17 AM on April 25, 2017: member

    /bin/sh: 1: Syntax error: "(" unexpected make: *** [/home/allan/Bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-43ca3e6a03b/./.stamp_configured] Error 2

    Maybe they changed the default shell? Just a wild guess due to the error on a .sh file.

    To diagnose better we need to know what it is trying to run, and where at the time of the error.

  9. AllanDoensen commented at 10:15 AM on April 25, 2017: contributor

    @laanwj I checked the default shell and it is still bash. The error really does not give me much & I am not really a makefile/script person. I had a look around but I am unable to determine what script is actually causing the error.

  10. laanwj commented at 11:00 AM on April 25, 2017: member

    @AllanDoensen Debugging makefiles isn't really my specialty either. Maybe @theuni has an idea.

  11. theuni commented at 4:15 PM on April 26, 2017: member

    @AllanDoensen or @achow101 Could you please retry with make HOST=x86_64-w64-mingw32 V=1 and post the output?

  12. achow101 commented at 6:12 PM on April 26, 2017: member

    @theuni

    $ make HOST=x86_64-w64-mingw32 V=1
    echo Configuring native_ccache...
    Configuring native_ccache...
    rm -rf /mnt/e/bitcoin/depends/x86_64-w64-mingw32; mkdir -p /mnt/e/bitcoin/depends/x86_64-w64-mingw32/lib; cd /mnt/e/bitcoin/depends/x86_64-w64-mingw32;
    mkdir -p /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-16a70ccf187/.
    cd /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-16a70ccf187/.;     PKG_CONFIG_LIBDIR=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/lib/pkgconfig PKG_CONFIG_PATH=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/share/pkgconfig PATH=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Python35-32/Scripts:/mnt/c/Program Files (x86)/Python35-32:/mnt/c/Python27/Lib/site-packages/PyQt4:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/AMD/ATI.ACE/Core-Static:/mnt/c/Program Files (x86)/GtkSharp/2.12/bin:/mnt/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/mnt/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/mnt/c/Program Files (x86)/GNU/GnuPG/pub:/mnt/c/Program Files (x86)/CMake/bin:/mnt/c/Program Files/ZeroMQ 4.0.4/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/PharosSystems/Core:/mnt/c/Program Files:/mnt/c/Program Files/MATLAB/R2016b/bin:/mnt/c/Program Files (x86)/AOMEI Backupper:/mnt/c/Program Files (x86)/Windows Kits/8.0/Windows Performance Toolkit:/mnt/c/Program Files/MiKTeX 2.9/miktex/bin/x64:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/mnt/c/Program Files (x86)/Skype/Phone:/mnt/c/Users/Andy Chow/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Jar2Exe Wizard:/mnt/c/Program Files (x86)/Nmap:/home/achow101/.rvm/bin   ./configure --host=x86_64-pc-linux-gnu --disable-dependency-tracking --prefix=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native         CC="gcc" CXX="g++" NM="nm" RANLIB="ranlib" AR="ar" CPPFLAGS="-I/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/include    " LDFLAGS="-L/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/lib    "
    /bin/sh: 1: Syntax error: "(" unexpected
    funcs.mk:242: recipe for target '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-16a70ccf187/./.stamp_configured' failed
    make: *** [/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-16a70ccf187/./.stamp_configured] Error 2
    
  13. sipa commented at 6:23 PM on April 26, 2017: member

    Looks like a lack of "" in some of the depends/ scripts?

  14. theuni commented at 7:10 PM on April 26, 2017: member

    @sipa Yep. @achow101 Could you please try this?

    I bet the latest WSL added those system paths.

    diff --git a/depends/funcs.mk b/depends/funcs.mk
    index 15e404e..12234ae 100644
    --- a/depends/funcs.mk
    +++ b/depends/funcs.mk
    @@ -129,9 +129,9 @@ $(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(
     
     $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
     $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
    -$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
    -$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
    -$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
    +$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
    +$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
    +$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
     $(1)_autoconf=./configure --host=$($($(1)_type)_host) --disable-dependency-tracking --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
     
     ifneq ($($(1)_nm),)
    
  15. achow101 commented at 8:00 PM on April 26, 2017: member

    @theuni Now I am getting this error:

    Building native_protobuf...
    make[1]: Entering directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/src'
    cd .. && make  am--refresh
    make[2]: Entering directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981'
    make[2]: Entering directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981'
    CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing autoconf
    CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing autoconf
     cd . && /bin/bash /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing automake-1.14 --foreign
     cd . && /bin/bash /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing automake-1.14 --foreign
    /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing: line 81: automake-1.14: command not found
    /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing: line 81: automake-1.14: command not found
    WARNING: 'automake-1.14' is missing on your system.
             You should only need it if you modified 'Makefile.am' or
             'configure.ac' or m4 files included by 'configure.ac'.
    WARNING: 'automake-1.14' is missing on your system.
             The 'automake' program is part of the GNU Automake package:
             You should only need it if you modified 'Makefile.am' or
             <http://www.gnu.org/software/automake>
             'configure.ac' or m4 files included by 'configure.ac'.
             It also requires GNU Autoconf, GNU m4 and Perl in order to run:
             The 'automake' program is part of the GNU Automake package:
             <http://www.gnu.org/software/autoconf>
             <http://www.gnu.org/software/automake>
             <http://www.gnu.org/software/m4/>
             It also requires GNU Autoconf, GNU m4 and Perl in order to run:
             <http://www.perl.org/>
             <http://www.gnu.org/software/autoconf>
             <http://www.gnu.org/software/m4/>
    Makefile:612: recipe for target 'Makefile.in' failed
             <http://www.perl.org/>
    make[2]: *** [Makefile.in] Error 1
    make[2]: *** Waiting for unfinished jobs....
    Makefile:612: recipe for target 'Makefile.in' failed
    make[2]: *** [Makefile.in] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: Leaving directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981'
    Makefile:1247: recipe for target '../configure' failed
    make[1]: *** [../configure] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make[2]: Leaving directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981'
    Makefile:1222: recipe for target 'Makefile.in' failed
    make[1]: *** [Makefile.in] Error 1
    make[1]: Leaving directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/src'
    funcs.mk:242: recipe for target '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/./.stamp_built' failed
    make: *** [/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/./.stamp_built] Error 2
    

    It's complaining about not having automake-1.14. I have automake-1.15 installed here. On my ubuntu machine I also have automake-1.15 but it does not have this error.

  16. theuni commented at 8:36 PM on April 26, 2017: member

    Automake should not be needed/invoked there. Could you rm -rf /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf and make with V=1 again?

  17. achow101 commented at 8:55 PM on April 26, 2017: member

    still fails

    $ make HOST=x86_64-w64-mingw32 V=1
    echo Extracting native_protobuf...
    Extracting native_protobuf...
    mkdir -p /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981
    cd /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981; mkdir -p /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981 && echo "ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910  /mnt/e/bitcoin/depends/sources/protobuf-2.6.1.tar.bz2" > /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.protobuf-2.6.1.tar.bz2.hash &&  sha256sum -c /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.protobuf-2.6.1.tar.bz2.hash && tar --strip-components=1 -xf /mnt/e/bitcoin/depends/sources/protobuf-2.6.1.tar.bz2
    /mnt/e/bitcoin/depends/sources/protobuf-2.6.1.tar.bz2: OK
    touch /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.stamp_extracted
    echo Preprocessing native_protobuf...
    Preprocessing native_protobuf...
    mkdir -p /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981 /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.patches-48998d7f981
    cd /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981;
    touch /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.stamp_preprocessed
    echo Configuring native_protobuf...
    Configuring native_protobuf...
    rm -rf /mnt/e/bitcoin/depends/x86_64-w64-mingw32; mkdir -p /mnt/e/bitcoin/depends/x86_64-w64-mingw32/lib; cd /mnt/e/bitcoin/depends/x86_64-w64-mingw32;
    mkdir -p /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.
    cd /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.;     PKG_CONFIG_LIBDIR=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/lib/pkgconfig PKG_CONFIG_PATH=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/share/pkgconfig PATH="/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Python35-32/Scripts:/mnt/c/Program Files (x86)/Python35-32:/mnt/c/Python27/Lib/site-packages/PyQt4:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/AMD/ATI.ACE/Core-Static:/mnt/c/Program Files (x86)/GtkSharp/2.12/bin:/mnt/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/mnt/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/mnt/c/Program Files (x86)/GNU/GnuPG/pub:/mnt/c/Program Files (x86)/CMake/bin:/mnt/c/Program Files/ZeroMQ 4.0.4/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/PharosSystems/Core:/mnt/c/Program Files:/mnt/c/Program Files/MATLAB/R2016b/bin:/mnt/c/Program Files (x86)/AOMEI Backupper:/mnt/c/Program Files (x86)/Windows Kits/8.0/Windows Performance Toolkit:/mnt/c/Program Files/MiKTeX 2.9/miktex/bin/x64:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/mnt/c/Program Files (x86)/Skype/Phone:/mnt/c/Users/Andy Chow/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Jar2Exe Wizard:/mnt/c/Program Files (x86)/Nmap:/home/achow101/.rvm/bin"   ./configure --host=x86_64-pc-linux-gnu --disable-dependency-tracking --prefix=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native --disable-shared        CC="gcc" CXX="g++" NM="nm" RANLIB="ranlib" AR="ar" CPPFLAGS="-I/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/include    " LDFLAGS="-L/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/lib    "
    checking whether to enable maintainer-specific portions of Makefiles... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking target system type... x86_64-pc-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for x86_64-pc-linux-gnu-strip... no
    checking for strip... strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking for x86_64-pc-linux-gnu-gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of gcc... none
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... none
    checking how to run the C++ preprocessor... g++ -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking minix/config.h usability... no
    checking minix/config.h presence... no
    checking for minix/config.h... no
    checking whether it is safe to define __EXTENSIONS__... yes
    checking C++ compiler flags...... use default: -O2  -g -DNDEBUG
    checking whether __SUNPRO_CC is declared... no
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... nm
    checking the name lister (nm) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for x86_64-pc-linux-gnu-objdump... no
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for x86_64-pc-linux-gnu-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for x86_64-pc-linux-gnu-ar... ar
    checking for archiver [@FILE](/bitcoin-bitcoin/contributor/file/) support... @
    checking for x86_64-pc-linux-gnu-strip... strip
    checking for x86_64-pc-linux-gnu-ranlib... ranlib
    checking command to parse nm output from gcc object... ok
    checking for sysroot... no
    checking for x86_64-pc-linux-gnu-mt... no
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    checking how to run the C++ preprocessor... g++ -E
    checking for ld used by g++... /usr/bin/ld -m elf_x86_64
    checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
    checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking for g++ option to produce PIC... -fPIC -DPIC
    checking if g++ PIC flag -fPIC -DPIC works... yes
    checking if g++ static flag -static works... yes
    checking if g++ supports -c -o file.o... yes
    checking if g++ supports -c -o file.o... (cached) yes
    checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... (cached) GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking for ANSI C header files... (cached) yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking for inttypes.h... (cached) yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking for stdlib.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for working memcmp... yes
    checking for working strtod... yes
    checking for ftruncate... yes
    checking for memset... yes
    checking for mkdir... yes
    checking for strchr... yes
    checking for strerror... yes
    checking for strtol... yes
    checking zlib version... ok (1.2.0.4 or later)
    checking for library containing zlibVersion... -lz
    checking for the pthreads library -lpthreads... no
    checking whether pthreads work without any flags... no
    checking whether pthreads work with -Kthread... no
    checking whether pthreads work with -kthread... no
    checking for the pthreads library -llthread... no
    checking whether pthreads work with -pthread... yes
    checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
    checking if more special flags are required for pthreads... no
    checking whether to check for GCC pthread/shared inconsistencies... yes
    checking whether -pthread is sufficient with -shared... yes
    checking whether what we have so far is sufficient with -nostdlib... no
    checking whether -lpthread saves the day... yes
    checking the location of hash_map... <tr1/unordered_map>
    checking for library containing sched_yield... none required
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/Makefile
    config.status: creating protobuf.pc
    config.status: creating protobuf-lite.pc
    config.status: creating config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    === configuring in gtest (/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/gtest)
    configure: running /bin/bash ./configure --disable-option-checking '--prefix=/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native'  '--host=x86_64-pc-linux-gnu' '--disable-dependency-tracking' '--disable-shared' 'CC=gcc' 'CXX=g++' 'NM=nm' 'RANLIB=ranlib' 'AR=ar' 'CPPFLAGS=-I/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/include    ' 'LDFLAGS=-L/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/lib    ' 'host_alias=x86_64-pc-linux-gnu' --cache-file=/dev/null --srcdir=.
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for x86_64-pc-linux-gnu-strip... no
    checking for strip... strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking for x86_64-pc-linux-gnu-gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of gcc... none
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... none
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... nm
    checking the name lister (nm) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for x86_64-pc-linux-gnu-objdump... no
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for x86_64-pc-linux-gnu-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for x86_64-pc-linux-gnu-ar... ar
    checking for archiver [@FILE](/bitcoin-bitcoin/contributor/file/) support... @
    checking for x86_64-pc-linux-gnu-strip... strip
    checking for x86_64-pc-linux-gnu-ranlib... ranlib
    checking command to parse nm output from gcc object... ok
    checking for sysroot... no
    checking for x86_64-pc-linux-gnu-mt... no
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    checking how to run the C++ preprocessor... g++ -E
    checking for ld used by g++... /usr/bin/ld -m elf_x86_64
    checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
    checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking for g++ option to produce PIC... -fPIC -DPIC
    checking if g++ PIC flag -fPIC -DPIC works... yes
    checking if g++ static flag -static works... yes
    checking if g++ supports -c -o file.o... yes
    checking if g++ supports -c -o file.o... (cached) yes
    checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... (cached) GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking for python... /usr/bin/python
    checking for the pthreads library -lpthreads... no
    checking whether pthreads work without any flags... no
    checking whether pthreads work with -Kthread... no
    checking whether pthreads work with -kthread... no
    checking for the pthreads library -llthread... no
    checking whether pthreads work with -pthread... yes
    checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
    checking if more special flags are required for pthreads... no
    checking whether to check for GCC pthread/shared inconsistencies... yes
    checking whether -pthread is sufficient with -shared... yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating scripts/gtest-config
    config.status: creating build-aux/config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    touch /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/./.stamp_configured
    echo Building native_protobuf...
    Building native_protobuf...
    mkdir -p /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.
    cd /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/.; PATH="/mnt/e/bitcoin/depends/x86_64-w64-mingw32/native/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Python35-32/Scripts:/mnt/c/Program Files (x86)/Python35-32:/mnt/c/Python27/Lib/site-packages/PyQt4:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/AMD/ATI.ACE/Core-Static:/mnt/c/Program Files (x86)/GtkSharp/2.12/bin:/mnt/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/mnt/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/mnt/c/Program Files (x86)/GNU/GnuPG/pub:/mnt/c/Program Files (x86)/CMake/bin:/mnt/c/Program Files/ZeroMQ 4.0.4/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/PharosSystems/Core:/mnt/c/Program Files:/mnt/c/Program Files/MATLAB/R2016b/bin:/mnt/c/Program Files (x86)/AOMEI Backupper:/mnt/c/Program Files (x86)/Windows Kits/8.0/Windows Performance Toolkit:/mnt/c/Program Files/MiKTeX 2.9/miktex/bin/x64:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/mnt/c/Program Files (x86)/Skype/Phone:/mnt/c/Users/Andy Chow/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Jar2Exe Wizard:/mnt/c/Program Files (x86)/Nmap:/home/achow101/.rvm/bin"   make -C src protoc
    make[1]: Entering directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/src'
    make[2]: Entering directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981'
     cd . && /bin/bash /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing automake-1.14 --foreign
    /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/missing: line 81: automake-1.14: command not found
    WARNING: 'automake-1.14' is missing on your system.
             You should only need it if you modified 'Makefile.am' or
             'configure.ac' or m4 files included by 'configure.ac'.
             The 'automake' program is part of the GNU Automake package:
             <http://www.gnu.org/software/automake>
             It also requires GNU Autoconf, GNU m4 and Perl in order to run:
             <http://www.gnu.org/software/autoconf>
             <http://www.gnu.org/software/m4/>
             <http://www.perl.org/>
    Makefile:612: recipe for target 'Makefile.in' failed
    make[2]: *** [Makefile.in] Error 1
    make[2]: Leaving directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981'
    Makefile:1222: recipe for target 'Makefile.in' failed
    make[1]: *** [Makefile.in] Error 1
    make[1]: Leaving directory '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/src'
    funcs.mk:242: recipe for target '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/./.stamp_built' failed
    make: *** [/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-48998d7f981/./.stamp_built] Error 2
    
  18. theuni commented at 9:46 PM on April 26, 2017: member

    I'm unsure what to say on this one. I don't know of anything that would do that other than busted timestamps.

  19. fanquake commented at 11:57 PM on April 26, 2017: member

    @achow101 Can you try make HOST=x86_64-w64-mingw32 V=1 AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=:

  20. AllanDoensen commented at 12:21 AM on April 27, 2017: contributor

    @fanquake Tried & it still failed. This is the output.

    allan@DESKTOP-U9EV6QE:~$ cd Bitcoin allan@DESKTOP-U9EV6QE:~/Bitcoin$ ls autogen.sh configure.ac CONTRIBUTING.md depends INSTALL.md Makefile.am share test build-aux contrib COPYING doc libbitcoinconsensus.pc.in README.md src allan@DESKTOP-U9EV6QE:~/Bitcoin$ cd depends/ allan@DESKTOP-U9EV6QE:~/Bitcoin/depends$ make HOST=x86_64-w64-mingw32 V=1 AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: echo Configuring native_ccache... Configuring native_ccache... rm -rf /home/allan/Bitcoin/depends/x86_64-w64-mingw32; mkdir -p /home/allan/Bitcoin/depends/x86_64-w64-mingw32/lib; cd /home/allan/Bitcoin/depends/x86_64-w64-mingw32; mkdir -p /home/allan/Bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-43ca3e6a03b/. cd /home/allan/Bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-43ca3e6a03b/.; PKG_CONFIG_LIBDIR=/home/allan/Bitcoin/depends/x86_64-w64-mingw32/native/lib/pkgconfig PKG_CONFIG_PATH=/home/allan/Bitcoin/depends/x86_64-w64-mingw32/native/share/pkgconfig PATH=/home/allan/Bitcoin/depends/x86_64-w64-mingw32/native/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/ProgramData/Oracle/Java/javapath_target_321071156:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Python27:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/mnt/c/Program Files/dotnet:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Git/cmd:/mnt/c/Strawberry/c/bin:/mnt/c/Strawberry/perl/site/bin:/mnt/c/Strawberry/perl/bin:/mnt/c/Program Files (x86)/Skype/Phone:/mnt/c/Users/Allan Doensen/AppData/Local/Microsoft/WindowsApps:/mnt/c/Python27 ./configure --host=x86_64-pc-linux-gnu --disable-dependency-tracking --prefix=/home/allan/Bitcoin/depends/x86_64-w64-mingw32/native CC="gcc" CXX="g++" NM="nm" RANLIB="ranlib" AR="ar" CPPFLAGS="-I/home/allan/Bitcoin/depends/x86_64-w64-mingw32/native/include " LDFLAGS="-L/home/allan/Bitcoin/depends/x86_64-w64-mingw32/native/lib " /bin/sh: 1: Syntax error: "(" unexpected make: *** [/home/allan/Bitcoin/depends/work/build/x86_64-w64-mingw32/native_ccache/3.3.3-43ca3e6a03b/./.stamp_configured] Error 2 allan@DESKTOP-U9EV6QE:~/Bitcoin/depends$

  21. achow101 commented at 2:09 AM on April 27, 2017: member

    @fanquake That fixed that error, now a new one, this time in libevent:

    Preprocessing libevent...
    mkdir -p /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/libevent/2.1.7-e605496dab5 /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/libevent/2.1.7-e605496dab5/.patches-e605496dab5
    cd /mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/libevent/2.1.7-e605496dab5;   ./autogen.sh
    autoreconf: Entering directory `.'
    autoreconf: configure.ac: not using Gettext
    autoreconf: running: : -I m4 --output=aclocal.m4t
    Can't exec ":": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
    autoreconf: failed to run :: No such file or directory
    funcs.mk:242: recipe for target '/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/libevent/2.1.7-e605496dab5/.stamp_preprocessed' failed
    make: *** [/mnt/e/bitcoin/depends/work/build/x86_64-w64-mingw32/libevent/2.1.7-e605496dab5/.stamp_preprocessed] Error 1
    

    @AllanDoensen Did you apply the patch the @theuni posted?

  22. AllanDoensen commented at 2:16 AM on April 27, 2017: contributor

    @achow101 No I did not put in the patch...

  23. scutmarx commented at 2:30 PM on April 27, 2017: none

    Thank goodness, I just had the same problem with you! However, when I log in to a non root user, everything is working properly. Maybe it suits you.

  24. ghost commented at 4:35 AM on June 9, 2017: none

    This error is caused by WSL now including Windows PATH. In bash, if you echo ${PATH}, you'll see it's merged. Here's mine, for example: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Crucial/Crucial Storage Executive:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/GNU/GnuPG/pub:/mnt/c/Users/sagac/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Microsoft VS Code/bin

    When I deleted everything but the Linux bits by setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, I was able to successfully get past the "Syntax error: "(" unexpected" error. (Windows executables are being included WSL, which can't handle unescaped "(" characters in the make script.)

  25. laanwj commented at 8:23 AM on June 9, 2017: member

    That's interesting, thanks for the information. Apparently MSVC's make.exe ends up being used before GNU's. MSVC's is pretty much entirely incompatible with the build system output, so then this result is expected. Adding the instruction to override the PATH to the build doc would make sense. On BSDs a similar problem exists and it's fixed by using gmake instead of make, but I don't think that alias exists on Ubuntu.

  26. NicolasDorier commented at 3:35 AM on June 29, 2017: contributor

    I bumped into this issue as well, it was indeed WSL taking the wrong make executable.

  27. laanwj commented at 7:58 AM on June 29, 2017: member

    May want to mention this gotcha in the windows build notes.

    On Jun 29, 2017 5:35 AM, "Nicolas Dorier" notifications@github.com wrote:

    I bumped into this issue as well, it was indeed WSL taking the wrong make executable.

    — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/issues/10269#issuecomment-311853455, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHutk-q0D7aD-NTD8p87nQq0SaKbdXsks5sIxt3gaJpZM4NGP5z .

  28. laanwj marked this as duplicate on Jul 21, 2017
  29. benhillis commented at 3:23 PM on July 24, 2017: none

    Windows Subsystem for Linux dev here. Reading through the above it looks like there is a script somewhere in the make process that is running into trouble with the spaces in the Windows paths that have been added to the Linux $PATH variable.

    I'm not familiar with this project but I'm guessing there's a script somewhere that not wrapping $PATH or a sub-element in quotes. Spaces are uncommon in Linux paths but they are not illegal. I'll try to figure out which script is at fault.

  30. benhillis commented at 4:15 PM on July 24, 2017: none

    @theuni - Your patch resolves this issue. Would it be possible to add that fix to funcs.mk?

  31. NicolasDorier commented at 9:35 AM on July 25, 2017: contributor

    @benhillis I am sorry I linked you to the wrong issue https://github.com/bitcoin/bitcoin/issues/8732

  32. MarcoFalke added the label Easy to implement on Jul 30, 2017
  33. MarcoFalke removed the label Upstream on Jul 30, 2017
  34. theuni commented at 2:16 PM on July 31, 2017: member

    @benhillis I'll pr something a bit cleaner. Thanks for having a look!

  35. tkaczorro commented at 12:26 PM on August 19, 2017: none

    Hi, I might have a similar issue but I got somewhat different error message than you.

    cd depends make HOST=x86_64-w64-mingw32

    The error message is:

    : not foundess: 4: ./config.guess: : not foundess: 6: ./config.guess: : not foundess: 33: ./config.guess: : not foundess: 34: ./config.guess: : not foundess: 36: ./config.guess: : not foundess: 48: ./config.guess: : not foundess: 57: ./config.guess: : not foundess: 60: ./config.guess: ./config.guess: 63: ./config.guess: Syntax error: word unexpected (expecting "in") : not foundb: 4: ./config.sub: : not foundb: 6: ./config.sub: : not foundb: 26: ./config.sub: : not foundb: 27: ./config.sub: : not foundb: 34: ./config.sub: : not foundb: 37: ./config.sub: : not foundb: 45: ./config.sub: : not foundb: 52: ./config.sub: : not foundb: 54: ./config.sub: : not foundb: 66: ./config.sub: : not foundb: 74: ./config.sub: : not foundb: 77: ./config.sub: ./config.sub: 80: ./config.sub: Syntax error: word unexpected (expecting "in") : not foundess: 4: ./config.guess: : not foundess: 6: ./config.guess: : not foundess: 33: ./config.guess: : not foundess: 34: ./config.guess: : not foundess: 36: ./config.guess: : not foundess: 48: ./config.guess: : not foundess: 57: ./config.guess: : not foundess: 60: ./config.guess: ./config.guess: 63: ./config.guess: Syntax error: word unexpected (expecting "in") : not foundb: 4: ./config.sub: : not foundb: 6: ./config.sub: : not foundb: 26: ./config.sub: : not foundb: 27: ./config.sub: : not foundb: 34: ./config.sub: : not foundb: 37: ./config.sub: : not foundb: 45: ./config.sub: : not foundb: 52: ./config.sub: : not foundb: 54: ./config.sub: : not foundb: 66: ./config.sub: : not foundb: 74: ./config.sub: : not foundb: 77: ./config.sub: ./config.sub: 80: ./config.sub: Syntax error: word unexpected (expecting "in") Makefile:72: hosts/.mk: No such file or directory Makefile:74: builders/.mk: No such file or directory /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Makefile: not found /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected /bin/sh: 1: Syntax error: "|" unexpected make: config.site.in: Command not found /bin/sh: 1: Syntax error: "|" unexpected make: config.site.in: Command not found /bin/sh: 1: Syntax error: "|" unexpected make: *** No rule to make target 'builders/.mk'. Stop.

    I am not a Linux user nor a developer so can you please explain how to address it in as simple language as possible. I just want to run Bitcoin Core to learn raw Bitcoin protocol.

    Thanks in advance for any help.

  36. neobitz commented at 5:32 PM on August 31, 2017: none

    Hi, I was following the instructions as below until I end up with an error from the last make command. Any suggestions on how this can be fixed?

    cd depends
    make HOST=x86_64-w64-mingw32 V=1 AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=:
    cd ..
    ./autogen.sh
    CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
    make
    

    After I execute 'make' I got this result:

    Making all in src make[1]: Entering directory '/mnt/c/Bitcoin/bitcoin/src' make[2]: Entering directory '/mnt/c/Bitcoin/bitcoin/src' CXX crypto/libbitcoinconsensus_la-aes.lo CXX crypto/libbitcoinconsensus_la-chacha20.lo CXX crypto/libbitcoinconsensus_la-hmac_sha256.lo CXX crypto/libbitcoinconsensus_la-hmac_sha512.lo CXX crypto/libbitcoinconsensus_la-ripemd160.lo CXX crypto/libbitcoinconsensus_la-sha1.lo CXX crypto/libbitcoinconsensus_la-sha256.lo CXX crypto/libbitcoinconsensus_la-sha512.lo CXX libbitcoinconsensus_la-arith_uint256.lo CXX consensus/libbitcoinconsensus_la-merkle.lo CXX libbitcoinconsensus_la-hash.lo CXX primitives/libbitcoinconsensus_la-block.lo CXX primitives/libbitcoinconsensus_la-transaction.lo CXX libbitcoinconsensus_la-pubkey.lo CXX script/libbitcoinconsensus_la-bitcoinconsensus.lo CXX script/libbitcoinconsensus_la-interpreter.lo CXX script/libbitcoinconsensus_la-script.lo CXX script/libbitcoinconsensus_la-script_error.lo CXX libbitcoinconsensus_la-uint256.lo CXX libbitcoinconsensus_la-utilstrencodings.lo make[3]: Entering directory '/mnt/c/Bitcoin/bitcoin/src/secp256k1' gcc -I. -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o gcc gen_context.o -o gen_context ./gen_context CC src/libsecp256k1_la-secp256k1.lo CCLD libsecp256k1.la libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only /usr/bin/x86_64-w64-mingw32-ar: u' modifier ignored since D' is the default (see U') make[3]: Leaving directory '/mnt/c/Bitcoin/bitcoin/src/secp256k1' CXXLD libbitcoinconsensus.la /usr/bin/x86_64-w64-mingw32-ar: u' modifier ignored since D' is the default (see U') CXX bitcoind-bitcoind.o GEN bitcoind-res.o CXX libbitcoin_server_a-addrdb.o CXX libbitcoin_server_a-addrman.o CXX libbitcoin_server_a-bloom.o CXX libbitcoin_server_a-blockencodings.o CXX libbitcoin_server_a-chain.o CXX libbitcoin_server_a-checkpoints.o CXX consensus/libbitcoin_server_a-tx_verify.o CXX libbitcoin_server_a-httprpc.o In file included from support/allocators/secure.h:9:0, from key.h:11, from base58.h:18, from httprpc.cpp:7: ./support/lockedpool.h:195:18: error: ‘mutex’ in namespace ‘std’ does not name a type mutable std::mutex mutex; ^ ./support/lockedpool.h:228:17: error: ‘once_flag’ in namespace ‘std’ does not name a type static std::once_flag init_flag; ^ ./support/lockedpool.h: In static member function ‘static LockedPoolManager& LockedPoolManager::Instance()’: ./support/lockedpool.h:215:9: error: ‘call_once’ is not a member of ‘std’ std::call_once(LockedPoolManager::init_flag, LockedPoolManager::CreateInstance); ^ ./support/lockedpool.h:215:24: error: ‘init_flag’ is not a member of ‘LockedPoolManager’ std::call_once(LockedPoolManager::init_flag, LockedPoolManager::CreateInstance); ^ Makefile:5478: recipe for target 'libbitcoin_server_a-httprpc.o' failed make[2]: *** [libbitcoin_server_a-httprpc.o] Error 1 make[2]: Leaving directory '/mnt/c/Bitcoin/bitcoin/src' Makefile:9256: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/mnt/c/Bitcoin/bitcoin/src' Makefile:740: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

  37. DarthJahus commented at 12:17 AM on November 6, 2017: none

    By removing "Program Files (x86)" folders and others containing spaces from PATH (in fact clearing all PATH both from CMD and Environment variables, both for user and system), it didn't show the /bin/sh: 1: Syntax error: "(" unexpected error anymore.

    By running the process as root (wasn't working as normal user) and make as suggested by @fanquake (i.e. make HOST=x86_64-w64-mingw32 V=1 AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=:), it didn't show WARNING: 'automake-1.14' is missing on your system. anymore.

    Build was successful.


    Built on: Windows Subsystem for Linux, Windows 10 TH3 stable (16299.19)

  38. rebroad commented at 2:28 AM on November 11, 2017: contributor

    I see the "undefined symbols not allowed" issue when I tried to compile v0.15.0.1 just now, and I also see this raised on StackExchange 6 months ago.

  39. laanwj referenced this in commit 7fbf3c638f on Nov 13, 2017
  40. fanquake commented at 11:48 PM on November 14, 2017: member

    Closing this now that #11438 has been merged. If anyone is still having issues, can you comment in #11685.

  41. fanquake closed this on Nov 14, 2017

  42. Nellacoin commented at 11:35 PM on June 16, 2018: none

    @neobitz

    I got the same errors when preforming make in cd/depends and heres how I fixed it; sudo chmod +x config.guess sudo chmod +x config.site.in sudo chmod +x config.sub sudo make -j4 HOST=x86_64-w64-mingw32

  43. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-05 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me