Opened 5 years ago

Last modified 4 years ago

#1276 new defect

CCL doesn't work with CLX on Windows 7.

Reported by: fredgilham Owned by:
Priority: normal Milestone:
Component: other Version: 1.10
Keywords: CLX Cc:

Description

On Windows 7 using CCL in a command-line window, using quicklisp CLX (clx-20150302-git). I try the following:

(require :clx) (xlib:open-display (machine-instance))

I get an error: "Connection failure to X0.0 server starbot display 0:"

The same commands work fine on SBCL.

Note also that the connection to the socket works:

(xlib:open-x-stream "starbot" 0 :tcp) #<BASIC-TCP-STREAM ISO-8859-1 (SOCKET/2140) #x21014AECFD>

Change History (6)

comment:1 Changed 5 years ago by fredgilham

I should mention that CCL works fine with CLX on Ubuntu. Also, I should mention that I have tried several X servers: cygwin, XMing and VcXsrv?.

comment:2 follow-up: Changed 5 years ago by rme

Without investigating the problem at all, if I may ask, what leads you to suspect CCL itself rather than the CLX library?

comment:3 in reply to: ↑ 2 Changed 5 years ago by fredgilham

Replying to rme:

Without investigating the problem at all, if I may ask, what leads you to suspect CCL itself rather than the CLX library?

My thought process is that CLX + CCL works OK on Ubuntu. Also, CLX + SBCL works OK on Windows 7. So given these facts, the problem seems more likely to be related to CCL + Windows than CLX.

OTOH, there are implementation dependent things surrounding this part of the code, but the fact that CCL will connect to the socket as I indicated makes me think it's not socket-related, and therefore that it would seem to involve code that works elsewhere, and thus somehow a problem with CCL. Obviously I'm not sure.

comment:4 Changed 5 years ago by fredgilham

  • Version changed from trunk to 1.10

comment:5 Changed 5 years ago by fredgilham

More information. I spent a lot of time checking into this during the weekend. In the process I discovered some bugs in CLX that I've informed the quicklisp maintainer about.

In particular, I noticed that CCL would not make network connections to the X server even under Unix. Instead, it was using the unix domain socket. Duh. Once I set the DISPLAY environment variable to tell it to use the network connection, it failed. This was because it could not get the authorization data from the .Xauthority file. And this was because of a network byte-ordering issue. I fixed this by making the following change in CLX:

From: (let* ((addr (ccl::host-as-inet-host host))) To: (let* ((addr (ccl::htonl (ccl::host-as-inet-host host))))

After that, CCL would get the Xauth data and connect to the X server over the network with Unix.

However, it would still not do so under Windows 7, even when I disabled authorization using xhost +. More exactly, it would get the xauth data and make a connection to the socket, but fail after that.

I am not sure if this additional information is helpful, but it may indicate that the problem I'm seeing is related to network byte order problems elsewhere.

comment:6 Changed 4 years ago by pmicossi

I noticed this ticket just after I filed a ticket that probably explains your problem.

See: http://trac.clozure.com/ccl/ticket/1370

Last edited 4 years ago by pmicossi (previous) (diff)
Note: See TracTickets for help on using tickets.