delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/03/21:11:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Cc: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
From: Francis Litterio <franl AT world DOT std DOT com>
Subject: Re: How do I build the non-X version of rxvt.exe?
Date: Sat, 03 May 2003 20:18:05 -0400
References: <Pine DOT GSO DOT 4 DOT 44 DOT 0305031602070 DOT 25128-100000 AT slinky DOT cs DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.44.0305031602070.25128-100000@slinky.cs.nyu.edu> (Igor
Pechtchanski's message of "Sat, 3 May 2003 16:06:37 -0400 (EDT)")
Message-ID: <uk7d7plbo.fsf@world.std.com>
Lines: 75
User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2
(i386-msvc-nt5.0.2195)
MIME-Version: 1.0

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 AT world DOT std DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019