My goal is to cross-compile binaries from an amd64 FreeBSD host to an armv6 RaspberryPi FreeBSD target.

The problem I am running into is I am required to be root in order to make install, where my command would be make PREFIX=/home/arm/install_dir NO_PKG_REGISTER=1 install. Even better would be to use make package for easier transfer to the target.

The issue is, while I am the sole administrator of the system and do have root capabilities, I would like to ensure I do not compromise the host system with an erroneous make install (such as one where I omit PREFIX= or NO_PKG_REGISTER=1).

As a precautionary measure, I do all the building as a separate user arm to help prevent me from unwittingly installing arm binaries on my host. In addition, this user has its own copy of the FreeBSD source and ports tree located separate from /usr/src and /usr/ports.

Is there a way for make to create a package without having root access?

Or can I have confidence that PREFIX and NO_PKG_REGISTER or make package will prevent my host from being polluted with inappropriate binaries?

EDIT: According to http://forums.freebsd.org/showpost.php?p=1518&postcount=7, the PREFIX approach is no good...hrm. Did I mean DESTDIR instead?

  • That depends in part of the package's Makefile writer setting stuff up for installing at a place which isn't the final one. Perhaps creating a chroot for cross-builds with all the required pieces hard linked/mounted in?
    – vonbrand
    Commented Feb 7, 2013 at 17:45
  • Chroot or jail? I'm relatively new to FreeBSD, so both of them will be a new endeavor, but I'd love to start with the most appropriate one
    – hexparrot
    Commented Feb 7, 2013 at 18:02

1 Answer 1


Crosscompile of ports is not a supported configuration. Same goes with building packages as unprivileged user.

It may work, but sometimes it does not.

I think setting up a chroot is a good idea, as it prevents you from accidently installing ARM binaries on your host system. a jail would also work, but is not necessary.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .