From owner-freebsd-amd64@FreeBSD.ORG Mon Dec 26 16:18:20 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F05116A41F for ; Mon, 26 Dec 2005 16:18:20 +0000 (GMT) (envelope-from astrodog@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 214C143D5E for ; Mon, 26 Dec 2005 16:18:19 +0000 (GMT) (envelope-from astrodog@gmail.com) Received: by wproxy.gmail.com with SMTP id 71so928729wra for ; Mon, 26 Dec 2005 08:18:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mNenWSC/AARDSFBzo87Y+JhPgG5Dy2RgHQOtz7ivMzrK2ZLL9eJOed1yXBRkunhsmEuefnipQJVidOB3RNpOzvWshTat7f3/6apWgkiHnjQrRRmPwaS/tf+X1kqGTrAskBJHYFe627he97ZFaOtPGvXc0e+hVpVPFXGliO4+8no= Received: by 10.54.71.5 with SMTP id t5mr6250759wra; Mon, 26 Dec 2005 08:18:18 -0800 (PST) Received: by 10.54.115.11 with HTTP; Mon, 26 Dec 2005 08:18:18 -0800 (PST) Message-ID: <2fd864e0512260818j869c6f2u1d7e61b22b8a41a8@mail.gmail.com> Date: Mon, 26 Dec 2005 10:18:18 -0600 From: Astrodog To: Flavio Pimentel Silvestrow In-Reply-To: <1135509244.49716.24.camel@abutre> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1135509244.49716.24.camel@abutre> Cc: freebsd-amd64@freebsd.org Subject: Re: Chroot to a 32 bits environment X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2005 16:18:20 -0000 On 12/25/05, Flavio Pimentel Silvestrow wrote: > Hello. > > I'm trying to setup a 32 bits environment on a amd64 system (6.0-STABLE > as of Dec 18). > > My goal is to be able to build (and run!) ports marked as > ONLY_FOR_ARCHS=3Di386. I'm not sure it's going to work, but I'm willing t= o > find out. > > Anyway, I built the 32 bits world and installed on a different folder, > like this: > > # cd /usr/src > # make TARGET_ARCH=3Di386 buildworld > # make TARGET_ARCH=3Di386 DESTDIR=3D/usr/32 installworld > > All went fine. I then mount /usr/32/dev adding the line below > to /etc/rc.conf and restarting devd: > > devfs_set_rulesets=3D"/usr/32/dev=3Ddevfsrules_jail" > > Finally, I mount /usr/32/proc and chroot the whole thing: > > # mount -t procfs proc /usr/32/proc > # chroot /usr/32 > > First error is: > > cannot stat /var/run/utmp. Please "unset watch". > > Which makes commands like 'who' unhappy. On to a more important test: > > # truss ping 127.0.0.1 > [ *** SNIP *** ] > gettimeofday({1135506828 464440},0x0) =3D 0 (0x0) > sendto(0x3,0x804ee14,0,0x0,{ AF_INET 127.0.0.1:0 },0x10) =3D 64 (0x40) > gettimeofday({1135506828 468435},0x0) =3D 0 (0x0) > gettimeofday({1135506828 470434},0x0) =3D 0 (0x0) > select(4,{3},0x0,0x0,{0 998001}) =3D 1 (0x1) > recvmsg() ERR#78 'Function not > implemented' > SIGNAL 12 (SIGSYS) > SIGNAL 12 (SIGSYS) > Process stopped because of: 16 > process exit, rval =3D 12 > Bad system call > > (Lines might wrap, sorry). > > So, recvmsg() not implemented? Something fishy... > > Lots of basic commands like netstat and top fail to work also (I can > send the output for those if anybody wants). I have COMPAT_IA32 on my > kernel. Not really sure what to do next... > > Sorry for the long post, and happy holidays to all! > > -- > Flavio Pimentel Silvestrow Within the jail environment, it becomes impossible for the 32-bit binaries you're trying to run, to get to the libraries FreeBSD uses to provide 32-bit compat, I suspect. As far as the "Only for i386" stuff goes, in my experence, ~50% of the ports that show that, actually compile on amd64 without too much in the way of bug fixing. For the other 50%, I try to use things like i386 packages, which are, for the most part, perfectly happy on amd64.