Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile Corkscrew using Cygwin

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.

like image 709
wip Avatar asked Apr 29 '26 16:04

wip


1 Answers

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.

like image 143
ak2 Avatar answered May 02 '26 03:05

ak2



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!