From owner-freebsd-hackers@freebsd.org Sat Apr 17 02:19:15 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60B5B5EA340 for ; Sat, 17 Apr 2021 02:19:15 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail01.asahi-net.or.jp (mail01.asahi-net.or.jp [202.224.55.13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FMcG940YLz3PnY for ; Sat, 17 Apr 2021 02:19:13 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from vmware12.advok.com (cpe-184-152-96-96.nj.res.rr.com [184.152.96.96]) (Authenticated sender: NR2Y-OOT) by mail01.asahi-net.or.jp (Postfix) with ESMTPSA id E0D493396D; Sat, 17 Apr 2021 11:19:09 +0900 (JST) Date: Fri, 16 Apr 2021 08:12:08 -0400 From: Yoshihiro Ota To: Peter Blok , freebsd-hackers@freebsd.org Subject: Re: cross building i386 on amd64 Message-Id: <20210416081208.bdd3f0ffcd2120ee72f18459@j.email.ne.jp> In-Reply-To: <98964b07-b9a5-ca23-ef9d-7cb87d086282@FreeBSD.org> References: <376DADB2-A7A9-4519-888C-BCD8A32B62B3@bsd4all.org> <98964b07-b9a5-ca23-ef9d-7cb87d086282@FreeBSD.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i386-portbld-freebsd12.1) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4FMcG940YLz3PnY X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ota@j.email.ne.jp designates 202.224.55.13 as permitted sender) smtp.mailfrom=ota@j.email.ne.jp X-Spamd-Result: default: False [0.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[202.224.55.13:from]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:202.224.55.0/24]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[email.ne.jp]; ARC_NA(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_SHORT(0.50)[0.497]; SPAMHAUS_ZRD(0.00)[202.224.55.13:from:127.0.2.255]; RECEIVED_SPAMHAUS_PBL(0.00)[184.152.96.96:received]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:4685, ipnet:202.224.32.0/19, country:JP]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_IN_DNSWL_LOW(-0.10)[202.224.55.13:from] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 02:19:15 -0000 Hi On Fri, 16 Apr 2021 22:35:55 +0300 Andriy Gapon wrote: > On 16/04/2021 20:22, Peter Blok wrote: > > Hi, > > > > I’m cross building 12-STABLE i386 on a 12-STABLE amd64 system. Sources are refreshed every day. > > > > Build runs fine and put everything in the right directory. For the target i386 system it is > > in /usr/obj/i386TARGET. > > > > Next I NFS mount the source /on /usr/src and /usr/obj/i386TARGET on /usr/obj on the target > > machine > > > > When I run make installworld it will use install > > from /usr/obj/usr/src/i386.i386/tmp/legacy/usr/bin because it is the first install it finds in > > the PATH set by installworld. This tanks because install is compiled for amd64. > > > > I understand why the legacy path is compiled for amd64. This is needed to build a distribution. > > > > So is this is bug or is the way I distribute the objects not supported? > > I used this method only for same architecture installations. > Never tried it for different architectures, so I cannot tell if this is a > regression. > > -- > Andriy Gapon I recall someone said build and install needs to be on the same archtecture and base code. 1. I use ggated/ggatec to export i386 device(s) to amd64 and run install on amd64. 2. I haven't tried this for a while and not sure if this still works. You can use nullfs mount over the i386.i386/tmp to hide binaries from there; if it hasn't changed, install targets don't build tmp and thus ends up picking from regular /bin and /usr/bin - there may be cases this fails. Hiro