# Error Compile FreeBSD 9



## ariecc (Jan 14, 2012)

hey every body.

I get some error in compile my FreeBSD box, I use FreeBSD 9. In compile my kernel I just want to remove SCSI, RAID, Floppy, Wireless but I get some error.

This is error:


```
./aicasm -nostdinc -I. -I../../.. -I../../../contrib/altq -I../../../contrib/ipfilter -I../../../contrib/pf -I../../../dev/ath
 -I../../../dev/ath/ath_hal -I../../../contrib/ngatm -I../../../dev/twa -I../../../gnu/fs/xfs/FreeBSD -I../../../gnu/fs/xfs/FreeBSD/support
 -I../../../gnu/fs/xfs -I../../../dev/cxgb -I../../../dev/cxgbe -I../../../cam/scsi -I../../../dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h
 -p aic7xxx_reg_print.c -i ../../../dev/aic7xxx/aic7xxx_osm.h ../../../dev/aic7xxx/aic7xxx.seq
./aicasm: Permission denied
*** Error code 1
```

Can some one help me please. Sorry my English so poor.

Thanks in advance.


----------



## mbb (Jan 15, 2012)

Check the mount options on your /usr/obj filesystem.  I had the same problem, and it was because I had the ZFS exec property set to "off" for /usr/obj.  


```
# mount | grep usr/obj
root0/usr/obj on /usr/obj (zfs, local, noexec, nosuid, nfsv4acls)
# zfs set exec=on root0/usr/obj
```


----------



## ariecc (Jan 17, 2012)

I have solved this problem with: 

```
make cleandir && make cleanworld in /usr/src
make buildkernel KERNCONF=TEST && make installkernel KERNCONF=TEST
```


----------



## shacknetisp (Jan 20, 2012)

ever heard of sudo?


----------



## kpa (Jan 20, 2012)

What does sudo(8) have to do with OP's problem?


----------



## shacknetisp (Jan 22, 2012)

sudo fixed the same problem that I had when I was compiling the kernel:

sudo make...
sudo make...
sudo ...


----------



## DutchDaemon (Jan 22, 2012)

That makes no sense at all. Sudo is simply another way to execute code as the root user. It doesn't fix problems simply because of that. Moreover, security/sudo is third-party software, so it isn't even present in the default installation. It is in most Linux distros, I guess. Are you actually familiar with FreeBSD?


----------



## leonderooij (Mar 5, 2012)

I had the same problem when doing a `make depend` in /usr/src/sys/amd64/compile/GENERIC.

Apparently the aicasm is run from that directory, while I had exec=off on /usr/src. I temporarily set exec to on for that mountpoint after which I could continue.


----------



## nops (Nov 6, 2013)

leonderooij said:
			
		

> I had the same problem when doing a `make depend` in /usr/src/sys/amd64/compile/GENERIC.
> 
> Apparently the aicasm is run from that directory, while I had exec=off on /usr/src. I temporarily set exec to on for that mountpoint after which I could continue.



Thanks!
It helped!

```
# zfs set exec=on zroot/usr/src
```


----------

