From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 1 10:09:16 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E03316A419 for ; Tue, 1 Jan 2008 10:09:16 +0000 (UTC) (envelope-from mail@sysfault.org) Received: from smtprelay09.ispgateway.de (smtprelay09.ispgateway.de [80.67.29.23]) by mx1.freebsd.org (Postfix) with ESMTP id 980E113C46A for ; Tue, 1 Jan 2008 10:09:14 +0000 (UTC) (envelope-from mail@sysfault.org) Received: (qmail 24752 invoked from network); 1 Jan 2008 10:09:13 -0000 Received: from unknown (HELO medusa.sysfault.org) (936934@[89.182.151.165]) (envelope-sender ) by smtprelay09.ispgateway.de (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 1 Jan 2008 10:09:13 -0000 Received: from localhost ([127.0.0.1] helo=medusa.sysfault.org) by medusa.sysfault.org with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1J9e3R-000AWz-I9 for freebsd-emulation@freebsd.org; Tue, 01 Jan 2008 11:09:02 +0100 Received: (from marcus@localhost) by medusa.sysfault.org (8.14.2/8.14.2/Submit) id m01A8xNG040484 for freebsd-emulation@freebsd.org; Tue, 1 Jan 2008 11:08:59 +0100 (CET) (envelope-from marcus) Date: Tue, 1 Jan 2008 11:08:57 +0100 From: Marcus von Appen To: freebsd-emulation@freebsd.org Message-ID: <20080101100857.GA992@medusa.sysfault.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Score: -2.4 (--) Subject: Re: Linuxulator on RELENG_7 causes games to hang X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcus von Appen List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 10:09:16 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Happy new year, I could track down the breakage to the changes made on CURRENT between 2007-02-15 and 2007-02-16. If you need me to test any possible fixes, please let me know. Regards Marcus --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHehE4o/JpszXavhwRAjzSAJ9f2WSYKzos9lldsFF0rHFpqCbJWgCgldKV 1NRN+TnJ4q/laPUqCMgNh9A= =RzS/ -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE-- From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 1 12:02:10 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E42516A418 for ; Tue, 1 Jan 2008 12:02:10 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id EB08B13C43E for ; Tue, 1 Jan 2008 12:02:09 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 8836C66B4BA; Tue, 1 Jan 2008 13:02:07 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jd8+SKaGhW7c; Tue, 1 Jan 2008 13:01:57 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 5311F66B4B3; Tue, 1 Jan 2008 13:01:57 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m01C1ufC092922; Tue, 1 Jan 2008 13:01:56 +0100 (CET) (envelope-from rdivacky) Date: Tue, 1 Jan 2008 13:01:56 +0100 From: Roman Divacky To: Marcus von Appen Message-ID: <20080101120156.GA92851@freebsd.org> References: <20080101100857.GA992@medusa.sysfault.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080101100857.GA992@medusa.sysfault.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: Linuxulator on RELENG_7 causes games to hang 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, 01 Jan 2008 12:02:10 -0000 On Tue, Jan 01, 2008 at 11:08:57AM +0100, Marcus von Appen wrote: > Happy new year, > > I could track down the breakage to the changes made on CURRENT between > 2007-02-15 and 2007-02-16. If you need me to test any possible fixes, > please let me know. thnx a lot.. I am just extracting a diff: cvs diff -u -D 2/15/2007 -D 2/16/2007 > /tmp/marcus.diff will investigate that and let you know.. THNX! roman From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 1 12:27:54 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8374F16A41A for ; Tue, 1 Jan 2008 12:27:54 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 3C52213C458 for ; Tue, 1 Jan 2008 12:27:54 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 7354966B4DA; Tue, 1 Jan 2008 13:27:53 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g1zCZc7uskHS; Tue, 1 Jan 2008 13:27:43 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 3904166B4D9; Tue, 1 Jan 2008 13:27:43 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m01CRhVW093319; Tue, 1 Jan 2008 13:27:43 +0100 (CET) (envelope-from rdivacky) Date: Tue, 1 Jan 2008 13:27:43 +0100 From: Roman Divacky To: Marcus von Appen Message-ID: <20080101122743.GA93226@freebsd.org> References: <20071124091332.GA980@medusa.sysfault.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071124091332.GA980@medusa.sysfault.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: Linuxulator on RELENG_7 causes games to hang 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, 01 Jan 2008 12:27:54 -0000 > linux_mmap(0xbfbfc63c,0xbfbfc604,0x0,0xbfbfc67c,0x84ec7b0,0x6) = 680394752 (0x288e0000) ^^^^^^^^^^ this is flags? looks crazy From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 1 12:42:46 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C44216A418; Tue, 1 Jan 2008 12:42:46 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id D9CB113C458; Tue, 1 Jan 2008 12:42:45 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4C8C866B4D4; Tue, 1 Jan 2008 13:26:49 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8XEI5wvUdKtu; Tue, 1 Jan 2008 13:26:39 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1698866B4B3; Tue, 1 Jan 2008 13:26:39 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m01CQdDH093283; Tue, 1 Jan 2008 13:26:39 +0100 (CET) (envelope-from rdivacky) Date: Tue, 1 Jan 2008 13:26:38 +0100 From: Roman Divacky To: emulation@freebsd.org Message-ID: <20080101122638.GA93070@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: mva@sysfault.org Subject: mmap/mmap2 parameters type 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, 01 Jan 2008 12:42:46 -0000 hi... in our linuxulator linux_mmap is defined as: int linux_mmap(struct l_mmap_argv *ptr); while linux_mmap2 is defined: int linux_mmap2(l_ulong addr, l_ulong len, l_ulong prot, l_ulong flags, l_ulong fd, l_ulong pgoff); both mmap and mmap2 uses l_mmap_argv to pass their args to linux_mmap_common where "stuff" happens strcut l_mmap_argv is defined as: struct l_mmap_argv { l_uintptr_t addr; l_size_t len; l_int prot; l_int flags; l_int fd; l_off_t pgoff; } __packed; on real linux (linux 2.6.16 I have on my disk) mmap and mmap2 is defined like this: asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff) asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off) ie. every parameter is unsigned long, while our structure uses signed int in some places. overall the l_mmap_argv seems to be modeled after our [bsd_]mmap_args. can someone tell me why? I dont think its correct. if you accept my analysis, is this patch correct? Index: linux.h =================================================================== RCS file: /home/ncvs/src/sys/i386/linux/linux.h,v retrieving revision 1.78 diff -u -r1.78 linux.h --- linux.h 18 Sep 2007 19:50:33 -0000 1.78 +++ linux.h 1 Jan 2008 12:20:54 -0000 @@ -143,12 +143,12 @@ #define LINUX_MAP_GROWSDOWN 0x0100 struct l_mmap_argv { - l_uintptr_t addr; - l_size_t len; - l_int prot; - l_int flags; - l_int fd; - l_off_t pgoff; + l_ulong addr; + l_ulong len; + l_ulong prot; + l_ulong flags; + l_ulong fd; + l_ulong pgoff; } __packed; /* marcus, can you please test if that makes any difference with your problems? (I dont think it will but you never know ;) ) thnx, roman From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 1 12:58:18 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5CE416A417; Tue, 1 Jan 2008 12:58:18 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 5E8B513C43E; Tue, 1 Jan 2008 12:58:18 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 433CA66B4DE; Tue, 1 Jan 2008 13:58:17 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id abHt26+KL9FV; Tue, 1 Jan 2008 13:58:07 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 2E03166B4B3; Tue, 1 Jan 2008 13:58:07 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m01Cw7A4093885; Tue, 1 Jan 2008 13:58:07 +0100 (CET) (envelope-from rdivacky) Date: Tue, 1 Jan 2008 13:58:07 +0100 From: Roman Divacky To: jkim@freebsd.org Message-ID: <20080101125806.GA93742@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: emulation@freebsd.org Subject: PROT_WRITE implies PROT_READ, fixing mmap05 ltp test 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, 01 Jan 2008 12:58:18 -0000 hi in rev. 1.70 of i386/linux/linux_machdep.c you talk about: revision 1.70 date: 2007/02/15 00:54:40; author: jkim; state: Exp; lines: +58 -54 MFP4: 113025, 113146, 113177, 113203, 113500, 113546, 113570 - PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC. Linux/ia64's i386 emulation layer does this and it complies with Linux header files. This fixes mmap05 LTP test case on amd64. I have a few questions: 1) did you verify that PROT_WRITE implies PROT_READ in linux/i386? I didnt find any such place, only a comment in ia64 ia32 emulation talking about this. I think the ia64 might be wrong (does anybody uses ia32 emulation on ia64 at all?) 2) the mmap05 tests tries to mmap() file with PROT_NONE prot. how is implying PROT_READ when PROT_WRITE going to help that? in the real i386 linux the only thing I see is that PROT_READ implies PROT_EXEC. nothing more. thnx roman From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 1 15:45:40 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97FE116A417 for ; Tue, 1 Jan 2008 15:45:40 +0000 (UTC) (envelope-from mail@sysfault.org) Received: from smtprelay06.ispgateway.de (smtprelay06.ispgateway.de [80.67.18.44]) by mx1.freebsd.org (Postfix) with ESMTP id F3FC513C465 for ; Tue, 1 Jan 2008 15:45:39 +0000 (UTC) (envelope-from mail@sysfault.org) Received: (qmail 23136 invoked from network); 1 Jan 2008 15:18:58 -0000 Received: from unknown (HELO medusa.sysfault.org) (936934@[89.182.151.165]) (envelope-sender ) by smtprelay06.ispgateway.de (qmail-ldap-1.03) with AES256-SHA encrypted SMTP; 1 Jan 2008 15:18:58 -0000 Received: from localhost ([127.0.0.1] helo=medusa.sysfault.org) by medusa.sysfault.org with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1J9itB-000AtH-9I; Tue, 01 Jan 2008 16:18:47 +0100 Received: (from marcus@localhost) by medusa.sysfault.org (8.14.2/8.14.2/Submit) id m01FIgoo041866; Tue, 1 Jan 2008 16:18:42 +0100 (CET) (envelope-from marcus) Date: Tue, 1 Jan 2008 16:18:40 +0100 From: Marcus von Appen To: Roman Divacky Message-ID: <20080101151840.GC992@medusa.sysfault.org> References: <20080101122638.GA93070@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YD3LsXFS42OYHhNZ" Content-Disposition: inline In-Reply-To: <20080101122638.GA93070@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Score: -4.4 (----) Cc: emulation@freebsd.org Subject: Re: mmap/mmap2 parameters type X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcus von Appen List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 15:45:40 -0000 --YD3LsXFS42OYHhNZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On, Tue Jan 01, 2008, Roman Divacky wrote: >=20 > can someone tell me why? I dont think its correct. if you accept my analy= sis,=20 > is this patch correct? >=20 > Index: linux.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/sys/i386/linux/linux.h,v > retrieving revision 1.78 > diff -u -r1.78 linux.h > --- linux.h 18 Sep 2007 19:50:33 -0000 1.78 > +++ linux.h 1 Jan 2008 12:20:54 -0000 > @@ -143,12 +143,12 @@ > #define LINUX_MAP_GROWSDOWN 0x0100 >=20 > struct l_mmap_argv { > - l_uintptr_t addr; > - l_size_t len; > - l_int prot; > - l_int flags; > - l_int fd; > - l_off_t pgoff; > + l_ulong addr; > + l_ulong len; > + l_ulong prot; > + l_ulong flags; > + l_ulong fd; > + l_ulong pgoff; > } __packed; >=20 > /* >=20 >=20 > marcus, can you please test if that makes any difference with your proble= ms?=20 > (I dont think it will but you never know ;) ) No, it does not. Regards Marcus --YD3LsXFS42OYHhNZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHelnPo/JpszXavhwRAtqTAJ0d1MaLkRJxBWTQAy8oXDOuQocV4wCeI6AX hjDMxIUNqF+v2OXSFEohfnE= =zt6s -----END PGP SIGNATURE----- --YD3LsXFS42OYHhNZ-- From owner-freebsd-emulation@FreeBSD.ORG Wed Jan 2 07:23:55 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD27516A417 for ; Wed, 2 Jan 2008 07:23:55 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 5084E13C46A for ; Wed, 2 Jan 2008 07:23:55 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 68047 invoked by uid 2001); 2 Jan 2008 06:57:13 -0000 Date: Wed, 2 Jan 2008 00:57:13 -0600 From: "Rick C. Petty" To: freebsd-emulation@freebsd.org Message-ID: <20080102065713.GA67906@keira.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: infofarmer@FreeBSD.org Subject: is graphics/linux-cairo broken? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 07:23:55 -0000 Like many people, I upgrade my ports by building everything in a staging area using chroot(1). For the last few days I've had a terrible time with this process because I've been bumping into a problem with the graphics/linux-cairo port (there may be others??). I'm running 6.3-PRERELEASE and I've csup'd my world/kernel and staging area multiple times today. Here's the output when I hit linux-cairo: ===> Cleaning for linux-cairo-1.0.2 ===> Vulnerability check disabled, database not found ===> Extracting for linux-cairo-1.0.2 => MD5 Checksum OK for rpm/i386/fedora/4/cairo-1.0.2-2.gst.1.4.i386.rpm. => SHA256 Checksum OK for rpm/i386/fedora/4/cairo-1.0.2-2.gst.1.4.i386.rpm. ===> linux-cairo-1.0.2 depends on file: /usr/local/bin/rpm2cpio - found ===> Patching for linux-cairo-1.0.2 ===> Configuring for linux-cairo-1.0.2 ===> Installing for linux-cairo-1.0.2 ===> Generating temporary packing list ===> Checking if graphics/linux-cairo already installed cd /usr/ports/graphics/linux-cairo/work && /usr/bin/find * -type d -exec /bin/mkdir -p "/compat/linux/{}" \; cd /usr/ports/graphics/linux-cairo/work && /usr/bin/find * ! -type d | /usr/bin/cpio -pm -R root:wheel /compat/linux 1523 blocks ===> Running ldconfig /sbin/ldconfig -m /compat/linux/lib /libexec/ld-elf.so.1: Undefined symbol "__stdoutp" referenced from COPY relocation in /bin/sh *** Error code 1 Stop in /usr/ports/graphics/linux-cairo. ===>>> Installation of new port failed ===>>> Aborting update /libexec/ld-elf.so.1: Undefined symbol "__stdoutp" referenced from COPY relocation in ps /libexec/ld-elf.so.1: Undefined symbol "__stdinp" referenced from COPY relocation in rm /libexec/ld-elf.so.1: Undefined symbol "__stdinp" referenced from COPY relocation in rm ~~~~~~~~~~ Obviously any further commands break with similar undefined symbols. The problem is that FreeBSD's ldconfig is being run (instead of Linux's) to merge /compat/linux/lib in with the FreeBSD bits. Since I was thankfully running in a chroot, I can just remove the /var/run/ld-elf.so.hints file but I also have to remove /compat/linux/lib from my ldconfig directories. The FreeBSD libs shouldn't be mixing with the Linux libs, right? My guess is linux-cairo shouldn't be setting USE_LDCONFIG or it should redefine LDCONFIG to use ${LINUXBASE}/sbin/ldconfig and perhaps run it via chroot. If I'm correct, this isn't the only port which is broken. A bunch of other linux ports do something similar and in different ways (see "grep -i ldconfig /usr/ports/*/linux*/Makefile"). How come I'm the first to be hosed by this? Or maybe I'm missing something obvious? -- Rick C. Petty From owner-freebsd-emulation@FreeBSD.ORG Wed Jan 2 13:10:04 2008 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C166116A417 for ; Wed, 2 Jan 2008 13:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B188813C442 for ; Wed, 2 Jan 2008 13:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m02DA4SJ023649 for ; Wed, 2 Jan 2008 13:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m02DA4mm023644; Wed, 2 Jan 2008 13:10:04 GMT (envelope-from gnats) Date: Wed, 2 Jan 2008 13:10:04 GMT Message-Id: <200801021310.m02DA4mm023644@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: sam Cc: Subject: Re: kern/117010: truble in syscall linux_getdents() X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sam List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 13:10:04 -0000 The following reply was made to PR kern/117010; it has been noted by GNATS. From: sam To: bug-followup@FreeBSD.org, samflanker@gmail.com Cc: Subject: Re: kern/117010: truble in syscall linux_getdents() Date: Wed, 02 Jan 2008 15:34:55 +0300 program-test (experimental) for testing syscall linux_getdents() http://cs.udmvt.ru/files/temp/linux_dbg.tar.bz2 includes: * temp/ - test_dir with files (special for crash situation) * linux_getdents.c - source of program-test * linux_getdents_static - binary exec file, staticaly compiled on Linux Debian 4.0 Etch * linux_getdents_dynamic - binary exec file, dynamicaly compiled on Linux Debian 4.0 Etch - test failed on systems: FreeBSD 6.3-PRERELEASE with port linux_base-fc4, FreeBSD 8.0-CURRENT with port linux_base-fc4; - test passed on Linux Debian 4.0 Etch From owner-freebsd-emulation@FreeBSD.ORG Wed Jan 2 13:41:14 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4D2A16A418; Wed, 2 Jan 2008 13:41:14 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 2846D13C442; Wed, 2 Jan 2008 13:41:14 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A54BD9.dip.t-dialin.net [84.165.75.217]) by redbull.bpaserver.net (Postfix) with ESMTP id 286082E0BF; Wed, 2 Jan 2008 14:41:03 +0100 (CET) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id B3DEF78994; Wed, 2 Jan 2008 14:40:58 +0100 (CET) Date: Wed, 2 Jan 2008 14:33:51 +0100 From: Alexander Leidinger To: rick-freebsd@kiwi-computer.com Message-ID: <20080102143351.0d06cf71@deskjail> In-Reply-To: <20080102065713.GA67906@keira.kiwi-computer.com> References: <20080102065713.GA67906@keira.kiwi-computer.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.3; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.9, required 6, BAYES_00 -15.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-emulation@freebsd.org, infofarmer@FreeBSD.org Subject: Re: is graphics/linux-cairo broken? 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: Wed, 02 Jan 2008 13:41:15 -0000 Quoting "Rick C. Petty" (Wed, 2 Jan 2008 00:57:13 -0600): > My guess is linux-cairo shouldn't be setting USE_LDCONFIG or it should This is correct, it should use "INSTALLS_SHLIB= yes" instead. Bye, Alexander. -- Ferengi Rule of Acquisition #194: It's always good to know about new customers before they walk in your door. -- ST:DS9, "Whispers" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Thu Jan 3 00:18:01 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 954CD16A420 for ; Thu, 3 Jan 2008 00:18:01 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 1F38313C4E9 for ; Thu, 3 Jan 2008 00:18:00 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 79530 invoked by uid 2001); 3 Jan 2008 00:17:59 -0000 Date: Wed, 2 Jan 2008 18:17:59 -0600 From: "Rick C. Petty" To: Alexander Leidinger Message-ID: <20080103001759.GA79510@keira.kiwi-computer.com> References: <20080102065713.GA67906@keira.kiwi-computer.com> <20080102143351.0d06cf71@deskjail> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080102143351.0d06cf71@deskjail> User-Agent: Mutt/1.4.2.1i Cc: freebsd-emulation@freebsd.org, infofarmer@FreeBSD.org Subject: Re: is graphics/linux-cairo broken? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 00:18:01 -0000 On Wed, Jan 02, 2008 at 02:33:51PM +0100, Alexander Leidinger wrote: > Quoting "Rick C. Petty" (Wed, 2 Jan 2008 00:57:13 -0600): > > > My guess is linux-cairo shouldn't be setting USE_LDCONFIG or it should > > This is correct, it should use "INSTALLS_SHLIB= yes" instead. Shall I file one PR per port that's broken or one total PR? -- Rick C. Petty From owner-freebsd-emulation@FreeBSD.ORG Thu Jan 3 11:25:50 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D9A816A41A; Thu, 3 Jan 2008 11:25:50 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 1507C13C448; Thu, 3 Jan 2008 11:25:50 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A569AA.dip.t-dialin.net [84.165.105.170]) by redbull.bpaserver.net (Postfix) with ESMTP id 737D52E06A; Thu, 3 Jan 2008 12:25:34 +0100 (CET) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 913927D720; Thu, 3 Jan 2008 12:25:28 +0100 (CET) Date: Thu, 3 Jan 2008 12:17:39 +0100 From: Alexander Leidinger To: rick-freebsd@kiwi-computer.com Message-ID: <20080103121739.7a4eaf58@deskjail> In-Reply-To: <20080103001759.GA79510@keira.kiwi-computer.com> References: <20080102065713.GA67906@keira.kiwi-computer.com> <20080102143351.0d06cf71@deskjail> <20080103001759.GA79510@keira.kiwi-computer.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.3; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.9, required 6, BAYES_00 -15.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-emulation@freebsd.org, infofarmer@FreeBSD.org Subject: Re: is graphics/linux-cairo broken? 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: Thu, 03 Jan 2008 11:25:50 -0000 Quoting "Rick C. Petty" (Wed, 2 Jan 2008 18:17:59 -0600): > On Wed, Jan 02, 2008 at 02:33:51PM +0100, Alexander Leidinger wrote: > > Quoting "Rick C. Petty" (Wed, 2 Jan 2008 00:57:13 -0600): > > > > > My guess is linux-cairo shouldn't be setting USE_LDCONFIG or it should > > > > This is correct, it should use "INSTALLS_SHLIB= yes" instead. > > Shall I file one PR per port that's broken or one total PR? I suggest one PR per maintainer. Note, only for linux ports INSTALLS_SHLIB should be used, for native ports USE_LDCONFIG is right. Alternatively someone could test the USE_LDCONFIG stuff in http://www.leidinger.net/FreeBSD/port-patches/Mk:bsd.port.mk.diff So far I hadn't time to really test it (but as I installed linux-cairo before your bug report and didn't noticed a problem, it may already work...). If someone really tests it and confirms it works, I will send a PR to portmgr to integrate it. Bye, Alexander. -- BOFH excuse #32: techtonic stress http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Fri Jan 4 13:15:07 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 633F116A505 for ; Fri, 4 Jan 2008 13:15:07 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from hs-out-2122.google.com (hs-out-0708.google.com [64.233.178.242]) by mx1.freebsd.org (Postfix) with ESMTP id 2030513C474 for ; Fri, 4 Jan 2008 13:15:06 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by hs-out-2122.google.com with SMTP id j58so5201865hsj.11 for ; Fri, 04 Jan 2008 05:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=/sfYTftP6rfeuO5WbOMH+Ce0jCoU2qwmId1HwR+fWHU=; b=IZFGjN9k3kzSKS0wcOxZPY+CSDDIyk0AFdX/hdJMc1wLW5Q+oLWRLqlrlLIdaVCIUimiDaHiTxDmz35j3JoWJdVOG9QOkSnA9xFiiVLidPI+TQ5G1QmtRQpj/a8y6k//xfEhUDG42GGRyK7hRIekkcirc8oe0Xg+7CllB8Ly1dA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=vLU0f6GRFl5RZbUY4jlcnjmaSn9X+i+fmcmKaWFjTasP9mf8a8u6EJKQeW73SGuDqyGTvT1IKGmBD3W/NVxWki4AvI02KriNfrWfJXKDMjKj1IOK96lAYxYpI9UqrNAOSDpSFx7sPvYXYb9ibsbuY5Ygp4/OJH0erQYe0q1Eo8w= Received: by 10.150.158.8 with SMTP id g8mr534200ybe.94.1199450870589; Fri, 04 Jan 2008 04:47:50 -0800 (PST) Received: by 10.150.178.13 with HTTP; Fri, 4 Jan 2008 04:47:50 -0800 (PST) Message-ID: <1bd550a00801040447p3d0d43f6n87c79c51bb3cb508@mail.gmail.com> Date: Fri, 4 Jan 2008 13:47:50 +0100 From: "=?ISO-8859-1?Q?Fernando_Apestegu=EDa?=" To: freebsd-emulation@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: linprocfs question. Porting app from linux 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: Fri, 04 Jan 2008 13:15:07 -0000 Hi all, I was suggested to contact the linux compatibility team (or Roman Divacky) to get some help. I want to port an application from Linux to FreeBSD. The linux app. makes extensive use of the procfs. Now, I have several options to port the software: 1 - Use sysctl. The problem here is that some information (about cpu or memory, for instance) is not available through this interface. 2 - Write a kernel module to get an uniform access (Ivan Vorak suggested me this) 3 - Use linprocfs. The easiest to me is the third point. All the access would be very similar. However, there are some missing files in the linprocfs. I would like to know if there are some plans of keeping adding more linux-like files as the devices, filesystems or modules files you can get under /proc in a linux system or I should look for another alternative (like the module Ivan suggests.) Thanks in advance. PS: some options have already been discussed in the hackers@ and questions@ lists. From owner-freebsd-emulation@FreeBSD.ORG Fri Jan 4 16:51:03 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 792DE16A417 for ; Fri, 4 Jan 2008 16:51:03 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 3331913C4D9 for ; Fri, 4 Jan 2008 16:51:02 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 08B5B66B7BA; Fri, 4 Jan 2008 17:51:00 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uhlx5W7mOO6E; Fri, 4 Jan 2008 17:50:49 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id DC66366B7B3; Fri, 4 Jan 2008 17:50:42 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m04GogI2067833; Fri, 4 Jan 2008 17:50:42 +0100 (CET) (envelope-from rdivacky) Date: Fri, 4 Jan 2008 17:50:42 +0100 From: Roman Divacky To: Fernando Apestegu?a Message-ID: <20080104165042.GA67753@freebsd.org> References: <1bd550a00801040447p3d0d43f6n87c79c51bb3cb508@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1bd550a00801040447p3d0d43f6n87c79c51bb3cb508@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: linprocfs question. Porting app from linux 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: Fri, 04 Jan 2008 16:51:03 -0000 On Fri, Jan 04, 2008 at 01:47:50PM +0100, Fernando Apestegu?a wrote: > Hi all, > > I was suggested to contact the linux compatibility team (or Roman > Divacky) to get some help. > > I want to port an application from Linux to FreeBSD. The linux app. > makes extensive use of the procfs. Now, I have several options to port > the software: > > 1 - Use sysctl. The problem here is that some information (about cpu > or memory, for instance) is not available through this interface. > 2 - Write a kernel module to get an uniform access (Ivan Vorak > suggested me this) > 3 - Use linprocfs. > > The easiest to me is the third point. All the access would be very > similar. However, there are some missing files in the linprocfs. I > would like to know if there are some plans of keeping adding more > linux-like files as the devices, filesystems or modules files you can > get under /proc in a linux system or I should look for another > alternative (like the module Ivan suggests.) I am sure that any patch against linprocfs implementing this will be welcomed. if you submit (adn test etc.) something, I am willing to review it and make someone to commit that :) roman From owner-freebsd-emulation@FreeBSD.ORG Sat Jan 5 11:27:11 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2BE316A419 for ; Sat, 5 Jan 2008 11:27:11 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 793C713C45B for ; Sat, 5 Jan 2008 11:27:11 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A56283.dip.t-dialin.net [84.165.98.131]) by redbull.bpaserver.net (Postfix) with ESMTP id A62312E1DA; Sat, 5 Jan 2008 12:26:55 +0100 (CET) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 7AAA2826E6; Sat, 5 Jan 2008 12:18:16 +0100 (CET) Date: Sat, 5 Jan 2008 12:16:28 +0100 From: Alexander Leidinger To: "Fernando =?UTF-8?B?QXBlc3RlZ3XDrWE=?=" Message-ID: <20080105121628.00135363@deskjail> In-Reply-To: <1bd550a00801040447p3d0d43f6n87c79c51bb3cb508@mail.gmail.com> References: <1bd550a00801040447p3d0d43f6n87c79c51bb3cb508@mail.gmail.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.3; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.523, required 6, BAYES_00 -15.00, MIME_8BIT_HEADER 0.30, RDNS_DYNAMIC 0.10, TW_OC 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-emulation@freebsd.org Subject: Re: linprocfs question. Porting app from linux 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: Sat, 05 Jan 2008 11:27:12 -0000 Quoting "Fernando Apestegu=C3=ADa" (Fri, 4 = Jan 2008 13:47:50 +0100): > Hi all, >=20 > I was suggested to contact the linux compatibility team (or Roman > Divacky) to get some help. >=20 > I want to port an application from Linux to FreeBSD. The linux app. > makes extensive use of the procfs. Now, I have several options to port > the software: >=20 > 1 - Use sysctl. The problem here is that some information (about cpu > or memory, for instance) is not available through this interface. I suggest to do as much as possible with sysctl. For the CPU you get maybe more info from /var/run/dmesg.boot. Apart from that I can only repeat what you got already: use the CPUID call directly, or depend upon a port which gives you this information (execute the program from ports and parse the output). Regarding the memory: there are ways to obtain this info, as already suggested, have a look at the ganglia port, or have a look how top gets all the memory info. As you was already told, not every memory type in Linux maps to a corresponding FreeBSD value. So maybe printing a 'N/A' or '-' instead of a value may be a sensible solution. > 2 - Write a kernel module to get an uniform access (Ivan Vorak > suggested me this) I don't think users want to install a kernel module just to get a GUI program which is able to display some values. At least I would not be interested in something like this. > 3 - Use linprocfs. >=20 > The easiest to me is the third point. All the access would be very > similar. However, there are some missing files in the linprocfs. I It would be a good start to tell us which files are missing and also provide a description what it is and what example output looks like. We want to improve linprocfs for sure. Patches which implement some missing stuff are even more welcome. > would like to know if there are some plans of keeping adding more > linux-like files as the devices, filesystems or modules files you can > get under /proc in a linux system or I should look for another > alternative (like the module Ivan suggests.) Requiring to mount a FS or to load a kernel module is not very userfriendly if there are ways to obtain the info in a different way. FreeBSD is not going to have procfs or linprocfs mounted by default, and we discourage the use of procfs if not really necessary. For this reason you should really try to do as much as possible with sysctl and similar methods as suggested above. Bye, Alexander. --=20 BOFH excuse #102: Power company testing new voltage spike (creation) equipment http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137