Master will not compile on Windows7 #7018

issue ptschip opened this issue on November 14, 2015
  1. ptschip commented at 4:39 PM on November 14, 2015: contributor

    Failing to compile. I can get it to compile by doing:

    -#include "include/secp256k1.h" +#include "../include/secp256k1.h"

    It's obviously not finding the header, but not sure if that's really where it should be fixed

    make[3]: Leaving directory /c/bitcoin-a/src/leveldb' make[3]: Entering directory/c/bitcoin-a/src/secp256k1' gcc -I./ -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_c ontext.o src/gen_context.c:10:31: fatal error: include/secp256k1.h: No such file or direc tory #include "include/secp256k1.h" ^ compilation terminated. make[3]: *** [gen_context.o] Error 1 make[3]: Leaving directory /c/bitcoin-a/src/secp256k1' make[2]: *** [secp256k1/libsecp256k1.la] Error 2 make[2]: Leaving directory/c/bitcoin-a/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/bitcoin-a/src' make: *** [all-recursive] Error 1

  2. paveljanik commented at 6:26 PM on November 15, 2015: contributor

    This is strange...

    Pavels-MacBook-Pro:secp256k1 pavel$ l src/gen_context.c include/secp256k1.h 
    -rw-r--r--  1 pavel  wheel  25771 Nov 15 19:01 include/secp256k1.h
    -rw-r--r--  1 pavel  wheel   2356 Nov 15 19:01 src/gen_context.c
    Pavels-MacBook-Pro:secp256k1 pavel$ 
    

    It looks like the gcc's pwd is in src...

  3. paveljanik commented at 7:13 PM on November 15, 2015: contributor

    What gcc do you use? Please show us where gcc.

  4. ptschip commented at 7:35 PM on November 15, 2015: contributor

    $ gcc --version gcc.exe (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    same as i always use...

    On 15/11/2015 11:14 AM, paveljanik wrote:

    What |gcc| do you use? Please show us |where gcc|.

    — Reply to this email directly or view it on GitHub #7018 (comment).

  5. paveljanik commented at 9:25 PM on November 15, 2015: contributor

    Can you please run

    gcc -I./ -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o
    

    In src/secp256k1 and paste result (especially lines starting with #include and following)?

  6. ptschip commented at 10:53 PM on November 15, 2015: contributor

    @paveljanik ran this in the src/secp256k directory as you requested.

    /c/bitcoin/src/secp256k1 $ gcc -I./ -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o ge n_context.o src/gen_context.c:10:31: fatal error: include/secp256k1.h: No such file or direc tory #include "include/secp256k1.h" ^ compilation terminated.

  7. paveljanik commented at 10:54 PM on November 15, 2015: contributor

    Oops, sorry - missed -v - to print paths...

  8. ptschip commented at 11:34 PM on November 15, 2015: contributor

    @paveljanik

    $ gcc -I./ -g -O2 -Wall -Wextra -Wno-unused-function -c -v src/gen_context.c -o gen_context.o Using built-in specs. COLLECT_GCC=c:\mingw32\bin\gcc.exe Target: i686-w64-mingw32

    GNU C (i686-posix-dwarf-rev1, Built by MinGW-W64 project) version 4.9.2 (i686-w6 4-mingw32) compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version 3.1.2-p 9, MPC version 1.0.2 warning: MPFR header version 3.1.2-p9 differs from library version 3.1.2-p10. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/ 4.9.2/include" ignoring nonexistent directory "C:/mingw492/i686-492-posix-dwarf-rt_v3-rev1/ming w32C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/4.9.2/../../../../include" ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/ 4.9.2/include-fixed" ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/ 4.9.2/../../../../i686-w64-mingw32/include" ignoring nonexistent directory "C:/mingw492/i686-492-posix-dwarf-rt_v3-rev1/ming w32/mingw/include" ignoring nonexistent directory "./" #include "..." search starts here: #include <...> search starts here: c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/include c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/include-fixed c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/i nclude End of search list. GNU C (i686-posix-dwarf-rev1, Built by MinGW-W64 project) version 4.9.2 (i686-w6 4-mingw32) compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version 3.1.2-p 9, MPC version 1.0.2 warning: MPFR header version 3.1.2-p9 differs from library version 3.1.2-p10. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: e8d9439611eb1674b755b61bb39cd06b src/gen_context.c:10:31: fatal error: include/secp256k1.h: No such file or direc tory #include "include/secp256k1.h" ^ compilation terminated.

  9. paveljanik commented at 7:03 AM on November 16, 2015: contributor

    This is it:

    ignoring nonexistent directory "./"
    

    Does -I. work?

  10. ptschip commented at 3:11 PM on November 16, 2015: contributor

    yup, you got it...that works :)

    On 15/11/2015 11:04 PM, paveljanik wrote:

    This is it:

    |ignoring nonexistent directory "./" |

    Does |-I.| work?

    — Reply to this email directly or view it on GitHub #7018 (comment).

  11. jonasschnelli commented at 8:08 PM on November 16, 2015: contributor

    Seems to be solved. Closing.

  12. jonasschnelli closed this on Nov 16, 2015

  13. paveljanik commented at 8:25 PM on November 16, 2015: contributor

    Issue is solved, but it should be closed by PR fixing it ;-)

  14. jonasschnelli commented at 8:38 PM on November 16, 2015: contributor

    Aiik. Sorry, thought it was a local issue. Reopening.

  15. jonasschnelli reopened this on Nov 16, 2015

  16. paveljanik commented at 8:40 PM on November 16, 2015: contributor

    Probably removing / at the end of this line https://github.com/bitcoin/secp256k1/blob/master/Makefile.am#L78 @ptschip Can you please try it and then PR it against secp256k1 so @sipa can merge it?

  17. ptschip referenced this in commit 0589d13c88 on Nov 17, 2015
  18. jonasschnelli added the label Windows on Nov 17, 2015
  19. laanwj commented at 8:15 AM on November 24, 2015: member

    @theuni can you take a look here?

  20. laanwj closed this on Nov 25, 2015

  21. doged commented at 4:35 PM on December 28, 2015: none

    im having an issue similar to this in ubuntu:

    CXX libbitcoinconsensus_la-uint256.lo CXX libbitcoinconsensus_la-utilstrencodings.lo make[3]: Entering directory '/home/testb0x/bitcoin/src/secp256k1' I. -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o /bin/bash: I.: command not found Makefile:1497: recipe for target 'gen_context.o' failed make[3]: [gen_context.o] Error 127 (ignored) gen_context.o -o gen_context /bin/bash: gen_context.o: command not found Makefile:1500: recipe for target 'gen_context' failed make[3]: *** [gen_context] Error 127 make[3]: Leaving directory '/home/testb0x/bitcoin/src/secp256k1' Makefile:7366: recipe for target 'secp256k1/libsecp256k1.la' failed make[2]: *** [secp256k1/libsecp256k1.la] Error 2 make[2]: Leaving directory '/home/testb0x/bitcoin/src' Makefile:6870: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/testb0x/bitcoin/src' Makefile:636: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

    i got past this last night, but it was late and i was tired and now i cant remember what i did to fix it, however i remember this issue helping me.

  22. doged commented at 4:52 PM on December 28, 2015: none

    output of manual verbose gcc attempt in libsecp256k1:

    testb0x@testb0x-VirtualBox:~/bitcoin/src/secp256k1$ gcc -I. -v -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o Using built-in specs. COLLECT_GCC=gcc Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.9.2-10ubuntu13' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13) COLLECT_GCC_OPTIONS='-I' '.' '-v' '-g' '-O2' '-Wall' '-Wextra' '-Wno-unused-function' '-c' '-o' 'gen_context.o' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.9/cc1 -quiet -v -I . -imultiarch x86_64-linux-gnu src/gen_context.c -quiet -dumpbase gen_context.c -mtune=generic -march=x86-64 -auxbase-strip gen_context.o -g -O2 -Wall -Wextra -Wno-unused-function -version -fstack-protector-strong -Wformat-security -o /tmp/ccNXvdar.s GNU C (Ubuntu 4.9.2-10ubuntu13) version 4.9.2 (x86_64-linux-gnu) compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.3 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../x86_64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: . /usr/lib/gcc/x86_64-linux-gnu/4.9/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. GNU C (Ubuntu 4.9.2-10ubuntu13) version 4.9.2 (x86_64-linux-gnu) compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.3 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 1dc035b74fe1af7d4b0e8c704cd33984 COLLECT_GCC_OPTIONS='-I' '.' '-v' '-g' '-O2' '-Wall' '-Wextra' '-Wno-unused-function' '-c' '-o' 'gen_context.o' '-mtune=generic' '-march=x86-64' as -v -I . --64 -o gen_context.o /tmp/ccNXvdar.s GNU assembler version 2.25 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.25 COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-I' '.' '-v' '-g' '-O2' '-Wall' '-Wextra' '-Wno-unused-function' '-c' '-o' 'gen_context.o' '-mtune=generic' '-march=x86-64' testb0x@testb0x-VirtualBox:~/bitcoin/src/secp256k1$

  23. doged commented at 4:54 PM on December 28, 2015: none

    so obviously the problem is "I. -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o /bin/bash: I.: command not found"

    its thinking I. is the command instead of gcc

  24. doged commented at 5:05 PM on December 28, 2015: none

    strange, so i ran that manually, but the .o file didnt have permissions, so it wasnt recognized. i ran gcc manually, gave the output file permissions, and was able to continue. strange.

  25. doged commented at 5:12 PM on December 28, 2015: none

    still though, i dont see why it didnt use gcc before -I. i get alot of permissions errors after cloning, and have to chmod +x alot of stuff..

  26. 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-04-17 03:15 UTC

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