aboutsummaryrefslogtreecommitdiffstats
path: root/include/prereq-build.mk
Commit message (Collapse)AuthorAgeFilesLines
* build: prereq detect Python 3.10 for `python3` binaryPaul Spooren2021-10-101-2/+2
| | | | | | | | | | While the binary `python3.10` is correctly detected by the build system the default `python3` binary is currently not detected if pointing to a Python 3.10 installation. Fix this by extending the grep regex. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: fix `which` detection on Fedora & MacOSPaul Spooren2021-10-021-1/+3
| | | | | | | | | | | | Fix Fedora 34/35 issue where 'which' detection of 'which' wasn't working because Fedora use alias and proc Fixup of fca5ad55d2 prereq-build: fix `which` detection on Fedora Reported-by: Jani Partanen <rtfm@iki.fi> Suggest-by: Etienne Champetier <champetier.etienne@gmail.com> Tested-by: Georgi Valkov <gvalkov@abv.bg> Signed-off-by: Paul Spooren <mail@aparcar.org>
* prereq-build: revert "fix `which` detection on Fedora"Paul Spooren2021-09-301-1/+1
| | | | | | | | This reverts commit fca5ad55d292f8e481406123d0e95b3c85d39733. Causes problems on MacOS host systems. Signed-off-by: Paul Spooren <mail@aparcar.org>
* prereq-build: fix `which` detection on FedoraJani Partanen2021-09-301-1/+1
| | | | | | | | | Fix Fedora 34/35 issue where 'which' detection of 'which' wasn't working because Fedora use alias and proc Signed-off-by: Jani Partanen <rtfm@iki.fi> [fix commit subject and message] Signed-off-by: Paul Spooren <mail@aparcar.org>
* prereq-build: recognize Python 3.10Marcin Juszkiewicz2021-09-281-0/+2
| | | | | | | | Fedora 35 contains Python 3.10 as default version. Make use of it. Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> [fix commit subject] Signed-off-by: Paul Spooren <mail@aparcar.org>
* prereq-build: require python3-distutilsAndre Heider2021-08-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Debian and Ubuntu ship a python3-minimal package which does not include the distutils module. This is not supported by upstream and can be considered a broken python distribution. In practice, many scripts depend on said module, and this is a reoccuring pain point for building various OpenWrt packages. Require and check for said module, enough time has been wasted on this. A list of just the most recent issues: https://github.com/openwrt/packages/pull/16304 https://github.com/openwrt/packages/pull/16027 https://github.com/openwrt/packages/pull/15443 https://github.com/openwrt/packages/pull/14394 https://github.com/openwrt/packages/pull/12909 https://github.com/openwrt/packages/issues/12443 https://github.com/openwrt/packages/pull/11035 https://github.com/openwrt/packages/issues/10993 Signed-off-by: Andre Heider <a.heider@gmail.com>
* prereq-build: diff requirement to GNURosen Penev2021-06-121-3/+3
| | | | | | | tools/quilt requires GNU diffutils to compile. Failure can be simulated by installing Alpine Linux without diffutils. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* prereq-build: g++ formatting and consistency fixesKarl Palsson2021-05-231-2/+2
| | | | | | | | | | | | Remove \n that mangles output, and fix inconsistent version name check. Example before: Build dependency: Please install the GNU C++ Compiler (g++) 6 or later Build dependency: \nPlease reinstall the GNU C++ Compiler (4.8 or later) - it appears to be broken Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h) Signed-off-by: Karl Palsson <karlp@tweak.net.au>
* Extend checks on build prerequisites for building OpenWRT coreBas Mevissen2021-05-081-1/+12
| | | | | | | | | | | | | OpenWRT requires a number of Perl modules to be installed. It wasn't checking on all of them. This patch adds checks for Perl FindBin, File::Copy, File::Compare and Thread::Queue modules. Failing to install these, will have the build break at some point. By adding these to the prereq-build.mk script, they are checked on forehand. Tested on a Fedora 33 and 34 (beta) that was freshly installed. Fedora appears to break up Perl modules into small packages that need to be installed for the build to succeed. Signed-off-by: Bas Mevissen <abuse@basmevissen.nl>
* build: add GNU install to prerequisitesKevin Darbyshire-Bryant2021-03-241-0/+4
| | | | | | | | | | | | | | | | The recent removal of usbutils from core and replacement by hwdata in packages has exposed hwdata's requirement for certain GNU options on 'install' (-T) Other packages (sqm-scripts) have openwrt specific makefile sections to avoid GNU options but I suspect this is going to get harder in the future. Add GNU install as a prerequisite and link into $STAGING_DIR/host/etc/bin as per similar GNU utils This resolves an issue building under MacOS which would otherwise use a non-GNU options aware version of 'install' Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* build: prereq: drop support for Python 3.5Andre Heider2021-03-151-6/+4
| | | | | | | | | | | | | | | | | | | | The final Python 3.5 release was 3.5.10 in September 2020 [0]. This release series is now End-of-Life (EOL). The only LTS distribution that still only ships Python 3.5 is Ubuntu 16.04, which will be EOL in April 2021 [1]. The meson build system bumped their python requirement to 3.6 for the 0.57.0 release. This patch ensures that OpenWrt can update meson while still relying on the host python. [0] https://www.python.org/dev/peps/pep-0478/#id4 [1] https://ubuntu.com/about/release-cycle [2] https://mesonbuild.com/Release-notes-for-0-57-0.html#minimum-required-python-version-updated-to-36 Signed-off-by: Andre Heider <a.heider@gmail.com> [python3.6+ in README.md] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: add which command to build requirementsPetr Štetiar2021-03-031-0/+3
| | | | | | | | | | | | | | | | | | | `which` utility is not shipped by default for example on recent Arch Linux and then any steps relying on its presence fails, like for example following Python3 prereq build check: $ python3 --version Python 3.9.1 $ make /bin/sh: line 1: which: command not found ... Checking 'python3'... failed. So make `which` utility host build requirement. References: PR#3820 FS#3525 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: fix checks for GCC11Petr Štetiar2021-03-031-4/+4
| | | | | | | Fedora 34 already uses GCC11. Reported-by: Marcin Juszkiewicz <marcin-openwrt@juszkiewicz.com.pl> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: make GCC version 6+ minimal host build requirementPetr Štetiar2021-03-031-7/+7
| | | | | | | | Currently minimal GNU supported GCC version is 7 (from May 2, 2017), buildbots are using default GCC version 6 on Debian 9 (old stable), current Debian stable has GCC version 8.3.0. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build/prereq: require make 4.1 or laterPaul Spooren2021-02-151-2/+2
| | | | | | | | | | | | FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of stdout piping to a file. The issue describes how e.g. terminal color codes and up in log files if running make like `make > log.txt`. The proposed solution uses the make variable "MAKE_TERMOUT", which was introduced in make 4.1. All major distributions seem to updated to 4.1 or later, so this ideally dosen't break anything. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: use SPDX license tagsPaul Spooren2021-02-051-5/+2
| | | | | | | | | The license folder is a core part of OpenWrt and all GPL-2.0 licensed. Use SPDX license tags to allow machines to check licenses. Signed-off-by: Paul Spooren <mail@aparcar.org> [rebase, keep some Copyright lines, sharpen commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build/prereq: merge ifndef IB block togetherPaul Spooren2020-12-311-5/+1
| | | | | | | | | Multiple prereq checks are only required within the build system but not for the ImageBuilder. These checks are excluded by using ifndef IB. This commit merges the three ifndef IB blocks together. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: require rsyncStijn Tintel2020-12-071-0/+3
| | | | | | It seems to be required to build toolchain/kernel-headers. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* prereq-build: add python 3.9 supportRosen Penev2020-11-241-0/+2
| | | | | | Fixes unmet dependency issue. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* build: try to find getopt in macOS homebrew's standard locationFelix Fietkau2020-11-141-1/+2
| | | | | | It is not symlinked to /usr/local/bin by default Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build, imagebuilder: Do not require compilersSven Roederer2020-10-091-0/+4
| | | | | | | | | | | | | The buildroot and SDK both require the compilers (gcc, g++) to be installed on the host system, however the ImageBuilder uses precompiled binaries. This patch changes the prerequirements checks to skip the checking for the compilers if running as ImageBuilder. A similar change has been made for libncurses-dev in 4a1a58a3e2d2. Signed-off-by: Sven Roederer <devel-sven@geroedel.de> Acked-by: Paul Spooren <mail@aparcar.org>
* build: set up host command for egrepFelix Fietkau2020-08-061-0/+4
| | | | | | It is used for the kernel build and uses GNU specific features Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build, imagebuilder: Do not require libncurses-devPaul Spooren2020-06-031-0/+2
| | | | | | | | | | The buildroot and SDK both require `libncurses-dev` to be installed on the system, however the ImageBuilder uses precompiled binaries. This patch changes the prerequirements checks to skip the `libncurses-dev` part if running as ImageBuilder. Signed-off-by: Paul Spooren <mail@aparcar.org>
* prereq-build: test for perl's Data::DumperRosen Penev2020-06-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | Required for installation of autoconf: make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69' Making all in bin make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin' autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg' ../bin/autom4te -B '..'/lib -B '..'/lib --language M4sh --cache '' --melt ./autoconf.as -o autoconf.in Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ../lib/Autom4te/C4che.pm line 33. BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33. Compilation failed in require at ../bin/autom4te line 40. BEGIN failed--compilation aborted at ../bin/autom4te line 40. make[6]: *** [autoconf.in] Error 2 Signed-off-by: Rosen Penev <rosenp@gmail.com>
* build: prereq: change minimum make version to 3.82Kevin Darbyshire-Bryant2020-04-291-2/+2
| | | | | | | undefine was added in make 3.82 which is now some 10 years ago, some make scripts are beginning to use 'undefine' Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* build: prereq: tidy gcc version checksKevin Darbyshire-Bryant2020-03-241-16/+0
| | | | | | | | | | | | | | | | | There is a restriction in the number of parameters(10) that may be passed to the SetupHostCommand macro so continually adding explicit gcc'n' version checks ends up breaking the compiler check for the later versions and oddballs like Darwin as was done in 835d1c68a0 which added gcc10. Drop all the explicitly specified gcc version checks. If a suitable gcc compiler is not found, it may be specified at the dependency checking stage after which that version will be symlinked into the build staging host directory. eg. 'CC=gccfoo CXX=g++foo make prereq' Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Acked-by: Jo-Philipp Wich <jo@mein.io>
* build: add GCC 10 version detectionRobert Marko2020-03-231-4/+6
| | | | | | | Lets add GCC 10 detection to the build system as distributions like Fedora 32 have started shipping with it. Some tools like mtd-utils need work to compile under GCC10, but that will be next step. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* build: simplify gnu-getopt searchKevin Darbyshire-Bryant2020-03-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getopt is the only command where /usr/local/bin is specified explicitly. All other commands are assumed to exist in the PATH in one form or another. Remove this exception and require gnugetopt/getopt to be in the user's PATH. In the case of macos Homebrew, getopt is 'keg only' hence not linked into /usr/local/bin whilst other commands are linked and likely found by virtue of /usr/local/bin being in PATH. Since 2019 Homebrew is very reluctant to install links that have potential to override default OS behaviour, eg: following instructions on our current 'how to build on macos' wiki page: $ brew ln gnu-getopt --force Warning: Refusing to link macOS-provided software: gnu-getopt If you need to have gnu-getopt first in your PATH run: echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.zshrc A better option for macos is to link getopt as 'gnugetopt' in /usr/local/bin, thus the build system will find 'gnugetopt' but other applications looking for just 'getopt' will find the original macos binary. Ultimately it makes sense that 'GNU' dependencies are placed in /usr/local/bin and /usr/local/bin is included in the user's PATH. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* build: add xargs as prerequisiteKevin Darbyshire-Bryant2020-02-291-0/+5
| | | | | | | | | | | | | Build system needs an 'xargs' that supports '-r' which darwin doesn't. Homebrew installs a 'gxargs' with the findutils package so look for 'gxargs' as well as 'xargs' This is a bit of a 'fun' corner case anyway. xargs is only required by the build if 'CONFIG_AUTOREMOVE' is set and after the build system has built 'tools/findutils' we have a fully working xargs for host anyway. Until that time we have to rely on the host's xargs implementation. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* build: prereq: add support for Python 3.8Thomas Weißschuh2019-11-141-0/+2
| | | | | | | | Add support for Python 3.8 which was released Oct. 14, 2019. Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de> [added missing commit description, simplified version check] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: prereq: simplify Python 3 version checksPetr Štetiar2019-11-141-6/+6
| | | | | | We don't need to check if python3.5 binary is actually Python 3.5+. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: fix seq host tool checkJo-Philipp Wich2019-10-181-2/+2
| | | | | | | | | | Problem found on alpine linux when trying to `./scripts/feeds update -a`, which results in `Build dependency: Missing seq command`. Ref: https://github.com/openwrt/openwrt/pull/1926 Suggested-by: imShara <shara@protonmail.com> [reworded commit and turned faulty Sob into Suggested-by] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: adjust gcc/g++ version checks for newer apple compilersFelix Fietkau2019-10-101-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: cleanup possibly dangling Python 2 host symlinkPetr Štetiar2019-07-261-0/+2
| | | | | | | | | | | | When bumping buildroot to Python 3, we need to assure, that Python symlink in staging bin directory points to Python >= 3.5 as well. We can't rely completly just on SetupHostCommand as its executed only in cases when the $(STAGING_DIR_HOST)/bin/python doesn't already exist, so we need to remove it before running SetupHostCommand. Acked-by: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: switch to Python 3Petr Štetiar2019-07-261-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch switches Python used in buildroot to Python 3 as Python 2.x series is going to be EOL relatively soon[1]. "Being the last of the Python 2.x series, 2.7 will have an extended period of maintenance. Specifically, 2.7 will receive bugfix support until January 1, 2020. After the last release, 2.7 will receive no support." It seems like Python 3 is going to be needed in order to support Meson build system which has gained some traction recently. Build tested on following targets: ath79/generic imx6/generic ipq40xx/generic lantiq/xway layerscape/armv7 (broken) layerscape/armv8_32b (broken) layerscape/armv8_64b (broken) mvebu/cortexa72 ramips/mt7621 ramips/mt7620 sunxi/cortexa7 x86/64 Layerscape targets are unfortunately left broken as their ls-rcw firmware package uses Python 2 and converting it to Python 3 would take more then reasoanble amount of time (I've tried to fix it already) and would be better fixed by someone who can even run test it. Run tested on ath79 (Archer C7 v5), ipq40xx (nbg6617) and x86_64 (QEMU and apu2). 1. https://www.python.org/dev/peps/pep-0373/ Ref: PR#1937 Cc: Yangbo Lu <yangbo.lu@nxp.com> Cc: Mathew McBride <matt@traverse.com.au> Acked-by: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: fix umask detection bashismThorsten Glaser2019-01-301-1/+1
| | | | | | the leading 0 is optional and not emitted by some shells Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
* build: remove GNU time dependencyJo-Philipp Wich2018-08-051-5/+0
| | | | | | | | | | Replace the GNU time program invocation with a simple Perl script reporting the timing values. Since we require Perl anyway for the build system, we can as well use that instead of requiring a random GNU utility rarely installed by default. Fixes: ff6e62b288 ("build: log time taken by each packages/steps") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: prereq-build.mk: fix gcc/g++ SetupHostCommand invocationJo-Philipp Wich2018-07-241-2/+2
| | | | | | | A missing comma caused the first command option to be considered part of the error message. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* include/prereq-build.mk: explicitly check for -f flag when using busybox timeMatthias Schiffer2018-07-141-2/+2
| | | | | | | On Debian, busybox does have a time applet, but it does not support the -f flag. Catch this in prereq check to give users to proper error message. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: add busybox support to `time` prereq-checkAndy Boyett2018-06-181-2/+3
| | | | | | | | | | | | | | Busybox time supports the GNU time '-f' syntax used by the build time logging implemented in ff6e62b288c, however the prerequisite check added only works with GNU time installed as `time` or `gtime`. As busybox is a multicall binary, the name of the symlink setup by SetupHostCommand also must be changed from `gtime` to `time` to fix the value of argv[0]. This causes a number of shells (including bash) to use their builtin impelementation of time, so the sole invocation has been changed to use `env time` to use the value found on the $PATH. Signed-off-by: Andy Boyett <agb@agb.io>
* build: log time taken by each packages/stepsEtienne Champetier2018-05-071-0/+4
| | | | | | | | | | The idea is to easily get the list of packages taking the most time to build, and see if we can improve them v1: Use SetupHostCommand as recommended by John v2: add space after 'time:', remove useless /usr/bin/time from SetupHostCommand Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* tools/zlib: move zlib build to toolsHauke Mehrtens2018-04-281-5/+0
| | | | | | | | | | | | | This allows us to link the other tools against our libz and we do not need the system zlib any more. Only the static linked library is copied to the staging directory so we have a statically linked library on all systems and not only on Linux. This also adds the new dependencies of the packages which are depending on zlib. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* build: Improve GCC version detectionHauke Mehrtens2018-04-031-4/+8
| | | | | | | | | | This now makes sure that the beginning of the version number gets checked and "4.4.5" will not match was a supported version. GCC 8 and GCC 9 are now marked as supported, but we probably have to fix some problems for them. Closes: FS#1433 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* merge: etc: update remaining filesZoltan HERPAI2017-12-081-1/+1
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* build: accept gcc/g++ without minor versionJustin Kilpatrick2017-11-261-4/+4
| | | | | | | | | | | | | | | | | | | | | Build dependency: Please install the GNU C Compiler (gcc) 4.8 or later cc -dumpversion | grep -E '(4\.[8-9]|5\.[0-9]|6\.[0-9]|7\.[0-9])' Build dependency: Please install the GNU C++ Compiler (g++) 4.8 or later g++ -dumpversion | grep -E '(4\.[8-9]|5\.[0-9]|6\.[0-9]|7\.[0-9])' Prerequisite check failed. Use FORCE=1 to override. On my Fedora 26 machine gcc and g++ -dumpversion returns a whole number '7' failing the regex introduced in commit: b78de6207f6fc1a9db857942cb89f9fcf730a240 This change makes minor versions optional in the build dependency regex for gcc and g++ whenever any minor version would be accepted and the whole number version is sufficient as a dependency check. For versions 4.* a minor version is still required. Signed-off-by: Justin Kilpatrick <jkilpatr@redhat.com>
* toolchain: Test for supported versions of GCCDaniel Engberg2017-11-251-14/+18
| | | | | | | | Only test for supported versions of GCC The version bump requirement for GCC is because gdb doesn't build with older versions. Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* build: fix high cpu usage / hang in prereq-build.mkFelix Fietkau2017-03-181-1/+0
| | | | | | host-build.mk should not be included for prereq Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: get rid of host.mkFelix Fietkau2017-02-261-4/+3
| | | | | | Defined required host related variables in toplevel.mk instead Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: use mkhash to replace various quirky md5sum/openssl callsFelix Fietkau2017-01-051-5/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add a small standalone utility for calculating md5/sha256 hashFelix Fietkau2017-01-051-0/+6
| | | | | | | | This will be used to simplify the build system code for checking hashes. Instead of using various variants of md5sum / openssl, use one simple utility for all of them Signed-off-by: Felix Fietkau <nbd@nbd.name>