Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Getting the "make" binary into a nanoBSD environment (pfSense snapshot)

    Development
    3
    4
    4.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kchr
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • K
          kchr
          last edited by

          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 :-)

          1 Reply Last reply Reply Quote 0
          • G
            gderf
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.