Question

I am trying to compile libgpg-error-1.10 on Windows 7 64 bit OS but I am getting below error-

checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/libgpg-error-1.10/libgpg-error-1.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

When I open config.log file, I can see following relevant lines-

configure:3056: checking for gcc
configure:3072: found /mingw/bin/gcc
configure:3083: result: gcc
configure:3312: checking for C compiler version
configure:3321: gcc --version >&5
gcc.exe (GCC) 4.5.4 20110822 (prerelease)
Copyright (C) 2010 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.

configure:3332: $? = 0
configure:3321: gcc -v >&5
Using built-in specs.
COLLECT_GCC=c:\mingw\bin\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../../../build/gcc/src/configure --target=x86_64-w64-mingw32 --prefix=/c/bb/vista64-mingw32/mingw-x86-x86_64
/build/build/root --with-sysroot=/c/bb/vista64-mingw32/mingw-x86-x86_64/build/build/root --enable-languages=all,obj-c++ --ena
ble-fully-dynamic-string --disable-multilib
Thread model: win32
gcc version 4.5.4 20110822 (prerelease) (GCC)
configure:3332: $? = 0
configure:3321: gcc -V >&5
gcc.exe: '-V' option must have argument
configure:3332: $? = 1
configure:3321: gcc -qversion >&5
gcc.exe: unrecognized option '-qversion'
gcc.exe: no input files
configure:3332: $? = 1
configure:3354: checking for C compiler default output file name
configure:3376: gcc    conftest.c  >&5
gcc.exe: CreateProcess: No such file or directory
configure:3380: $? = 1
configure:3417: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libgpg-error"
| #define PACKAGE_TARNAME "libgpg-error"
| #define PACKAGE_VERSION "1.10"
| #define PACKAGE_STRING "libgpg-error 1.10"
| #define PACKAGE_BUGREPORT "bug-gnupg@gnupg.org"
| #define PACKAGE_URL ""
| #define PACKAGE "libgpg-error"
| #define VERSION "1.10"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
|  return ferror (f) || fclose (f) != 0;
|
|   ;
|   return 0;
| }
configure:3423: error: in `/libgpg-error-1.10/libgpg-error-1.10':
configure:3427: error: C compiler cannot create executables
See `config.log' for more details.

Any ideas how do I resolve this issue? I just need libgrcrypt .lib file so that I can use them in my project

Was it helpful?

Solution

It seems your PATH is wrong and gcc can't find some of its helper programs, as evidenced by:

 gcc.exe: CreateProcess: No such file or directory

Try to run gcc with a simple test program in the same shell you are using for configure and with the same PATH settings, it will most likely fail. You might be able to fix it with adding some directories like /mingw/bin to the PATH. It is more likely, however, that your gcc installation is incomplete or has some paths hardcoded and was then installed in a different location.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top