Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2001 08:38:21 -0700
From:      Mark Peek <mark@whistle.com>
To:        Ruslan Ermilov <ru@FreeBSD.ORG>, Bruce Evans <bde@zeta.org.au>
Cc:        Warner Losh <imp@harmony.village.org>, current@FreeBSD.ORG
Subject:   Re: Cross builds and upgrade path from 4.x are broken in usr.bin/file
Message-ID:  <p05100300b799a7ab0ef4@[207.76.207.129]>
In-Reply-To: <20010810173751.B60193@sunbay.com>
References:  <20010810110151.B7988@sunbay.com> <20010810235643.Y23367-100000@besplex.bde.org> <20010810173751.B60193@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 5:37 PM +0300 8/10/01, Ruslan Ermilov wrote:
>1.  This won't work for cross-platform installworld, since ./file
>     is targetted for a different platform.  (My version builds the
>     xfile build-tool for the build platform and compiles .mgc files
>     in ${.OBJDIR}.)

I'm not sure I understand what you mean by "cross-platform" 
installworld. Do you mean "build on a HOST platform and install on 
TARGET", or "build on a HOST, install on HOST but using a TARGET 
disk"? I believe the only scenario that is supportable is the former 
and you should always run installworld on the TARGET platform. As 
long as ./file is run during installworld, it will work in this 
scenario since ./file is a TARGET executable running on the TARGET 
system. And, in addition, the .mgc files will be written in TARGET 
binary form, not HOST binary form.

>2.  .mgc files get wrong ownership and file modes.  (My version
>     installs them with correct ownership and modes.)

That's a bug in file. However, it is easy to add a chown/chmod into 
the Makefile install rules.

>3.  usr.bin/file still needs to be bootstrapped, because -C is a
>     new option.  (My version doesn't need bootstrapping file,
>     because it is only used as a `build-tool'.)

Why? When is "file" run during the build process as a build tool? It 
can be run during installworld with "./file -C ...".

Let's get back to the original issue that occurred when you tried a 
4.X->5.0 upgrade:

At 12:30 PM +0300 8/9/01, Ruslan Ermilov wrote:
>In the case of 4.x->5.0 upgrade, buildworld bombs with
>
>./file -C -m magic
>/usr/libexec/ld-elf.so.1: Shared object "libc.so.5" not found
>*** Error code 1

This is due to the Makefile running "./file" during the build 
process. We have already agreed that this is bad and my patches have 
moved it to the install phase (similar to running zic for timezone 
file creation).

Try my patch <http://people.freebsd.org/~mp/file.patch>; on the 
4.X->5.0 case and see if it fixes the problem you encountered.

Mark

Ahhh, accolades from my peers... :-) :-)
"Mark's patch is less hokey than mine." - jhb
"Mark Peek noticed the cross-building problem and sent a little less ugly fix"
- bde

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05100300b799a7ab0ef4>