This is the mail archive of the cygwin@sourceware.cygnus.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]

Re: cygwin on wine


> It is easy to verify that cygwin tools like "sh" do not run on Wine.
> Here is the output:
> 
> > wine "sh -c 'ls; sleep 20'"
> err:win32:fixup_imports No implementation for KERNEL32.dll.622(SetTapeParameters), setting to 0xdeadbeef
> fixme:console:SetConsoleCtrlHandler (0x6100af50,0) - no error checking or testing yet
> fixme:console:SetConsoleCtrlHandler (0x6100af50,1) - no error checking or testing yet
> fixme:security:LookupAccountSidA ((null),sid=0x61085704,0x42defbcc,0x42defbc8(20),0x42defb4c,0x42defb48(100),0x42defb44): semi-stub
> ls: not foundConsole: Making console complex (creating an xterm)...
> zsh: terminated  wine "sh -c 'ls; sleep 20'"
> 
> An xterm flashes quickly on the screen and then disappears.
> 
> This is what I meant when I said "No.  Cygwin does not run under Wine."
> 
> Possibly somebody who is really interested in getting cygwin working
> under wine will be interested in tracking this down.  I just tried this
> because this question pops up from time to time and I wanted to be able
> to answer the question.

Here's a long winded answer:

The answer is: Yes, sort of.  I got enough of "Cygwin under Wine"
working so that I could run the Cygwin programs (that I build in a
cross environment) under wine to verify they are working.
This lets me develop and test programs under Unix, cross build
it for WIN32 under Unix, and verify that it runs using Cygwin using Wine.

This is useful. I want to test programs targetted for a Windows
box on an open source system, and this setup lets me it without
any MS software at all.  I don't have a single Windows box in
the office.  However, any program that needs to exec (see
below) will fail and so you can't run shells and debuggers.

The issues are primarily with Wine, in that some of the tricks that
Cygwin uses aren't that important in many Windows programs and so
aren't implemented in Wine.

The first problem you'll find is that Cygwin's method of determining
what is at the other end of a file descriptor isn't handled cleanly
by Wine, resulting in opening /etc/passwd as a terminal.

I hacked Wine up enough so that that worked, I can provide the
patches (I'm not proud).  This will let you run most any Cygwin
program that doesn't try to exec.  This is enough to test the
programs you build, UNTIL you get to programs that fail only in
WIN32 (as I have had recently).  So now I want more of Cygwin
working so that I can run gdb under Cygwin.

This brings out that Wine can't handle programs without a RELOC
section.  I puzzled that out last week and built a shell with a
RELOC section that sort of worked, but there are still issues
similar to the first one I mentioned that keep it from working
fully.  The "sh -c ls" example will work, though.

It is all very solvable for someone who wants
it to work and has the time.  I'm going to continue doing this
at a low level as time permits (unless someone wants to fund me).

Peter

--

Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
HD Associates, Inc.               Fail-Safe systems, Agency approval

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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