From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C0KNK-0001wN-GP for qemu-devel@nongnu.org; Thu, 26 Aug 2004 09:33:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C0KNF-0001vu-UU for qemu-devel@nongnu.org; Thu, 26 Aug 2004 09:33:10 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C0KNF-0001vr-Qe for qemu-devel@nongnu.org; Thu, 26 Aug 2004 09:33:05 -0400 From: Rafael =?iso-8859-1?q?=C1vila_de_Esp=EDndola?= Date: Thu, 26 Aug 2004 10:33:45 -0300 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_5aeLBEJLgU39C9j" Message-Id: <200408261033.45818.rafael.espindola@ic.unicamp.br> Subject: [Qemu-devel] notes under wine under qemu with the help of pth Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: pth-users@gnu.org, qemu-devel@nongnu.org, darwine-devel@lists.sourceforge.net, wine-devel@winehq.org --Boundary-00=_5aeLBEJLgU39C9j Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I was trying to run lotus notes under wine under qemu. Unfortunately qemu appears to have some trouble with linuxthreads. For example, consider the following program test.c: #include #include void * f(void *oie) { printf("tata\n"); pthread_exit(oie); return NULL; } int main() { pthread_t t; int i; pthread_create(&t,NULL,f,&i); printf("blit\n"); pthread_join(t, NULL); return 0; } I can compile and run it natively: $ gcc -Wall -o test -lpthread test.c $ ./test tata blit but qemu (i386 -> i386) fails: $ qemu-i386 ./teste qemu: Unsupported syscall: 258 Segmentation fault My next attempt was to use pth (www.gnu.org/software/pth): export LD_LIBRARY_PATH=/home/rafael/inst/pth/lib gcc -Wall -o teste -I/home/rafael/inst/pth/include/ -L/home/rafael/inst/pth/lib/-lpthread test.c $ ./test blit tata $ qemu-i386 ./teste blit tata Success with the test program. Wine is able to run putty and notes6 when compiled with linuxthreads. To compile wine with pth I had to create empty pthreadtypes.h and sigthread.h files in the pth include dir and apply the attached patch in wine. When compiled with pth wine is able to run putty (even inside qemu!). Unfortunately it fails to run notes6: wine "c:\lotus\notes\nlnotes.exe" fixme:console:SetConsoleCtrlHandler ((nil),0) - no error checking or testing yet fixme:console:SetConsoleCtrlHandler (0x601aa540,1) - no error checking or testing yet fixme:ole:CoRegisterMessageFilter stub fixme:ole:CoCreateInstance no classfactory created for CLSID {4955dd33-b159-11d0-8fcf-00aa006bcc59}, hres is 0x80040154 wine client error:d: version mismatch 0/147. Your wineserver binary was not upgraded correctly, or you have an older one somewhere in your PATH. Or maybe the wrong wineserver is still running? wine client error:d: read: Bad file descriptor wine client error:d: read: Bad file descriptor There was no wineserver running when I started the program and only one was in the path. The log of a successful execution when linked with linuxthreads is: fixme:console:SetConsoleCtrlHandler ((nil),0) - no error checking or testing yet fixme:console:SetConsoleCtrlHandler (0x601aa540,1) - no error checking or testing yet fixme:ole:CoRegisterMessageFilter stub fixme:ole:CoCreateInstance no classfactory created for CLSID {4955dd33-b159-11d0-8fcf-00aa006bcc59}, hres is 0x80040154 fixme:hook:NotifyWinEvent (32782,0x10036,-4,2)-stub! fixme:console:SetConsoleCtrlHandler ((nil),0) - no error checking or testing yet fixme:console:SetConsoleCtrlHandler (0x601aa540,1) - no error checking or testing yet fixme:ole:CoRegisterMessageFilter stub fixme:console:SetConsoleCtrlHandler (0x601aa540,0) - no error checking or testing yet fixme:console:SetConsoleCtrlHandler ((nil),1) - no error checking or testing yet I have followed the instructions present in http://vowe.net/archives/004104.html to install notes. Thanks for any help Rafael --Boundary-00=_5aeLBEJLgU39C9j Content-Type: text/x-diff; charset="us-ascii"; name="wine.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="wine.patch" diff -ruN wine-20040813/dlls/Makedll.rules.in wine-20040813-novo/dlls/Makedll.rules.in --- wine-20040813/dlls/Makedll.rules.in 2004-08-11 20:59:08.000000000 -0300 +++ wine-20040813-novo/dlls/Makedll.rules.in 2004-08-24 09:01:41.000000000 -0300 @@ -26,7 +26,7 @@ # Rules for .so files $(MODULE).so: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) Makefile.in - $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(RC_SRCS:.rc=.res) $(SUBSYSTEM:%=-Wb,--subsystem,%) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(IMPORTS:%=-l%) $(ALL_LIBS) + $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(RC_SRCS:.rc=.res) $(SUBSYSTEM:%=-Wb,--subsystem,%) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(IMPORTS:%=-l%) $(ALL_LIBS) $(CFLAGS) # Rules for .dll files diff -ruN wine-20040813/loader/kthread.c wine-20040813-novo/loader/kthread.c --- wine-20040813/loader/kthread.c 2004-06-24 01:07:22.000000000 -0300 +++ wine-20040813-novo/loader/kthread.c 2004-08-24 09:30:32.153210544 -0300 @@ -500,7 +500,7 @@ /* FIXME: no win32 equivalent for schedule param */ int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *param) + struct sched_param *param) { P_OUTPUT("FIXME:pthread_attr_setschedparam\n"); return 0; /* return success */ --Boundary-00=_5aeLBEJLgU39C9j--