GNOME Bugzilla – Bug 728243
do not override program_VERSION
Last modified: 2014-04-15 13:09:37 UTC
Created attachment 274338 [details] [review] set ${vc_variable}_VERSION as local Hi. Trying to build the latest gnome-common in jhbuild on OpenBSD fails with: checking for automake >= 1.9... testing automake... found 1.14.1 checking for autoreconf >= 2.53... testing autoreconf... found 2.69 /usr/local/bin/aclocal[35]: /usr/local/bin/aclocal-1.14.1: not found Checking for forbidden M4 macros... Processing ./configure.ac Running autoreconf... autoreconf-2.69: Entering directory `.' autoreconf-2.69: configure.ac: not using Gettext autoreconf-2.69: running: aclocal --output=aclocal.m4t /usr/local/bin/aclocal[35]: /usr/local/bin/aclocal-1.14.1: not found autoreconf-2.69: aclocal failed with exit status: 127 Now, on OpenBSD, autoconf, automake, aclocal and friends are wrappers that call the actual command according to AUTOMAKE_VERSION and AUTOCONF_VERSION. The naming is program-MAJOR.MINOR which allows us to install several auto* versions and pick the one we want. We do not install automake X.Y.Z as automake-X.Y.Z because we only want one version of automake X.Y (it makes sense to have several major versions installed, but not minor ones). e.g: $ automake --version | head -1 Provide an AUTOMAKE_VERSION environment variable, please $ AUTOMAKE_VERSION=1.14 automake --version | head -1 automake (GNU automake) 1.14.1 Now what happens with gnome-common is since this commit: b6f099488526288ad0ab1b2061304441df0b2466 we are checking the automake version against $REQUIRED_AUTOMAKE_VERSION by using the version_check() function. Unfortunately, this function leaks AUTOMAKE_VERSION to the environment by using an eval: eval ${vc_variable}_VERSION=$vc_actual_version which in our case transforms as: eval AUTOMAKE_VERSION=1.14.1 overriding our own provided AUTOMAKE_VERSION. This diff make ${vc_variable}_VERSION a local variable so that it does not go out of the function. Thoughts?
Comment on attachment 274338 [details] [review] set ${vc_variable}_VERSION as local Thanks for the patch, it looks fine to me.
Thanks David. Pushed as d213283.