From owner-freebsd-emulation@FreeBSD.ORG Tue Mar 6 23:41:11 2007 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AE5816A404 for ; Tue, 6 Mar 2007 23:41:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id 496DA13C4B7 for ; Tue, 6 Mar 2007 23:41:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id l26NevNF051230; Tue, 6 Mar 2007 18:41:02 -0500 (EST) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Tue, 6 Mar 2007 18:40:45 -0500 User-Agent: KMail/1.6.2 References: <790a9fff0610132255k5c3b08fcrb550fa308d31752d@mail.gmail.com> <20070306150107.p9j3cmqzlkww48sk@webmail.leidinger.net> In-Reply-To: <20070306150107.p9j3cmqzlkww48sk@webmail.leidinger.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200703061840.54677.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88.6/2756/Tue Mar 6 18:06:57 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Alexander Leidinger , Scot Hetzel , gerald@FreeBSD.org Subject: Re: emulators/linux-wine: Help in porting to FreeBSD X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 23:41:11 -0000 On Tuesday 06 March 2007 09:01 am, Alexander Leidinger wrote: > Quoting Scot Hetzel (from Sat, 14 Oct 2006 > > 00:55:17 -0500): > > I'm trying to create a port for emulators/linux-wine, so that we > > can at least have wine running on FreeBSD/amd64 using the > > linuxator. This would then silence users who want wine > > (amd64/104311) to run under FreeBSD/amd64. > > > > Currently, I am having a problem running linux-wine. When it is > > run as either root or as a user I get the following error: > > > > $ /compat/linux/usr/bin/wine > > wine: failed to initialize: /usr/lib/wine/ntdll.dll.so: failed to > > map segment from shared object: Cannot allocate memory > > Do you get the same error with a recent current? I hope it may be > fixed with the mmap changes. But it may also be the way the memory > is laid out in FreeBSD vs. Linux. IIRC the native wine had a > similar problem until someone fixed the code for wine on FreeBSD. > But I'm not sure about this. See: http://bugs.winehq.org/show_bug.cgi?id=2609 FYI, this is ktrace from Linux Wine binary: # /usr/compat/linux/usr/bin/wine --version wine-0.9.27 ---------------------- --- Skipped --- 1964 wine-preloader CALL linux_mmap2(0x81000000,0x7efe0000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1 errno 12 Cannot allocate memory 1964 wine-preloader CALL linux_mmap2(0x81000000,0x3f7f0000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675206656/0x9c266000 1964 wine-preloader CALL munmap(0x9c266000,0x3f7f0000) 1964 wine-preloader RET munmap 0 1964 wine-preloader CALL linux_mmap2(0x81000000,0x1fbf0000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675206656/0x9c266000 1964 wine-preloader CALL munmap(0x9c266000,0x1fbf0000) 1964 wine-preloader RET munmap 0 1964 wine-preloader CALL linux_mmap2(0x81000000,0xfdf0000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675206656/0x9c266000 1964 wine-preloader CALL munmap(0x9c266000,0xfdf0000) 1964 wine-preloader RET munmap 0 --- Skipped --- 1964 wine-preloader CALL linux_mmap2(0x81010000,0x20000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675206656/0x9c266000 1964 wine-preloader CALL munmap(0x9c266000,0x20000) 1964 wine-preloader RET munmap 0 1964 wine-preloader CALL linux_mmap2(0x81010000,0x10000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675206656/0x9c266000 1964 wine-preloader CALL munmap(0x9c266000,0x10000) 1964 wine-preloader RET munmap 0 1964 wine-preloader CALL linux_mmap2(0x81020000,0x10000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675206656/0x9c266000 1964 wine-preloader CALL munmap(0x9c266000,0x10000) 1964 wine-preloader RET munmap 0 --- Skipped --- 1964 wine-preloader CALL linux_mmap2(0x9c260000,0x10000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675206656/0x9c266000 1964 wine-preloader CALL munmap(0x9c266000,0x10000) 1964 wine-preloader RET munmap 0 1964 wine-preloader CALL linux_mmap2(0x9c270000,0x10000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675165696/0x9c270000 1964 wine-preloader CALL linux_mmap2(0x9c280000,0x200000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1675100160/0x9c280000 1964 wine-preloader CALL linux_mmap2(0x9c480000,0x7f0000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1673003008/0x9c480000 1964 wine-preloader CALL linux_mmap2(0x9cc70000,0x3f80000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1664679936/0x9cc70000 1964 wine-preloader CALL linux_mmap2(0xa0bf0000,0x1fc00000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1598095360/0xa0bf0000 1964 wine-preloader CALL linux_mmap2(0xc07f0000,0x3f7f0000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1 errno 12 Cannot allocate memory 1964 wine-preloader CALL linux_mmap2(0xc07f0000,0x1fbf0000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1065418752/0xc07f0000 1964 wine-preloader CALL linux_mmap2(0xe03e0000,0x1fc00000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1 errno 12 Cannot allocate memory --- Skipped --- 1964 wine-preloader CALL linux_mmap2(0xfffd0000,0x10000,0,0x4022,0xffffffff,0) 1964 wine-preloader RET linux_mmap2 -1 errno 12 Cannot allocate memory 1964 wine-preloader CALL linux_sys_futex(0x9c264050,0x1,0x7fffffff,0,0xffffd27c,0xffffd218) 1964 wine-preloader RET linux_sys_futex 1 1964 wine-preloader CALL linux_open(0x7c003110,0,0x9c0094eb) 1964 wine-preloader NAMI "/compat/linux/usr/lib/wine/ntdll.dll.so" 1964 wine-preloader NAMI "/compat/linux" 1964 wine-preloader NAMI "/compat/linux/usr/lib/wine/ntdll.dll.so" 1964 wine-preloader RET linux_open 3 1964 wine-preloader CALL read(0x3,0xffffccb0,0x200) --- Skipped --- 1964 wine-preloader CALL linux_mmap(0xffffcab0) 1964 wine-preloader RET linux_mmap -1 errno 12 Cannot allocate memory 1964 wine-preloader CALL close(0x3) 1964 wine-preloader RET close 0 1964 wine-preloader CALL linux_open(0x7c003110,0,0) 1964 wine-preloader NAMI "/compat/linux/usr/lib/wine/ntdll.dll.so" 1964 wine-preloader NAMI "/compat/linux" 1964 wine-preloader NAMI "/compat/linux/usr/lib/wine/ntdll.dll.so" --- Skipped --- 1964 wine-preloader CALL linux_mmap(0xffffcab0) 1964 wine-preloader RET linux_mmap -1 errno 12 Cannot allocate memory ---------------------- I don't think this is really a Linuxulator bug. Jung-uk Kim