GMP on Windows with msys

623 views Asked by At

I'm trying to get gmp working with Dev-cpp on Windows 8.1. I've got msys set up and trying to build gmp, with no success. First, I got M4 errors, which I managed to fix, but now I'm stuck for a few hours and the internet isn't helping much. These are the warnings and errors I get:

configure: WARNING: +----------------------------------------------------------
configure: WARNING: | Cannot determine global symbol prefix.
configure: WARNING: | /c/Program Files (x86)/Dev-Cpp/MinGW64/bin/nm output doesn't contain a global data symbol.
configure: WARNING: | Will proceed with no underscore.
configure: WARNING: | If this is wrong then you'll get link errors referring
configure: WARNING: | to ___gmpn_add_n (note three underscores).
configure: WARNING: | In this case do a fresh build with an override,
configure: WARNING: |     ./configure gmp_cv_asm_underscore=yes
configure: WARNING: +----------------------------------------------------------
checking how to switch to read-only data section...     .section .rdata,"dr"
checking for assembler .type directive...
checking for assembler .size directive...
checking for assembler local label prefix... configure: WARNING: "/c/Program Files (x86)/Dev-Cpp/MinGW64/bin/nm" failure
configure: WARNING: cannot determine local label, using default L
L
checking for assembler byte directive... .byte
checking how to define a 32-bit word... ./configure: line 25284: /c/Program: No such file or directory
./configure: line 25284: /c/Program: No such file or directory
configure: error: cannot determine how to define a 32-bit word
configure: WARNING: cache variable lt_cv_path_LD contains a newline

I'd be really grateful for any help given.

2

There are 2 answers

1
David Heffernan On BEST ANSWER

Let's look at the errors:

checking for assembler local label prefix... configure: WARNING: "/c/Program Files (x86)/Dev-Cpp/MinGW64/bin/nm" failure
configure: WARNING: cannot determine local label, using default L
L
checking for assembler byte directive... .byte
checking how to define a 32-bit word... ./configure: line 25284: /c/Program: No such file or directory
./configure: line 25284: /c/Program: No such file or directory

Specifically /c/Program: No such file or directory. That seems to indicate that configure is not happy with the fact that Mingw is installed to a path that contains a space. So my guess is that the cleanest way forward is to find a way for your compiler to be installed to a path that contains no spaces.

0
Mel Viso Martinez On

Finally, I have fixed the same isue. In my case, having a C::B mingwin install is the origin of the problem, because the configure script get long pathnames like "C:\Program Files ..." and splits them in generated makefile. The solution that worked for me: Create a build bash file for c:\MinGW\msys\1.0\bin\sh.exe with contents like

export PATH=/c/MinGW/bin:/c/MinGW/msys/1.0/bin:$PATH
./configure
make