aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/autotools.bbclass
AgeCommit message (Collapse)Author
2016-10-11classes/externalsrc: re-run do_configure when configure files changePaul Eggleton
If the user modifies files such as CMakeLists.txt in the case of cmake, we want do_configure to re-run so that those changes can take effect. In order to accomplish that, have a variable CONFIGURE_FILES which specifies a list of files that will be put into do_configure's checksum (either full paths, or just filenames which will be searched for in the entire source tree). CONFIGURE_FILES then just needs to be set appropriately depending on what do_configure is doing; for now I've set this for autotools and cmake which are the most common cases. Fixes [YOCTO #7617]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-27autotools.bbclass: use python3 instead of python (v2)Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22autotools/siteinfo: Tweak CONFIG_SITE handling for determism/racesRichard Purdie
As things stand there are multiple races in the CONFIG_SITE handling where checksums can change depending on whether site directories exist or not when parsing happens. This is bad. Secondly, there is a build race that occurs if you build virtuals in parallel with the "main" recipe, since the main recipe is parsed when the virtual is (since it sets variables like BBCLASSEXTEND) and with the current code, it may look for files and directories which could be created/destroyed which the loop is executing. This is also bad. The aclocal-copy directory should only ever be accessed by the call from autotools.bbclass. This changes the parameter name to make it clear and ensures all callers have the right usage, neatly avoiding all the problems above. Also added better comments. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14autotools: Correctly filter m4 files view to setscene dependenciesRichard Purdie
Currently when you run builds from sstate, you can see warnings like: WARNING: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_configure: /data/poky-master/tmp-glibc/sstate-control/manifest-intel-corei7-64-glibc-initial.populate_sysroot not found WARNING: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_configure: /data/poky-master/tmp-glibc/sstate-control/manifest-intel-corei7-64-libgcc-initial.populate_sysroot not found This is due to co_configure wanting to copy a limited number of m4 macros, only listed in a recipes DEPENDS but that set is still larger than the set of recipes which get restored from sstate. For build determinism and to avoid these warnings, we need to make this function match what the sstate code does. We really don't want to duplicate the functionality since keeping things in sync would be hard so we create a data structure which can be passed into the same underlying function, setscene_depvalid(). [YOCTO #10030] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03autotools.bbclass: remove EXTRA_OEMAKE workaroundStefan Müller-Klieser
The default of EXTRA_OEMAKE is already empty since commit: OE-Core rev: aeb653861a0ec39ea7a014c0622980edcbf653fa bitbake.conf: Remove unhelpful default value for EXTRA_OEMAKE Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03base, autotools: Append PACKAGECONFIG_CONFARGS to EXTRA_OECONF only in ↵Martin Jansa
autotools.bbclass * recipes which don't inherit autotools or cmake bbclass and want to use the configure options from PACKAGECONFIG need to handle PACKAGECONFIG_CONFARGS themselves. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-07autotools.bbclass: remove intltool.m4 from ${S}Ross Burton
We need to ensure that builds use our intltool.m4 as there is a bug in upstream's macros when the host doesn't have XML::Parser installed. So generalise the m4 pruning logic that we already have from gettext and add intltool.m4. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-07autotools: move aclocal-copy to WORKDIRRoss Burton
To save time move the temporary copy of the autoconf macros, aclocal-copy, from ${B} to ${WORKDIR}. This ensures that it can't conflict with anything in ${S} and means the pruning code doesn't need to know about it. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23autotools: ensure Makefile exists in do_compileRoss Burton
If a recipe is using the autotools class then presumably it is using Makefiles. However the default do_compile() is forgiving and silently handles a missing makefile, which means that if a recipe is using a hand-coded static Makefile (e.g. git) but doesn't use brokensep the recipe will fail in do_install. To make debugging this easier, override do_compile in autotools so that it fails if a Makefile isn't present. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-05-14autotools.bbclass: fix py3 SyntaxError in cfgscript print()Tim Orling
Update so this works with python3. Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06autotools: add default for CACHED_CONFIGUREVARSRoss Burton
Ensure that this variable has a default value so that we don't get debug messages that the variable couldn't be expanded. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29autotools: warn when running intltoolize if intltool isn't a dependemcyRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-13autotools: Fix interaction with bitbake -bRichard Purdie
If you run bitbake -b on something using autotools with dependencies on m4 files, it currently fails as the TASKDEPDATA is incomplete for bitbake -b and this means the relevant macros aren't found. Work around this by adding *all* m4 files for the -b case (and show a warning). [YOCTO #8890] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-13autotools: Correct dependency search logic errorRichard Purdie
We go to the effort of finding the value of start, we should then use it rather than relying on the value of dep being preserved from the previous loop. Took me far too long to notice this issue when changing the code. Also drop an unused variable. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-31Make sure that the directory for CONFIGURESTAMPFILE existsMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-31autotools.bbclass: use oe_runmake instead of ${MAKE}Markus Lehtonen
Use oe_runmake like in base.bbclass so that EXTRA_OEMAKE will be respected. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-29autotools.bbclass: don't create subshell to delete configure scriptsAndre McCurdy
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-22autotools: don't output the full config.log on configure failureRoss Burton
The config.log written by autoconf includes many pages of useless output, followed by an obfuscated error message, and then more pages of every variable that's been set. It's only understandable if you're well versed in how autoconf behaves, and often in simple failure modes doesn't actually make it clear what the problem was. Instead of outputting the whole config.log to the console when do_configure() fails, use bbfatal_log so the human-readable configure output (not the config.log) is shown to the user, and tell the user where config.log can be found if they need it. [ YOCTO #8856 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-16autotools.bbclass: use relative path to run configure scriptRobert Yang
The absolute path (/path/to/configure) caused VPATH in Makefile to be an absolute path, and then it will be in elf files, use relative path to run configure can fix the problem. This will reduce a lot of buildpaths QA issues in a world buld. [YOCTO #8894] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-11-24autotools: Allow recipe-individual configure scriptsJens Rehsack
OpenJDK-8 has it's configure script at common/autotools - which will cause the entire assumption of ${S}/configure is regenerated by autoreconf, intltoolize or alike fails heavily. Also - other configure mechanisms can be supported more similar (see how pkgsrc manages different ones ...) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-21autotools: fix traversal bug in aclocal copyingChristopher Larson
The logic is supposed to avoid following dependencies when we depend on a target recipe which depends on a native recipe. The problem is, we were marking the dep (the native recipe) as already processed when we avoided traversal, meaning that even when that recipe would be pulled in via a different dependency, we skipped it there too, and whether it was skipped entirely depended on the non-deterministic dep processing order. If the first one to be encountered was via the indirect target dep, it wouldn't end up in configuredeps, otherwise it would. As we want to avoid traversing that particular dependency relationship, not *every* dependency on the native, we should continue, but not add it to done, so it can be traversed from other avenues. This fixes an intermittent bug in some of my non-GPLv3 builds, where one dependency upon gettext-minimal-native was skipped, but others should not have been, resulting in it being removed from configuredeps entirely, and no gettext macros being available. Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-16autotools.bbclass: mkdir ${B} -> mkdir -p ${B}Robert Yang
${B} is the default cwd of tasks, so there might be race issues such as: | mkdir: cannot create directory `${B}': File exists [snip] NOTE: recipe perf-1.0-r9: task do_configure: Failed Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30autotools.bbclass: Allow dependency tracking option to be overriddenRoy Li
CONFIGUREOPT_DEPTRACK can not be overridden since it is set by = Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16Use die() or bbfatal_log() where the log should definitely be printedPaul Eggleton
Change calls to bbfatal() to either die() or bbfatal_log() where we know we want the full log to be printed by the UI (calling bberror or bbfatal would otherwise suppress it since the change to connect these functions through to the UI.) bbfatal() is still fine to use where there is enough context information in the message such that the log isn't needed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-25autotools: Use space with prepend to clean up variable whitespaceRichard Purdie
Correct the whitespace in this variable to make this more readable when debugging, no functional change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-29autotools: Fix find races on source directoryRichard Purdie
In a similar way to http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=aa1438b56f30515f9c31b306decef7f562dda81f there are more find races in the autotools class. For recipes with PACKAGES_remove = "${PN}", the find which removes .la files can race against deletion of other directories in WORKDIR e.g.: find: '/home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/sstate-build-populate_lic': No such file or directory | WARNING: /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/temp/run.do_configure.6558:1 exit 1 from | find /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7 -name \*.la -delete Fix the remaining races in the same way. [YOCTO #7522] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-29autotools: Avoid find race for S = "${WORKDIR}"Richard Purdie
For recipes with PACKAGES_remove = "${PN}", the find which removes .la files can race against deletion of other directories in WORKDIR e.g.: find: '/home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/sstate-build-populate_lic': No such file or directory | WARNING: /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/temp/run.do_configure.6558:1 exit 1 from | find /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7 -name \*.la -delete The simplest fix is to add the find option which ignores these kind of races. [YOCTO #7522] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-13autotools/siteinfo: Avoid races over siteinfo filesRichard Purdie
If a siteinfo enabled tasks re-executes at the wrong moment whilst something else is in do_configure, the _config files can be removed which upsets autoconf and causes build failures. Use the same approach as we do for dealing with the aclocal files. We already parse the manifests so look out any *_config files and if so, copy them, then reference the copy from siteinfo instead. This has the advantage of also being more deterministic. [YOCTO #7101] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16autotools.bbclass: print make cleanRobert Yang
It makes us easier to see make clean failed. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2014-12-05autotools.bbclass: respect CLEANBROKENRoss Burton
autotools.bbclass should respect CLEANBROKEN as it invokes 'make clean' on configure. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-10-30autotools: Use make clean for builds not supporting B != SRichard Purdie
If the build doesn't support B != S, we can try running "make clean" instead to try and clean up previous objects if the hash for the task has changed. This tries to ensure that when variables like ${baselib} change, the changes are correctly accounted for. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23classes/autotools: avoid error if recipe is first in task dependency treePaul Eggleton
If the recipe being built is listed first in BB_TASKDEPDATA (i.e. item 0) this is still valid and should not trigger an error. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-04autotools: Exclude SDK_OS from autotools task signaturesRichard Purdie
The change to handle SDKs of different types resulted in the signatures becoming SDK specific which wasn't intended. Exclude the variable from the hash values to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-03autotools: Fix warning for odctools-crosssdkRichard Purdie
odcctools-crosssdk doesn't use the suffixed naming the rest of crosssdk does and this results in a annoying build warning. Avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-03sstate: Allow switching between linux and non-linux SDK builds within the ↵Richard Purdie
same tmpdir Currently if you try and switch between linux/darwin/mingw SDK builds in the same TMPDIR, things break. This is due to sstate not reflecting the SDK_OS in the manifest names. Since they are different, reflect this in the manifest naming and allow this to work. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25autotools: Improve configure dependency code for finding m4 filesRichard Purdie
We have an open bug about the warnings issues in builds from an sstate cache when something like glib-2.0 gets rebuilt. The issue is that sstate is "clever" and prunes unneeded dependencies out the tree. For example is X depends on pkgconfig-native but we've already build X and installed it from sstate, it will not get installed when you build Y which depends on X. This patch changes the logic to match the sstate behaviour and prune out unnecessary dependencies from the scope of aclocal. This in turn removes the warning about missing manifest files. The issue is that this patch exposes holes in our DEPENDS in recipes, specifically that some native tools are not listed, specifically, and problematically, pkgconfig, gtk-doc and intltool-native in particular. I've sent out patches against OE-Core that address the bulk of the issues there however I'm conscious this is probably going to a bug issue in other layers and may be too annoying to consider at this point. The other alternative is simply to turn the warning into a debug statement. I appreciate the code below has commented blocks, this is simply debug I've left around for now. It will be cleaned from any final version. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25autotools.bbclass: Enhance sed regexp to avoid extra subshellMatthieu Crapet
head -n1 can be done using sed. Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03autotools.bbclass: remove autotools_set_crosscompilingRoss Burton
The only reference to this function is a commented-out assignment, and nothing in oe-core nor meta-oe uses autotools_set_crosscompiling directly. As it's unused, remove it. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30binutils/gcc/gdb: Add TARGET_ARCH to PN for all cross recipesRichard Purdie
This allows them to co-exist together in the native sysroot, with one set of cross tools per target architecture. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23autotools: Enable separate builddir by defaultRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-18autotools: Exclude variables from autotools_copy_aclocalsRichard Purdie
The autotools aclocal copy function should not depend on various variables, these are accounted for in other parts of the system. Therefore exclude them. This was causing differences in sstate checksums between different systems and meaning the sstate cache wasn't being reused as much as it should. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05alsa-tools/autotools: Ensure that aclocal files can be present with ↵Richard Purdie
AUTOTOOLS_COPYACLOCAL variable Introduce a AUTOTOOLS_COPYACLOCAL variable which forces the copy of the aclocal files even when a configure.ac/.in file isn't present. Use this new feature in alsa-tools. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05autotools: Limit aclocal files to those in dependenciesRichard Purdie
We still occasionally see race issues with cp-noerror, and it copies too many files, we should limit the the m4 files to those explicitly in the DEPENDS for the recipe. This change takes advantage of the BB_TASKDEPDATA data from bitbake to only copy in those files listed in the manifest of the recipes in DEPENDS. I've had this testing locally for some time, its ready for wider review/testing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17autotools: Remove .la files if rebuilding non out of tree softwareRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27autotools.bbclass: force copy Makefile.in.in to ${S}/po/Roy.Li
If a Makefile.in.in has existed under ${S}/po/ and is read-only, cp will fail. Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-04autotools.bbclass: Factor out aclocal copying functionRichard Purdie
Some recipes may need to manually call the aclocal copying functionality so factor this out into a function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01autotools.bbclass: add EXTRACONFFUNCS variableConstantin Musca
- add EXTRACONFFUNCS variable in order to make it possible to inject tasks after autotools_preconfigure (From OE-Core rev: eafaeee58ab7a8f0613f54b8411f41ccefdf94c3) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14autotools: copy also remove-potcdate.sin from ↵Martin Jansa
${STAGING_DATADIR_NATIVE}/gettext/po * some packages (e.g. uptime, cpu, forecasts, news from meta-efl) don't have remove-potcdate.sin in po subdirectory, but Makefile.in.in supplied by autotools.bbclass depends on it and fails without like this: | make[3]: Entering directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po' | make[3]: *** No rule to make target `remove-potcdate.sin', needed by `remove-potcdate.sed'. Stop. | make[3]: Leaving directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po' | make[2]: *** [uptime.pot] Error 2 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-11-12autotools: set _FOR_BUILD variables hereRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>