Subject: Re: Exec Format error. Wrong Architecture / After doing a nativ
To: None <port-i386@NetBSD.org>
From: Oliver Egginger <Oliver.Egginger@dvz.fh-giessen.de>
List: port-i386
Date: 08/24/2003 19:02:41
> OK. Are you sure you want to run bleeding edge NetBSD-current ?
Whoops, no, not really. Thank you for this hint.
I followed your suggestion to update the
NetBSD-current-branch via cvs update -A -rnetbsd-1-6 -dP.
But the build process seems to have some difficulties with
this approach, so I simply have downloaded a clean, new NetBSD
source tree from
ftp://ftp.de.NetBSD.org/pub/NetBSD/NetBSD-release-1-6/tar_files/src/
unfortunately the build process now ended with the following error,
which has occurred during a call of "i386--netbsdelf-gcc".
------------------------------------------------------------------> SNIP
i386--netbsdelf-gcc: cannot specify -o with -c or -S and multiple
compilations
*** Error code 1
Stop.
nbmake: stopped in /usr/src/lib/csu/i386_elf
*** Error code 1
Stop.
nbmake: stopped in /usr/src/lib/csu/i386_elf
*** Error code 1
Stop.
nbmake: stopped in /usr/src/lib/csu
*** Error code 1
Stop.
nbmake: stopped in /usr/src
*** Error code 1
Stop.
nbmake: stopped in /usr/src
------------------------------------------------------------------> SNIP
I used this commands:
cd /usr/src
./build.sh -m i386 -D /pub/release/i386
Any suggestion would be appreciated.
(Which source tree do you would use for building standard NetBSD 1.6.1
binarys (NOT current)).
- oliver
Original message from Alan Barrett (22-08-2003 at 17.13):
> > When I try to execute /pub/release/i386/bin/ls (for example) the shell
> > say's:
> >
> > ls: Exec Format error. Wrong Architecture
> >
> > This happens with all executables
>
> You are running a NetBSD-1.6.1 kernel, but you have asked build.sh
> to build new userland programs that are intended to run under a
> NetBSD-current kernel. You can't run new userland executables with an
> old kernel (except when old and new are sufficiently close together).
>
> If you really want to run NetBSD-current, then you need to boot with a
> new kernel before you try running new userland executables. You can
> build a new kernel with a command like
>
> build.sh -m i386 -D /pub/release/i386 kernel=GENERIC
>
> Alternatively, stay away from NetBSD-current until you have more
> experience. So, instead of trying to upgrade to -current, upgrade to
> 1.6.latest. Try the following:
>
> 1. convert your source tree to the netbsd-1.6 branch.
>
> cd /usr/src
> cvs update -A -rnetbsd-1-6 -dP
>
> 2. build a new userland using a command like
>
> build.sh -m i386 -D /pub/release/i386
>
> 3. the new userland should be compatible with a 1.6.1 kernel.
>
> (Note that the build.sh options in the 1.6 branch and in -current
> are very different.)
>
> --apb (Alan Barrett)