Getting the "make" binary into a nanoBSD environment (pfSense snapshot)
-
Hi board,
I know this is probably not supported at all by the Main Directives in the pfSense production environment. But I like to experiment, and am currently trying to get FreeBSD ports onto my pfSense Nano install (2.0-BETA0).
I got hold of the ports source tree fine using csup, but I cannot for the love of my life get any version of make running with the port Makefiles framework (/usr/ports/Mk). I have tried using both GNU and BSD make, now pretty convinced I should use the latter (BSD) for the purpose of compiling ports.
Currently using bmake v20111111.
However, bmake will not accept port Makefiles and gives me the following error, when trying to build lsof:
bmake: "/usr/ports/sysutils/lsof/Makefile" line 45: Could not find bsd.port.pre.mk bmake: "/usr/ports/sysutils/lsof/Makefile" line 47: Malformed conditional (${ARCH} == "arm") bmake: "/usr/ports/sysutils/lsof/Makefile" line 89: Could not find bsd.port.post.mk bmake: Fatal errors encountered -- cannot continue bmake: stopped in /usr/ports/sysutils/lsof
Please ignore the error from line 47, as this has been proven to not affect the rest of the execution (I made a copy of the Makefile with that block removed). But I'm leaving it in my example as a detail to the problem in whole.
The files mentioned (bsd.port.pre/post.mk) can be found in /usr/ports/Mk, which was fetched when I ran csup to get the ports tree. Passing the flag -I to bmake to add that extra directory to the include path does not seem to affect the behavior.
Has anyone been here before? I'm not looking for a blessing from the staff, but hopefully I'm not alone on in tinkering with extraterrestial software on our pf boxes :D
Thanks in advance,
kchr -
http://doc.pfsense.org/index.php/Can_I_compile_software_on_pfSense
It's a bad idea, don't waste your time. Setup a dedicated VM to compile in and then move it over. You'll be done with that before you'd even manage to get something half compiled and hit more errors by hacking up the firewall directly and reducing its security.
-
Constructive answer.
I would really like to know why BSD make cannot find the template files, though, but I guess that is an make/BSD issue rather than pfSense :-)
-
You would need a lot more than just make. You need the entire development toolset and compilers.
As already suggested a firewall is no place to do things like this.