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

    Building pfSense - Something basic I'm doing wrong?

    Scheduled Pinned Locked Moved Development
    56 Posts 14 Posters 11.0k Views
    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.
    • N
      none
      last edited by

      Hail,

      jporter helped me to get the sources, but I can't find a post I had before that would walk through the steps to compile pfsense. I found the kernel dir (my main project), but can't figure out the what is the definitive script to config and build.

      I tried the build.sh –configure get me issues:

      %./build.sh --configure
      
      You must first run ./set_version.sh !
      See http://devwiki.pfsense.org/DevelopersBootStrapAndDevIso for more information.
      
      You can also run ./menu.sh which will assist with the available options
      
      

      is there a new version of http://devwiki.pfsense.org/DevelopersBootStrapAndDevIso ?

      thanks,

      none

      ps: if I should open new thread, please say. As this is on the subject, I figured here as a right place.

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by

        @kpa:

        Fair enough. I'll summarize quickly what I have learned so far:

        There is no documentation available for using the tools repo so one has trough trial and error and asking around gather the necessary information on how to use it. In my case the missing piece of information was that pfPorts needs to built first before anything else. Building of pfPorts is not done automatically if you just fire up the build script as```
        build.sh iso

        
        You need an ultra-clean FreeBSD installation on the build host because the tools want to build everything its way and anything non-standard in terms of configuration trips it very easily.
        
        Building pfSense will "contaminate" your build host with pfSense speficic modifications. This is something I absolutely don't want and I'm now moving to using a jail as the build host.
        
        More to follow later.
        

        Yes..  We maintain dedicated builders for this reason and more.

        There is 10 years of history to deal with in changing things.

        1 Reply Last reply Reply Quote 0
        • B
          bhawk6901
          last edited by

          I am trying to build on 8.3. when i run cd /usr/ports/textproc/expat2 && make depends install; i get error as shown in attchment. i have tried 3 different installations for i386 as well as amd64. Plz help on what im doing wrong

          Capture.PNG
          Capture.PNG_thumb

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

            @bhawk6901:

            I am trying to build on 8.3. when i run cd /usr/ports/textproc/expat2 && make depends install; i get error as shown in attchment. i have tried 3 different installations for i386 as well as amd64. Plz help on what im doing wrong

            You have hit the problem with the FreeBSD 8.3 release not being compatible with the newer FreeBSD ports tree.  Changing out the make utility as someone described in a previous post may help.  You can also try this tip I was given and which worked for me:

            Ports tree doesn’t support FreeBSD 8.3 anymore, you need to use the stable branch of ports tree called “2014Q2” instead of head. You can get it using:

            svn co http://svn.freebsd.org/ports/branches/2014Q2 /usr/ports

            This branch won’t have latest version of all ports, it only gets security updates, but the core files (/usr/ports/Mk/*) are still complaint with 8.3.

            So to do the above on your builder, first delete the entire existing ports tree with –

            
            rm -rf /usr/ports
            
            

            – then run this command:

            
            svn co http://svn.freebsd.org/ports/branches/2014Q2 /usr/ports
            
            

            DO NOT perform a normal ports update in the future or you will break the builder again.  My suggestion would be to abandon building FreeBSD 8.3-based pfSense and use 2.2 instead since it uses the current FreeBSD 10-STABLE.

            Bill

            1 Reply Last reply Reply Quote 0
            • B
              bhawk6901
              last edited by

              @bmeeks:

              @bhawk6901:

              I am trying to build on 8.3. when i run cd /usr/ports/textproc/expat2 && make depends install; i get error as shown in attchment. i have tried 3 different installations for i386 as well as amd64. Plz help on what im doing wrong

              You have hit the problem with the FreeBSD 8.3 release not being compatible with the newer FreeBSD ports tree.  Changing out the make utility as someone described in a previous post may help.  You can also try this tip I was given and which worked for me:

              Ports tree doesn’t support FreeBSD 8.3 anymore, you need to use the stable branch of ports tree called “2014Q2” instead of head. You can get it using:

              svn co http://svn.freebsd.org/ports/branches/2014Q2 /usr/ports

              This branch won’t have latest version of all ports, it only gets security updates, but the core files (/usr/ports/Mk/*) are still complaint with 8.3.

              So to do the above on your builder, first delete the entire existing ports tree with –

              
              rm -rf /usr/ports
              
              

              – then run this command:

              
              svn co http://svn.freebsd.org/ports/branches/2014Q2 /usr/ports
              
              

              DO NOT perform a normal ports update in the future or you will break the builder again.  My suggestion would be to abandon building FreeBSD 8.3-based pfSense and use 2.2 instead since it uses the current FreeBSD 10-STABLE.

              Bill

              Thanks for your reply. I shifted to freebsd10 before you replied. When i apply patches, it fails saying /usr/pfSensesrc/src does not exist.
              Kindly guide me further

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

                @bhawk6901:

                Thanks for your reply. I shifted to freebsd10 before you replied. When i apply patches, it fails saying /usr/pfSensesrc/src does not exist.
                Kindly guide me further

                Well, it's been a long time since I set up my builder virtual machine, but I seem to remember having to manually create several directories along the way as I hit various bumps.  As you have seen, the documentation is either missing and/or not updated in some cases.  Try manually creating the directory /usr/pfSensesrc using:

                
                mkdir -p /usr/pfSensesrc
                
                

                Then try the apply patches step again.  There may well be several directories you will need to manually create as the scripts seem to expect some to exist already, while others it will create if they are missing.

                Bill

                1 Reply Last reply Reply Quote 0
                • B
                  bhawk6901
                  last edited by

                  Apply patches goes fine, next i get the error as shwon in attacchment. I made sure to change git.pfmechanics to
                  export FREEBSD_REPO_BASE=https://svn0.us-east.freebsd.org/base
                  also every time i invoke build iso option, it downloads sources again, any way to skip that?

                  Edit: snapshot of pfsensebuild.conf is att

                  Capture.PNG
                  Capture.PNG_thumb
                  Capture2.PNG
                  Capture2.PNG_thumb

                  1 Reply Last reply Reply Quote 0
                  • B
                    bhawk6901
                    last edited by

                    UPDATE: when i apply patches manually it goes fine but when i invoke the buid.sh iso option patches get rejected. Any idea what might be causing that?

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

                      @bhawk6901:

                      UPDATE: when i apply patches manually it goes fine but when i invoke the buid.sh iso option patches get rejected. Any idea what might be causing that?

                      I haven't tried to build a 2.2 ISO in the last couple of months, so I don't know if my setup still works or not.  However, in your screen capture of the error notice that it says "…cloning git@git.pfmechanics.com...".  This means it is trying to use pfmechanics.com to checkout source code.  I'm pretty sure that is an internal-only server at ESF, and thus you can't access it.  Don't know if the script is hard-coded with this value or if it is customizable.

                      Bill

                      1 Reply Last reply Reply Quote 0
                      • H
                        heper
                        last edited by

                        @bmeeks:

                        @bhawk6901:

                        UPDATE: when i apply patches manually it goes fine but when i invoke the buid.sh iso option patches get rejected. Any idea what might be causing that?

                        I haven't tried to build a 2.2 ISO in the last couple of months, so I don't know if my setup still works or not.  However, in your screen capture of the error notice that it says "…cloning git@git.pfmechanics.com...".  This means it is trying to use pfmechanics.com to checkout source code.  I'm pretty sure that is an internal-only server at ESF, and thus you can't access it.  Don't know if the script is hard-coded with this value or if it is customizable.

                        Bill

                        yes pfmechanics is private…

                        see this post for the relevant public git repo's: https://forum.pfsense.org/index.php?topic=76132.msg415051#msg415051

                        1 Reply Last reply Reply Quote 0
                        • B
                          bhawk6901
                          last edited by

                          there has been progress. Now though when building ports, strongswan, php5 and resultantly others depending on php5 such as php5-pfsensemodule and a number of others as shown in attachment.
                          Error with php5 being

                          php55-5.5.13 conflicts with installed package(s):
                                php53-5.3.28

                          They will not build together.
                                Please remove them first with pkg delete.
                          *** Error code 1

                          Stop.
                          make: stopped in /usr/ports/lang/php55

                          any help please?
                          EDIT: tried building with make_jobs_unsafe=yes as well as otherwise. This is the log when i build with make_jobs_unsafe=yes

                          Capture.PNG
                          Capture.PNG_thumb
                          php55.txt
                          php55-pfSense-module.txt

                          1 Reply Last reply Reply Quote 0
                          • B
                            bhawk6901
                            last edited by

                            update: php55 errors are gone. uninstalled php53 first
                            still stuck on strongswan and libevent errors though

                            1 Reply Last reply Reply Quote 0
                            • B
                              bhawk6901
                              last edited by

                              went back to building on 8.3, All ports get build except for lighttpd.
                              Error log as shown in attachment

                              I went ahead to make the iso which got built succesfully but the web  configurator page wouldnt load which i assume is due to absence of lighttpd.
                              What's causing the error? Help please

                              Capture.PNG
                              Capture.PNG_thumb

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

                                @bhawk6901:

                                went back to building on 8.3, All ports get build except for lighttpd.
                                Error log as shown in attachment

                                I went ahead to make the iso which got built succesfully but the web  configurator page wouldnt load which i assume is due to absence of lighttpd.
                                What's causing the error? Help please

                                It's a problem with the pkgconfig tool version. Unfortunately, that's about the extent of my knowledge about this on FreeBSD.  I recall hitting the same error myself in the past.  I think I solved it by manually altering the Makefile, but as soon as you do a refresh from the pfsense-tools repository, your change will be overwritten.  I have not looked, but are there different Git branches for pfsense-tools?  Pulling "master" will of course bring down stuff optimized for FreeBSD 10.  If older versions exist, they may contain pfPorts files compatible with the older FreeBSD 8.3 tools.

                                Bill

                                1 Reply Last reply Reply Quote 0
                                • B
                                  bhawk6901
                                  last edited by

                                  @bmeeks:

                                  It's a problem with the pkgconfig tool version. Unfortunately, that's about the extent of my knowledge about this on FreeBSD.  I recall hitting the same error myself in the past.  I think I solved it by manually altering the Makefile, but as soon as you do a refresh from the pfsense-tools repository, your change will be overwritten.
                                  Bill

                                  Can you please guide me to what change did you make exactly? I studied the Makefile but there was only one metnion of pkgconfig

                                  GNU_CONFIGURE= yes
                                  USES= gmake libtool pkgconfig tar:bzip2

                                  One issue which i faced while building 2.2 via v10 was that whenever it tried to clone pfsense from repository, it would fail. When i checked git repository, i couldnt find RELENG_2_2 branch. Is that why if was failing and reporting that pfSenseGITREPO path doesnt exist?

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

                                    @bhawk6901:

                                    @bmeeks:

                                    It's a problem with the pkgconfig tool version. Unfortunately, that's about the extent of my knowledge about this on FreeBSD.  I recall hitting the same error myself in the past.  I think I solved it by manually altering the Makefile, but as soon as you do a refresh from the pfsense-tools repository, your change will be overwritten.
                                    Bill

                                    Can you please guide me to what change did you make exactly? I studied the Makefile but there was only one metnion of pkgconfig

                                    GNU_CONFIGURE= yes
                                    USES= gmake libtool pkgconfig tar:bzip2

                                    One issue which i faced while building 2.2 via v10 was that whenever it tried to clone pfsense from repository, it would fail. When i checked git repository, i couldnt find RELENG_2_2 branch. Is that why if was failing and reporting that pfSenseGITREPO path doesnt exist?

                                    I don't remember what I changed.  I just did a lot of Google searching and fiddled around with the USES section in the Makefile (looks like you are already doing that).  I know at one point I also went exploring through /usr/ports/devel and installed some other stuff (but again, sorry I did not keep track of what I did).  I only use my builders to produce PBIs for my supported packages: Snort and Suricata.  I don't build ISOs routinely.  I built one, and only just once.  Actually I think my builder is also currently "broken" for building an ISO.  It works fine for my purpose of building PBIs, though.

                                    As for your second question, you are correct there is currently no RELENG_2_2 branch.  If you have not done so already, from your builder and in the tools directory issue this command to see the available remote branches:

                                    
                                    git remote show origin
                                    
                                    

                                    Bill

                                    1 Reply Last reply Reply Quote 0
                                    • C
                                      clem68
                                      last edited by

                                      The master branch of pfsense-tools supports building on FreeBSD 8.3 as well as 10.
                                      Ports are not tied to a FreeBSD version, but there should be no problem building them up-to-date (I have done so).

                                      Regarding pkgconf, I had a problem related to its obsolescence (it needs to be replaced by pkg-config) and maybe you are facing the same thing. The steps required to deal with this  are described in UPGRADING , for example you can do:

                                      portmaster -o devel/pkgconf devel/pkg-config
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        bhawk6901
                                        last edited by

                                        @clem68:

                                        The master branch of pfsense-tools supports building on FreeBSD 8.3 as well as 10.
                                        Ports are not tied to a FreeBSD version, but there should be no problem building them up-to-date (I have done so).

                                        Regarding pkgconf, I had a problem related to its obsolescence (it needs to be replaced by pkg-config) and maybe you are facing the same thing. The steps required to deal with this  are described in UPGRADING , for example you can do:

                                        portmaster -o devel/pkgconf devel/pkg-config
                                        

                                        Thanks for the guidance. I'll look into it further :)

                                        meanwhile regarding 2.2, which version do i specify to get build 2.2? I performed git remote origin and found these

                                        Remote branches:
                                            RELENG_1_2 tracked
                                            RELENG_2_0 tracked
                                            RELENG_2_1 tracked
                                            devel      tracked
                                            master    tracked
                                          Local branch configured for 'git pull':

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          bhawk6901
                                          last edited by

                                          @clem68:

                                          The master branch of pfsense-tools supports building on FreeBSD 8.3 as well as 10.
                                          Ports are not tied to a FreeBSD version, but there should be no problem building them up-to-date (I have done so).

                                          Regarding pkgconf, I had a problem related to its obsolescence (it needs to be replaced by pkg-config) and maybe you are facing the same thing. The steps required to deal with this  are described in UPGRADING , for example you can do:

                                          portmaster -o devel/pkgconf devel/pkg-config
                                          

                                          i had pkgconf installed, if im not wrong pkgconf replaced pkg-config.you mean i should revert to old i,e. pkg-config?

                                          lighttpd.txt

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            bhawk6901
                                            last edited by

                                            messed around with pkg-plist, removed "@" symbols and error changes to

                                            Creating bzip'd tar ball in '/usr/ports/www/lighttpd/work/pkg/lighttpd-1.4.35_2.tbz'
                                            tar: sample etc/lighttpd/lighttpd.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/modules.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/access_log.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/auth.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/cml.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/cgi.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/compress.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/debug.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/dirlisting.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/evhost.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/expire.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/fastcgi.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/magnet.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/mime.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/mysql_vhost.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/proxy.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/rrdtool.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/scgi.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/secdownload.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/simple_vhost.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/ssi.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/status.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/trigger_b4_dl.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/userdir.conf.sample: Cannot stat: No such file or directory
                                            tar: sample etc/lighttpd/conf.d/webdav.conf.sample: Cannot stat: No such file or directory
                                            tar: dirrm lib/lighttpd: Cannot stat: No such file or directory
                                            tar: dirrmtry etc/lighttpd/vhosts.d: Cannot stat: No such file or directory
                                            tar: dirrmtry etc/lighttpd/conf.d: Cannot stat: No such file or directory
                                            tar: dirrmtry etc/lighttpd: Cannot stat: No such file or directory
                                            tar: Error exit delayed from previous errors.
                                            pkg_create: make_dist: tar command failed with code 256
                                            *** Error code 1

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