Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Sat, 3 May 2003 21:37:04 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Francis Litterio cc: cygwin AT cygwin DOT com Subject: Re: How do I build the non-X version of rxvt.exe? In-Reply-To: Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 3 May 2003, Francis Litterio wrote: > Igor Pechtchanski wrote: > > > On Sat, 3 May 2003, Francis Litterio wrote: > > >> Here's the exact sequence of commands I'm using: > >> > >> bzcat rxvt-2.7.10-3-src.tar.bz2 | tar xvf - > >> cd rxvt > >> ./configure --prefix=/usr/local > >> make > >> unset DISPLAY > >> env | grep DISPLAY # To verify previous command. > >> src/rxvt.exe > >> > >> Then there's a pause for six or seven seconds, and I see: > >> > >> rxvt: can't open display :0 > > > IIRC, the W11 library is built as a DLL (libW11.dll), so you won't find > > the string W11_LIBRARY in rxvt.exe. > > Yes, you're right. Sorry about that mistake. > > > For rxvt to find the DLL, it has to > > either be in your path, or in the same directory as rxvt.exe. It's quite > > possible that if rxvt doesn't find this DLL it reverts to X11 code. > > Reading the code, I see that's not the logic. In rxvt/W11/wrap/wrap.c, > XOpenDisplay() does: > > _libname="libW11"; > > when DISPLAY is unset or set to ":0", otherwise it does: > > _libname="libX11"; > > Then _libname is used to generate the name of a library passed to > LoadLibrary(). I'm seeing this after my make completes: > > bash$ strings -a src/rxvt.exe | grep libW11 > bash$ > > Because the code in wrap.c is never linked into rxvt.exe, it doesn't > even know about libW11.dll, and it always uses > /usr/X11R6/bin/libX11.dll! > > I made this patch to rxvt/src/Makefile and got a working non-X version > of rxvt.exe: > > --- src/Makefile.orig 2003-05-03 20:41:30.000000000 -0400 > +++ src/Makefile 2003-05-03 20:56:22.000000000 -0400 > @@ -58,7 +58,7 @@ > CPPFLAGS = > LDFLAGS = > DEFS = -DHAVE_CONFIG_H > -LIBS = > +LIBS = ../W11/lib/libX11.a > DINCLUDE = > DLIB = > > but I'm not sure that's the right way to solve it, because the resulting > rxvt.exe still requires that libX11.dll is in my PATH, even though it > properly loads libW11.dll. > > Am I missing something obvious, or is the failure to link against > W11/lib/libX11.a really the heart of the problem? > > If so, why don't the Cygwin developers run into this problem? Perhaps > the rxvt source tarball I downloaded using setup.exe does not match the > CVS sources? > -- > Francis Litterio Francis, The following is from /usr/doc/Cygwin/rxvt-2.7.10.README (also in W11/CYGWIN-PATCHES/rxvt.README): Building: 1) configure ./configure --enable-utmp --enable-wtmp --enable-lastlog \ --enable-xpm-background --enable-menubar --enable-rxvt-scroll \ --enable-next-scroll --enable-xterm-scroll --enable-frills \ --enable-linespace --enable-mousewheel --enable-keepscrolling \ --enable-old-selection --enable-transparency \ --with-xpm-includes=`pwd`/W11/X11 --with-xpm-library=`pwd`/W11/lib \ --with-x-library=`pwd`/W11/lib \ --enable-languages --with-encoding=noenc \ CFLAGS="-O -g -W -I`pwd`/W11" \ LDFLAGS="-mwindows -Wl,--subsystem,console" \ DLIB=`pwd`/W11/wrap/rxvt_res.o 2) run make I'm guessing you were missing the "--with-x-library=`pwd`/W11/lib", although I would look carefully through configure options to make sure you won't need the others. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Knowledge is an unending adventure at the edge of uncertainty. -- Leto II -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/