Re: Compiling roadrunner into cygwin

Jonas Borgström <[email protected]> 11 Feb 2003 13:21:25 +0100
Newsgroups gmane.network.beep.roadrunner.general
Organization CodeFactory AB
Message-ID <1044966085.301.40.camel@blinky>
On Mon, 2003-02-10 at 19:27, Andres Moya wrote:
> Hello.
> 
> I want to use RoadRunner 0.9.1 into Cygwin. I have downloaded the source
> package, done ./configure and then make. But there are some errors and
> it does not compile.
> 
> I have searched the mailing lists, but haven't found any reference to
> Cygwin. Could you help me, please?
> 
Hi,

I tried to reproduce this but I failed to get glib2 to build. I tried
both version 2.0.7 and 2.2.1. But both failed with some strange linking
error. Which version did you compile?

(I'm using cygwin 1.3.20)

*snip*

> make[3]: Entering directory 
> `/home/andres/roadrunner-0.9.1/profiles/null_echo'
> [...]
> /bin/bash ../../libtool --mode=link gcc  -g -O2  -o libnullecho.la  
> echo.lo ../../librr/librr-0.9.la 
> 
> *** Warning: This system can not link to static lib archive
> ../../librr/librr-0.9.la.
> *** I have the capability to make that library automatically link in
> when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> libtool: link: warning: `/lib/libgthread-2.0.la' seems to be moved
> 

This looks like a libtool issue. You can try to regenerate
the configure and libtool scripts by using the following
script:

http://afs.codefactory.se/~jonas/roadrunner/autogen.sh

> [...]
> 
> make[2]: Entering directory `/home/andres/roadrunner-0.9.1/tests'
> [...]
> generating import library for `cyggthread-2.0-0.dll'
> dlltool --as=as --dllname cyggthread-2.0-0.dll --def
> .libs/cyggthread-2.0-0.dll-def --output-lib
> .libs/libimp-cyggthread-2.0-0.a
> gcc -g -O2 -o rr-client.exe rr-client.o  -L/usr/lib
> ../librr/.libs/librr-0.9.a ../profiles/rot13/.libs/librrrot13.al
> ../profiles/null_echo/.libs/libnullecho.al
> /home/andres/roadrunner-0.9.1/librr/.libs/librr-0.9.a
> .libs/libimp-cyggthread-2.0-0.a -lpthread
> .libs/libimp-cyggobject-2.0-0.a .libs/libimp-cygglib-2.0-0.a -luser32
> -lkernel32 .libs/libimp-cygintl-2.a .libs/libimp-cygiconv-2.a
> .libs/libimp-cygxml2-2.a -lz
> ../librr/.libs/librr-0.9.a(rr-tcpconnection.lo)(.text+0x2fb): In
> function `rr_tcp_connection_get_type':
> /home/andres/roadrunner-0.9.1/librr/tcp/rr-tcpconnection.c:152:
> undefined reference to `_rr_win32_init_winsock'
> ../librr/.libs/librr-0.9.a(rr-tcpconnection.lo)(.text+0x1d2d): In
> function `rr_tcp_connection_connect_fd':
> /home/andres/roadrunner-0.9.1/librr/tcp/rr-tcpconnection.c:683:
> undefined reference to `_rr_win32_enable_nonblock'
> ../librr/.libs/librr-0.9.a(rr-tcpconnection.lo)(.text+0x2005): In
> function `rr_tcp_connection_connect':

The win32_* functions are helper functions for building roadrunner with
winsock on win32 platforms. These functions shouldn't be needed when
using cygwin1.dll.
(they are located in librr/tcp/rr-win32.[ch])

Can you try to replace all "#ifdef G_PLATFORM_WIN32" lines
with: "#if defined(G_PLATFORM_WIN32) && !defined(__CYGWIN__)"
in rr-tcpconnection.c and rr-tcplistener.c

> /home/andres/roadrunner-0.9.1/librr/tcp/rr-tcpconnection.c:769:
> undefined reference to `_gethostbyname@4'
> 

I'm not sure why gethostbyname is unresolved, perhaps we need to
link against winsock directly?

/ Jonas
-- 
Jonas Borgström                  [email protected]
CodeFactory AB                   http://www.codefactory.se/
Office: +46 (0)90 71 86 14