3

I want to compile Corkscrew. However I am not very familiar with Unix environments.
Here are the things I have tried and how I failed.

Step 1 : I installed Cygwin and from the Cygwin Terminal (mintty.exe), I tried to invoke ./configure in the Corkscrew source directory, as instructed in the README file.
This action produced the following error message:

checking whether the C compiler (gcc  ) works... no

On further investigation, typing gcc in Cygwin Terminal produced :

-bash: gcc: command not found


Step 2 : I therefore downloaded Mingw32. There is now on my PC this file

C:\MinGW\bin\mingw32-gcc

I want Cygwin to be able to use this file as a gcc version.

Step 3 : I created a link under Cygwin (inspired by a different this article where a similar action is done for make).

cd /bin
ln -s /cygdrive/c/mingw/bin/mingw32-gcc.exe gcc.exe

However the instruction ./configure still produce the same error. The config.log teaches me that :

configure:912: gcc -o conftest    conftest.c  1>&5
configure: failed program was:

#line 907 "configure"
#include "confdefs.h"

main(){return(0);}


Step 4 : I momentarily give up trying to use Cygwin Terminal and switches to MinGW Shell. This time the ./configure command seems to be successful !

Step 5 : In MinGW Shell, I enter the make command. It returns the following error message :

gcc -DHAVE_CONFIG_H -I. -I. -I. -I.    -g -O2 -c corkscrew.c
corkscrew.c:2:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make: *** [corkscrew.o] Error 1

After a few searches I find more information in this stackoverflow question, where the first answer suggest to "go with Cygwin, which provides a POSIX compatibility wrapper on Windows."

Therefore it seems I have to stick to Cygwin. Thus my question : how do I get Cygwin to compile this program ?

Note : I think I need to give access to Cygwin to all the programs included in MinGW32, however adding the "C:\MinGW\bin\mingw32-gcc" string to my computer's PATH environment variable did not produce positive results.

Community
  • 1
  • 1
wip
  • 2,313
  • 5
  • 31
  • 47

1 Answers1

4

You need to install the Cygwin gcc compiler. Run Cygwin's setup.exe again, which is used both for the initial Cygwin install and subsequent updates and additions. Click your way through to the package selection screen, select the gcc4 package from the 'Devel' category, and click Next once more to start the install.

Chances are that the program you want to build depends on some libraries, in which case you'll need to go through setup.exe again and install the relevant libSOME-devel packages.

ak2
  • 6,629
  • 31
  • 27
  • Thank you for your comment. I tried your suggestion, but I still get the same error (message at the end of "Step 3"). I tried two things : first, installing all the cygwin packages. Second thing I tried : uninstalling all the packages, then reinstalling, gcc-4 only. Both times the results were unfortunately the same. Do you have any more suggestions ? – wip Mar 01 '12 at 02:10
  • 4
    Finally I realized there was an option to install for Corkscrew in the Cygwin setup.exe. I just checked it and installed it : I can now use it on my PC, which was actually just what I wanted. I'm closing the question, thanks again for your help. – wip Mar 01 '12 at 02:40
  • Corkscrew can be found in setup.exe for 32bit, but not for 64bit. – Dan Ciborowski - MSFT Sep 24 '13 at 11:24
  • could you please help me with - http://stackoverflow.com/questions/21600830/ssh-ing-to-remote-server-from-behind-a-proxy – whatf Feb 06 '14 at 11:02