From owner-freebsd-hackers Wed Feb 4 15:18:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA06272 for hackers-outgoing; Wed, 4 Feb 1998 15:18:14 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from demeter.sunyit.edu (demeter2.sunyit.edu [150.156.16.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA06202 for ; Wed, 4 Feb 1998 15:18:01 -0800 (PST) (envelope-from perlsta@sunyit.edu) Received: from localhost (perlsta@localhost) by demeter.sunyit.edu with SMTP (8.7.1/8.7.1) id RAA09121; Wed, 4 Feb 1998 17:56:23 -0500 (EST) Date: Wed, 4 Feb 1998 17:56:23 -0500 (EST) From: Alfred Perlstein To: Donn Miller cc: hackers@FreeBSD.ORG Subject: Re: latest wine && seg-faults on freebsd In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" i've been working on the freebsd port to wine "unofficially" well the problem lies in the fact that freebsd doesn't support the clone() system call directly, i'm working on finding a suitable replacement, someone on the list already gave me a lot of useful information towards accomplishing this. the original port includes patches for two things: fixes that translate what wine expects the procfs to look like, AND which is very irritating it basically comments out all support for threads... if you look in the file "sysdep.c" (i forget which dir, as i'm not at my jerkstation right now) you will see a LOT of code that gets removed by the CPP preprocessor because FreeBSD doesn't support clone(), my thoughts are that clone is a nasty, yucky thing, it's cool but i don't think it exists anywhere else but on linux. i'm trying to get some sort of emulation going. what is going on is that the thread that is NOT being created is being referenced by that segment of asm code what it translates to is: move the longword pointed to by the extra-segment 'fs' into a variable. the ugly fix ugly is to basically just comment out the body of the function and make it return 0 all the time, I will be working on this for a while trying to fix wine for freebsd anyway if you follow the above advice and comment/undefine the code, it gets farther, but then crashes in weird spot that i've yet to figure out, but i only got it to that point last night at 4am ;) you might have to upgrade to -current for the patches i plan to work on, as -current includes better support for a clone-like call. -Alfred please, please, please, if you think you have the ability, fire up xxgdb and help me debug this, i'm a good programmer, but i'm not terribly familiar with the FreeBSD internals On Wed, 4 Feb 1998, Donn Miller wrote: > I just compiled the latest wine (wine980201) and it compiled great, except > that I got seg-faults and dropped core every time I tried to run it. So > then I compiled with the -g flag and debugged it. Here is the output of > gdb: > > Reading symbols from /usr/libexec/ld.so...done. > Reading symbols from /usr/X11R6/lib/libXpm.so.4.10...done. > Reading symbols from /usr/X11R6/lib/libSM.so.6.0...done. > Reading symbols from /usr/X11R6/lib/libICE.so.6.3...done. > Reading symbols from /usr/X11R6/lib/libXext.so.6.3...done. > Reading symbols from /usr/X11R6/lib/libX11.so.6.1...done. > Reading symbols from /usr/lib/libm.so.2.0...done. > Reading symbols from /usr/lib/libc.so.3.0...done. > #0 0x1be651 in NtCurrentTeb () at sysdeps.c:140 > 140 __asm__( ".byte 0x64\n\tmovl (%1),%0" > (gdb) > > I compiled this ``straight out of the box'' instead of using FreeBSD's > port collection and was interested in hearing from the person doing the > latest ports to FreeBSD on what he/she did to correct this. I guessing > that it has something to do with threading (not X-windows threads but > libc). > > Donn > >