Cygwin Package Port

From miki
Revision as of 17:53, 14 November 2008 by Mip (talk | contribs) (→‎socat: Building 2.0.0.0 beta 2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page explains how to build on Cygwin packages that are not part of the official Cygwin distribution.

Socat

A port of socat 1.6.0.1 on Cygwin is easily obtained (see [1]).

After untar & cd:

./configure
make
make install
make test

Porting socat 2.0.0.0 beta 2. After untar:

./configure
make

This gives the error message

gcc -O -D_GNU_SOURCE  -Wall -Wno-parentheses -DHAVE_CONFIG_H -I.   -o socat socat.o libxio.a -lutil  -lssl -lcrypto -lpthread
libxio.a(xio-ip.o):xio-ip.c:(.text+0x24): undefined reference to `___res_init'
libxio.a(xio-ip.o):xio-ip.c:(.text+0x51): undefined reference to `___res_state'
...

A way to fix it is to tell to link socat with the resolv library:

gcc -O -D_GNU_SOURCE  -Wall -Wno-parentheses -DHAVE_CONFIG_H -I.   -o socat socat.o libxio.a -lutil  -lssl -lcrypto -lpthread -lresolv

(note that /lib/libresolv.a is a link to /lib/libminires.dll.a on Cygwin)