# Build on amd64, install on i386



## AErmak (Nov 10, 2011)

Hi!

I have systems with an amd64 and i386 processor. On amd64 machine I run commands:

```
make TARGET=i386 TARGET_ARCH=i386 buildworld
make TARGET=i386 TARGET_ARCH=i386 builkernel KERNCONF=MYKERNEL
```
Build completes without errors.

After that I copy from amd64 machine contents of /usr/src and /usr/obj/i386 to i386 machine /usr/src and /usr/obj, accordingly. When I try to do it on an i386 machine:

```
make installkernel KERNCONF=MYKERNEL
```
But install failed, because the 'install' binary is an ELF 64-bit LSB executable, x86-64.

How can I install kernel and world on an i386 machine?

Mounting via nfs and running install from amd64 machine is not suitable.


----------



## SirDice (Nov 10, 2011)

AErmak said:
			
		

> After that I copy from amd64 machine contents of /usr/src and /usr/obj/i386 to i386 machine /usr/src and /usr/obj, accordingly.


Why don't you just NFS export /usr/src/ and /usr/obj/? You can export them read-only.



> ```
> make installkernel KERNCONF=MYKERNEL
> ```
> but install failed, because the 'install' binary is an ELF 64-bit LSB executable, x86-64.


Yes, I ran into this myself. I can distinctly remember this worked some time ago. Haven't figured out a solution though


----------



## AErmak (Nov 10, 2011)

SirDice said:
			
		

> Why don't you just NFS export /usr/src/ and /usr/obj/? You can export them read-only.



Mounting via NFS and running install from amd64 machine *is not suitable*.


----------



## SirDice (Nov 10, 2011)

AErmak said:
			
		

> Mounting via NFS and running install from amd64 machine *is not suitable*.


I meant the other way around. Mounting and installing on the i386, exporting on the amd64.

Not that it matters as you will run into the same problem with the installer.


----------



## AErmak (Nov 10, 2011)

SirDice said:
			
		

> I meant the other way around. Mounting and installing on the i386, exporting on the amd64.
> 
> Not that it matters as you will run into the same problem with the installer.


Any operations with NFS is not suitable. Also build in i386 jail on amd64 machine with following copy and install, is not suitable.


----------

