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

    pfsense-tools.git clang gcc

    Scheduled Pinned Locked Moved Development
    clanggccpfsense-tools
    19 Posts 5 Posters 337 Views 5 Watching
    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.
    • dennypageD Offline
      dennypage
      last edited by

      You're likely to find a whole bunch of stuff you would need to install to get development going with pfSense.

      A simpler approach, and a safer one with regard to your pfSense installation, would be to install FreeBSD 14.1 in a VM and use that as your dev system.

      JonathanLeeJ 1 Reply Last reply Reply Quote 1
      • JonathanLeeJ Offline
        JonathanLee @dennypage
        last edited by JonathanLee

        @dennypage I found this also on netgate docs. I have the pfsense in a VM already so it is not a big deal if it crashes.

        https://docs.netgate.com/pfsense/en/latest/recipes/freebsd-pkg-repo.html.

        I just want to test my PR in a real system to see if it works... most likely it will fail but I want to see why it does so I can fix it

        Make sure to upvote

        dennypageD 1 Reply Last reply Reply Quote 0
        • dennypageD Offline
          dennypage @JonathanLee
          last edited by

          @JonathanLee said in pfsense-tools.git clang gcc:

          I found this also on netgate docs.
          ... https://docs.netgate.com/pfsense/en/latest/recipes/freebsd-pkg-repo.html.

          That doc is for installing pre-built packages from upstream FreeBSD. Installing a complete development environment that allows building ports is a different matter. It's bigger than a bread box so to speak.

          1 Reply Last reply Reply Quote 1
          • stephenw10S Offline
            stephenw10 Netgate Administrator
            last edited by

            Yup trying to build in pfSense is likely to lead only to pain! 😉

            JonathanLeeJ 1 Reply Last reply Reply Quote 0
            • JonathanLeeJ Offline
              JonathanLee @stephenw10
              last edited by

              @stephenw10 There is so many OSVERSION errors with it.... good fun

              Make sure to upvote

              1 Reply Last reply Reply Quote 0
              • JonathanLeeJ Offline
                JonathanLee
                last edited by

                I am gonna do the FreeBSD route thanks for the recommendations

                Make sure to upvote

                1 Reply Last reply Reply Quote 1
                • JonathanLeeJ Offline
                  JonathanLee
                  last edited by

                  portsnap takes FOREVER to extract wow

                  Make sure to upvote

                  1 Reply Last reply Reply Quote 0
                  • JonathanLeeJ Offline
                    JonathanLee
                    last edited by JonathanLee

                    Screenshot 2025-07-18 at 15.25.50.png

                    It works I had to adapt the make file again USES= tar:tgz for it to make install clean. I have to update the pr now

                    it comes with ROCK too!!!!

                    Make sure to upvote

                    1 Reply Last reply Reply Quote 0
                    • bmeeksB Offline
                      bmeeks
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • JonathanLeeJ Offline
                        JonathanLee
                        last edited by

                        If anyone wants to test this out

                        https://github.com/pfsense/FreeBSD-ports/pull/1420

                        I did get it to fully compile with the adapted Makefile they disable SMB_LM that has been removed

                        Make sure to upvote

                        P 1 Reply Last reply Reply Quote 0
                        • P Offline
                          phil80 @JonathanLee
                          last edited by

                          @JonathanLee said in pfsense-tools.git clang gcc:

                          https://github.com/pfsense/FreeBSD-ports/pull/1420

                          Hi,
                          Can you provide a step by step to have a builder that makes it possible to compile packages compatible with latest 2.8.0 pfsense ?
                          I tried on different FreeBSD 15 versions without success because of missing dependencies

                          This put me on a stop to pushing any changes/fixes to packages as currently I'm limited to only modifying the php extras and cannot compile any package from source

                          Thank you

                          dennypageD 1 Reply Last reply Reply Quote 0
                          • dennypageD Offline
                            dennypage @phil80
                            last edited by

                            @phil80 FWIW, I'm still using FreeBSD 14.2-RELEASE, just updating to 14.3-RELEASE. I've had no issues running the resulting binaries on FreeBSD 15-CURRENT (pfSense).

                            The general steps are:

                            Install the OS, documentation here.

                            Install the ports collection with git, documentation here.

                            Start working on your port, documentation here. Note that you can spend days and days learning the ins/outs/shortcuts of the ports system.

                            P 1 Reply Last reply Reply Quote 0
                            • P Offline
                              phil80 @dennypage
                              last edited by

                              @dennypage said in pfsense-tools.git clang gcc:

                              @phil80 FWIW, I'm still using FreeBSD 14.2-RELEASE, just updating to 14.3-RELEASE. I've had no issues running the resulting binaries on FreeBSD 15-CURRENT (pfSense).

                              The general steps are:

                              Install the OS, documentation here.

                              Install the ports collection with git, documentation here.

                              Start working on your port, documentation here. Note that you can spend days and days learning the ins/outs/shortcuts of the ports system.

                              Strange
                              I used Hyper-V to run https://download.freebsd.org/snapshots/amd64/amd64/ISO-IMAGES/15.0/FreeBSD-15.0-CURRENT-amd64-20250724-01c587521dd8-279004-disc1.iso

                              I then tried both usual portsnap and cloning pfsense FreeBSD-ports. The resulting binaries (bind9-devel) are missing links when ran in pfsense

                              I also tried FreeBD 13 jails. I didn't try 14.2 as I didn't expect it to work !

                              Normally, binaries compiled on a different kernel/environement rarely work on a different BSD version

                              dennypageD 1 Reply Last reply Reply Quote 0
                              • dennypageD Offline
                                dennypage @phil80
                                last edited by

                                @phil80 said in pfsense-tools.git clang gcc:

                                I then tried both usual portsnap and cloning pfsense FreeBSD-ports.

                                portsnap? I think that's been dead for a few years now. You need to use git for the ports collection now. Also, note that the pfSense FreeBSD-ports is not quite identical to the FreeBSD ports repo.

                                I use the standard FreeBSD ports collection, and then create the specific subdirectory that I am working on inside of that. To submit something to FreeBSD, I use their published methodology via their bug reporting system. To submit something to pfSense, I copy the directory into a clone of the pfSense FreeBSD-ports repo and do a PR.

                                14.3 is the current release version of FreeBSD, and seems the best place to build for me.

                                P 1 Reply Last reply Reply Quote 0
                                • P Offline
                                  phil80 @dennypage
                                  last edited by phil80

                                  @dennypage said in pfsense-tools.git clang gcc:

                                  @phil80 said in pfsense-tools.git clang gcc:

                                  I then tried both usual portsnap and cloning pfsense FreeBSD-ports.

                                  portsnap? I think that's been dead for a few years now. You need to use git for the ports collection now. Also, note that the pfSense FreeBSD-ports is not quite identical to the FreeBSD ports repo.

                                  I use the standard FreeBSD ports collection, and then create the specific subdirectory that I am working on inside of that. To submit something to FreeBSD, I use their published methodology via their bug reporting system. To submit something to pfSense, I copy the directory into a clone of the pfSense FreeBSD-ports repo and do a PR.

                                  14.3 is the current release version of FreeBSD, and seems the best place to build for me.

                                  I use git for pfsense.
                                  portsnap fetch properly fetches freebsd ports collection
                                  I'll try 14.3 with bind9 and report back. I just cannot understand how it can work as most packages need breaking dependencies between OS versions

                                  dennypageD 1 Reply Last reply Reply Quote 0
                                  • dennypageD Offline
                                    dennypage @phil80
                                    last edited by

                                    @phil80 said in pfsense-tools.git clang gcc:

                                    portsnap fetch properly fetches freebsd ports collection

                                    FWIW, portsnap is very dead as far as the FreeBSD folk are concerned. All references to it were removed from the documentation 5 years ago, and its use is no longer supported.

                                    The original announcement is here: [HEADS UP] Planned deprecation of portsnap.

                                    P 1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      phil80 @dennypage
                                      last edited by

                                      @dennypage said in pfsense-tools.git clang gcc:

                                      @phil80 said in pfsense-tools.git clang gcc:

                                      portsnap fetch properly fetches freebsd ports collection

                                      FWIW, portsnap is very dead as far as the FreeBSD folk are concerned. All references to it were removed from the documentation 5 years ago, and its use is no longer supported.

                                      The original announcement is here: [HEADS UP] Planned deprecation of portsnap.

                                      Thank you for the reminder. I usually only use Latest. I always use git for collaboration
                                      In short life or one use jails, portsnap is way faster to fetch than git for one package compile
                                      Based on your linked article, I'll favor git in the future

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