# make installworld fails with "cc: not found"



## Jalle_88 (Mar 31, 2014)

Hello

I installed FreeBSD 10.0 a few days ago, and now I want to create some jails for a web server, an IRC server and so on. I tried following the steps found in section 15.6 of the handbook, but in section 15.6.1.2 the command:

`make installworld DESTDIR=/home/j/mroot`

fails with the following message:


```
root@genserv:/usr/src # sh
# pwd
/usr/src
# make installworld DESTDIR=/home/j/mroot
mkdir -p /tmp/install.u6dwASS2
progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown  date echo egrep find grep id install install-info  ln lockf make mkdir mtree nmtree mv pwd_mkdb  rm sed sh sysctl test true uname wc zic tzsetup; do  if progpath=`which $prog`; then  echo $progpath;  else  echo "Required tool $prog not found in PATH." >&2;  exit 1;  fi;  done);  libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u |  while read line; do  set -- $line;  if [ "$2 $3" != "not found" ]; then  echo $2;  else  echo "Required library $1 not found." >&2;  exit 1;  fi;  done);  cp $libs $progs /tmp/install.u6dwASS2
cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.u6dwASS2/locale
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install.u6dwASS2  LD_LIBRARY_PATH=/tmp/install.u6dwASS2  PATH_LOCALE=/tmp/install.u6dwASS2/locale make -f Makefile.inc1    COMPILER_TYPE=clang __MAKE_SHELL=/tmp/install.u6dwASS2/sh reinstall;  MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install.u6dwASS2  LD_LIBRARY_PATH=/tmp/install.u6dwASS2  PATH_LOCALE=/tmp/install.u6dwASS2/locale rm -rf /tmp/install.u6dwASS2
cc: not found
make[2]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
cc: not found
make[3]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
cc: not found
make[3]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
--------------------------------------------------------------
>>> Making hierarchy
--------------------------------------------------------------
cd /usr/src; make -f Makefile.inc1  LOCAL_MTREE= hierarchy
cc: not found
make[3]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
cc: not found
make[4]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
cc: not found
make[4]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
cd /usr/src/etc && PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install.u6dwASS2 make LOCAL_MTREE= distrib-dirs
cc: not found
make[4]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
mtree -deU -f /usr/src/etc/mtree/BSD.root.dist -p /home/j/mroot/
mtree -deU -f /usr/src/etc/mtree/BSD.var.dist -p /home/j/mroot/var
empty:  flags ("schg" is not "none"mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist -p /home/j/mroot/usr
mtree -deU -f /usr/src/etc/mtree/BSD.include.dist -p /home/j/mroot/usr/include
mtree -deU -f /usr/src/etc/mtree/BSD.groff.dist -p /home/j/mroot/usr
mtree -deU -f /usr/src/etc/mtree/BSD.sendmail.dist -p /home/j/mroot/
install -l s usr/src/sys /home/j/mroot/sys
cd /home/j/mroot/usr/share/man;  for mandir in man*; do  install -l s ../$mandir  /home/j/mroot/usr/share/man/en.ISO8859-1/;  install -l s ../$mandir  /home/j/mroot/usr/share/man/en.UTF-8/;  done
cd /home/j/mroot/usr/share/openssl/man;  for mandir in man*; do  install -l s ../$mandir  /home/j/mroot/usr/share/openssl/man/en.ISO8859-1/;  done
set - `grep "^[a-zA-Z]" /usr/src/etc/man.alias`;  while [ $# -gt 0 ] ; do  install -l s "$2" "/home/j/mroot/usr/share/man/$1";  install -l s "$2"  "/home/j/mroot/usr/share/openssl/man/$1";  shift; shift;  done
set - `grep "^[a-zA-Z]" /usr/src/etc/nls.alias`;  while [ $# -gt 0 ] ; do  install -l s "$2" "/home/j/mroot/usr/share/nls/$1";  shift; shift;  done

--------------------------------------------------------------
>>> Installing everything
--------------------------------------------------------------
cd /usr/src; make -f Makefile.inc1 install
cc: not found
make[3]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
cc: not found
make[4]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
cc: not found
make[4]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
===> share/info (install)
cc: not found
make[4]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
===> lib (install)
cc: not found
make[4]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
===> lib/csu/amd64 (install)
cc: not found
make[5]: "/usr/src/share/mk/bsd.own.mk" line 426: warning: "cc --version" returned non-zero status
install -o root -g wheel -m 444  crt1.o crti.o crtn.o Scrt1.o gcrt1.o /home/j/mroot/usr/lib
install: crt1.o: No such file or directory
*** Error code 71

Stop.
make[5]: stopped in /usr/src/lib/csu/amd64
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib
*** Error code 1

Stop.
make[3]: stopped in /usr/src
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
#
```

I have checked that there is a cc in /usr/bin/cc, and that it returns 0 when called with --version. The only thing I managed to find while googling was the following:


[url=https://forums.freebsd.org/viewtopic.php?&t=42969]viewtopic.php?&t=42969
[/url]

but on my machine neither /tmp nor /var/tmp have the noexec property set.


```
# mount
zroot on / (zfs, local, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
zroot/tmp on /tmp (zfs, local, nosuid, nfsv4acls)
zroot/usr on /usr (zfs, local, nfsv4acls)
zroot/usr/home on /usr/home (zfs, local, nfsv4acls)
zroot/usr/log on /usr/log (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/mail on /usr/mail (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, nosuid, nfsv4acls)
zroot/usr/ports/distfiles on /usr/ports/distfiles (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/ports/packages on /usr/ports/packages (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var on /var (zfs, local, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/db on /var/db (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/db/pkg on /var/db/pkg (zfs, local, nosuid, nfsv4acls)
zroot/var/empty on /var/empty (zfs, local, noexec, nosuid, read-only, nfsv4acls)
zroot/var/run on /var/run (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, nosuid, nfsv4acls)
```

I also tried turning off noexec on zroot/usr/src but that didn't help.

So I really don't know what to try next.


----------



## SirDice (Mar 31, 2014)

Did you do a full `make buildworld` beforehand?


----------

