This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do I build the non-X version of rxvt.exe?


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
franl@world.std.com
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.



--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]