In the IPFire 2.x - Building Addons wiki page it mentions Ubuntu 64-bit which I’ve never used. I do have a Debian x86_64 built up on a Dell Vostro 220s (Intel Core2 DUO).
Are there any issues or gotchas using Debian vs. Ubuntu for IPFire building? I’m assuming all is similar enough that I should be OK…
That depends on what you want to do. The foo* sources are all related to a print server. Unless you want to build your own print server, you don’t have to have these at all. It’s just an example!
is the problem since this command should work. You need to cd into */ipfire-2.x first before you can configure git. The other question is, would you like to send patches via mail to the developer mailinglist (does your account works for this ?)? To make your first steps, configuring the git mail system is not need.
As a fast one:
git clone git://git.ipfire.org/ipfire-2.x.git
cd into */ipfire-2.x
# Setup personal config
git config --global user.name FULLNAME
git config --global user.email EMAIL
git config --global color.ui auto
# To build a 64bit architecture
echo TARGET_ARCH=x86_64 > .config
# To build ARM
echo TARGET_ARCH=armv5tel > .config
# Nothing to do for 32 bit
# Setup email config only needed to send patches to developer mailinglist
git config --global sendemail.smtpencryption ssl
git config --global sendemail.smtpserver submissions.ipfire.org
git config --global sendemail.smtpserverport 465
git config --global sendemail.smtpuser USERNAME
git config --global sendemail.smtppass PASSWORD
git config --global sendemail.smtpsslcertpath ''
# Get the sources, the toolchain and build it
# If you not su´ed into root or building on an IPFire DEV env,
# you will need sudo before './make.sh'
./make.sh downloadsrc
./make.sh gettoolchain
./make.sh build
after the building process, */ipfire-2.x/build is presant to change into chroot use ./make.sh shell
and download your sources checkout howto build and/or test around with your addons or modifications, toolchains are available there.
Got it! The cd into */ipfire-2.x was what I missed. Tnx!
Agreed. I am just learning for now and probably not needed at this time.
I did all of these steps before except the:
# To build a 64bit architecture
echo TARGET_ARCH=x86_64 > .config
and then I did:
$ cd ipfire-2.x
$ ./make.sh downloadsrc
$ ./make.sh gettoolchain
$ ./make.sh build
. . .
ERROR: root privileges required for building [ FAIL ]
Check /home/pi/ipfire-2.x/log/_build.preparation.log for errors if applicable [ FAIL ]
$ sudo ./make.sh build
. . .
And ./make.sh build ran for a REALLY long time…
How do I rebuild my playground after adding inecho TARGET_ARCH=x86_64 > .config ?
Also, near the end of the 1st build I got this error:
ipset (7.3) [ 34 ][ DONE ]
dnsdist (1.4.0) [ 17 ][ FAIL ]
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
. . .
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.
This program built for x86_64-pc-linux-gnu
Report bugs to <bug-make@gnu.org>
make: *** [dnsdist:84: /usr/src/log/dnsdist-1.4.0] Error 2
ERROR: Building dnsdist [ FAIL ]
Check /home/pi/ipfire-2.x/log/_build.ipfire.log for errors if applicable [ FAIL ]
pi@dellDeb:~/ipfire-2.x $
What is Error 2??
I didn’t see an error in _build.ipfire.log but I think it may have gotten overwritten when I ran sudo ./make.sh build a second time.
I’m not sure I understand “change into chroot use ./make.sh shell”. Am I running make.sh shell after sudo su or???
i build on an IPFire ENV therefore i didn´t need sudo an have forgotten to mentioned it but adapted it above.
this is the current actual development, this can happens if not all patches are integrated, ‘Error 2’ have something to do with ‘make $(MAKETUNING)’ in dnsdist LFS. If you comment it e.g.: cd $(DIR_APP) && make #$(MAKETUNING)
the build runs through but that one can be reported in the developer mailinglist which needs to be fixed there and 99%, it will be fixed in another way as i did it with my workaround.
the error has been displayed like you posted it, it should be findable also in _build.ipfire.log e.g.: tail -100 log_build.ipfire.log
The chroot environment is a complete build of IPFire with all addons but also with all your modifications in it. If you clean up sudo ./make.sh clean
this directory disappears and IPFire needs to be completely rebuild again (this does not take so long as the first time), so far you can make what ever you want in this directory. You can test there your addons, modifications or try to make a Windows system out of it .
$ cat /home/pi/ipfire-2.x/lfs/dnsdist
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 1.4.0
THISAPP = dnsdist-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
SUP_ARCH = x86_64 i586
PROG = dnsdist
PAK_VER = 4
DEPS = ""
MAX_PARALLELISM = $(shell echo $$(( $(SYSTEM_MEMORY) / 2048)))
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 0fecd7d600c1c094b9fffffd27c44369
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
dist:
@$(PAK)
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-openssl \
--disable-gnutls \
--enable-dns-over-tls \
--with-lua \
--without-net-snmp
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
#install initscripts
$(call INSTALL_INITSCRIPT,dnsdist)
install -v -m 644 $(DIR_SRC)/config/backup/includes/dnsdist \
/var/ipfire/backup/addons/includes/dnsdist
@rm -rf $(DIR_APP)
@$(POSTBUILD)
And I see this line: cd $(DIR_APP) && make $(MAKETUNING).
Can you explain LFS? And why commenting this line out would help? Wouldn’t this have shown up in the recent build for the Core Update 142 release on March 18?
Every package have it´s own LFS file, so does dnsdist too
This LFS (= Linux From Scratch) file includes primarily the building instructions and you will need your own if you want to build an addon. Check out the wiki page, it explains the different points well i think. The ‘# Installation Details’ are important and can (but not necessarily) differ pretty much, also the ‘# Definitions’ differs all the time since it defines the package name and version. The ‘# Top-level Rules’ are mostly the same except the MD5 sum which always differs and needs to be checked out via
This is not Core 142, and what you cloned is also not released ;-), this was the current next state of IPFire, so as i said, this could happen that the build don´t get through cause not all needed patches are included. I commented this line cause there was the error and i needed a complete build, MAKETUNING defines the ‘-j’ option in make → https://linux.die.net/man/1/make which specifies the number of jobs to run simultaneously and the system does have there a problem with.
Hi Jon,
did reported that on the dev mailinglist --> https://lists.ipfire.org/pipermail/development/2020-April/007326.html and Michael have had the reminder for this problem which appeared longer time ago. In that case it was a problem with the RAM, have here on my old system only 2GB (check the ‘MAX_PARALLELISM’ VAR). Since the conversation in the mailinglist is not complete, am not sure about this but i think it have something to do with the updates of the building system (the toolchain). If so, you would also have this problem even you try it with an older Core.
How is it with your system resources ?