After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634617 - use ACLOCAL_PATH
use ACLOCAL_PATH
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
: 590064 (view as bug list)
Depends on:
Blocks: 668706
 
 
Reported: 2010-11-11 18:31 UTC by Allison Karlitskaya (desrt)
Modified: 2015-02-01 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
config: set ACLOCAL_PATH (1.89 KB, patch)
2012-02-07 17:01 UTC, Allison Karlitskaya (desrt)
reviewed Details | Review
drop ACLOCAL_FLAGS support (3.93 KB, patch)
2012-02-07 17:01 UTC, Allison Karlitskaya (desrt)
none Details | Review
drop ACLOCAL_FLAGS support (4.73 KB, patch)
2012-02-07 17:07 UTC, Allison Karlitskaya (desrt)
none Details | Review
config: set ACLOCAL_PATH (1.95 KB, patch)
2012-02-13 18:33 UTC, Allison Karlitskaya (desrt)
committed Details | Review
autotools: finish killing off ACLOCAL_FLAGS (2.79 KB, patch)
2015-01-17 19:46 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2010-11-11 18:31:33 UTC
jhbuild sets ACLOCAL_FLAGS.  I'm not entirely sure why it does this.

If you set ACLOCAL='aclocal -I $prefix/share/aclocal' instead, then it will work automatically with autotools without having to add ACLOCAL_FLAGS awareness to all of our modules.
Comment 1 Allison Karlitskaya (desrt) 2010-11-11 19:09:03 UTC
At the same time, some packages specify that they want a specific version of automake (say, 1.9).

Imagine automake-1.11 is the one installed by default (ie: /usr/bin/automake, /usr/bin/aclocal, etc are 1.11).  You set ACLOCAL='aclocal -I /some/path' and try to run automake-1.9.  It will try to use /usr/bin/aclocal which is version 1.11.  That probably won't work.
Comment 2 Allison Karlitskaya (desrt) 2010-11-14 03:01:17 UTC
See http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00089.html
Comment 3 Björn Lindqvist 2010-11-17 15:01:14 UTC
jhbuild sets ACLOCAL_FLAGS in config.py when the build environment is entered. It sets the variable to the system-wide directory containing the .m4 files. When the ACLOCAL_FLAGS variable are not set, the system-wide directory is not seen by aclocal which causes strange errors. Such as:

configure.in:151: error: possibly undefined macro: AM_DISABLE_STATIC
configure.in:164: error: possibly undefined macro: AM_PROG_LIBTOOL

Older versions of jhbuild didnt automatically add the directory so you had to add addpath('ACLOCAL_FLAGS', '/usr/share/aclocal/') to .jhbuildrc. Now you don't, which imho is an improvement.
Comment 4 Craig Keogh 2010-12-06 00:49:28 UTC
How would you like to progress this bug? What problems can you see caused by ACLOCAL_FLAGS?
Comment 5 Allison Karlitskaya (desrt) 2010-12-06 05:50:10 UTC
I think the solution to this is to wait until automake-1.12 is out and switch to using ACLOCAL_PATH instead.
Comment 6 Allison Karlitskaya (desrt) 2012-01-22 00:54:28 UTC
I was poking through the automake NEWS file and it seems that ACLOCAL_PATH made it into last month's 1.11.2 release.  We should definitely be using that now instead of ACLOCAL_FLAGS.
Comment 7 Allison Karlitskaya (desrt) 2012-02-07 16:40:48 UTC
I spent the past couple of weeks pinging around.  automake 1.11.3 is now released and in Debian unstable, Fedora 17 and Ubuntu precise.  That means ACLOCAL_PATH will be available on the systems of the vast majority of people using jhbuild in the very near future.

I think it's time that jhbuild grew support for this...
Comment 8 Allison Karlitskaya (desrt) 2012-02-07 17:01:09 UTC
Created attachment 207000 [details] [review]
config: set ACLOCAL_PATH

automake 1.11.2 supports ACLOCAL_PATH.  This will eventually allow us to
drop our use of ACLOCAL_FLAGS (which causes us much awkwardness).

For now, we support both.
Comment 9 Allison Karlitskaya (desrt) 2012-02-07 17:01:12 UTC
Created attachment 207001 [details] [review]
drop ACLOCAL_FLAGS support

We now depend on ACLOCAL_PATH to work, giving us a de-facto dependency
on automake 1.11.2 or newer.
Comment 10 Allison Karlitskaya (desrt) 2012-02-07 17:07:19 UTC
Created attachment 207002 [details] [review]
drop ACLOCAL_FLAGS support

We now depend on ACLOCAL_PATH to work, giving us a de-facto dependency
on automake 1.11.2 or newer.
Comment 11 Colin Walters 2012-02-07 17:28:14 UTC
Review of attachment 207002 [details] [review]:

When we talked about this you said you were going to keep ACLOCAL_FLAGS.  I'd really prefer to wait a cycle before introducing a new bleeding edge dependency.  The main point of jhbuild for GNOME is so people can develop against released distributions.
Comment 12 Allison Karlitskaya (desrt) 2012-02-07 17:32:40 UTC
(In reply to comment #11)
> When we talked about this you said you were going to keep ACLOCAL_FLAGS.

I agree entirely.  That's why I did two separate patches -- one to apply now and one to hold off on until later.
Comment 13 Allison Karlitskaya (desrt) 2012-02-12 04:32:20 UTC
I think there is nothing preventing us from introducing the first patch at this point.
Comment 14 Colin Walters 2012-02-13 16:57:08 UTC
Review of attachment 207000 [details] [review]:

One minor comment, otherwise looks good.

::: jhbuild/commands/sanitycheck.py
@@ +28,3 @@
 def get_aclocal_path():
+    path = os.environ.get('ACLOCAL_PATH', '').split(':')
+    path.remove('') # in case ACLOCAL_PATH was empty

path = filter(lambda x: x != '', path)

is more robust against e.g. ACLOCAL_PATH=::foo which would have multiple ''
Comment 15 Frederic Peters 2012-02-13 17:12:21 UTC
filter and lambda are cool, but let's do list comprehensions.
Comment 16 Allison Karlitskaya (desrt) 2012-02-13 18:33:02 UTC
Created attachment 207476 [details] [review]
config: set ACLOCAL_PATH

automake 1.11.2 supports ACLOCAL_PATH.  This will eventually allow us to
drop our use of ACLOCAL_FLAGS (which causes us much awkwardness).

For now, we support both.


Updated patch to use a comprehension, as suggested.
Comment 17 Allison Karlitskaya (desrt) 2012-02-13 18:33:17 UTC
Comment on attachment 207476 [details] [review]
config: set ACLOCAL_PATH

Attachment 207476 [details] pushed as b89b1be - config: set ACLOCAL_PATH
Comment 18 Marc-Andre Lureau 2012-04-11 00:19:09 UTC
Is there any reason why ACLOCAL_PATH has less paths than ACLOCAL_FLAGS? More specifically, the system path /usr/share/aclocal and /usr/local/share/aclocal are missing.

Without those, autoreconf still fails, since jhbuild relies on system for things like libtool and friends.

There is a hack in jhbuild for autoreconf case, discussed in bug 590064. But that hack is incomplete, hence I reopened that bug. If we set ACLOCAL_PATH correctly though, and depend on newer automake, this will solves it.
Comment 19 Allison Karlitskaya (desrt) 2012-04-11 04:06:56 UTC
ACLOCAL_PATH is consulted in addition to the hard-coded system directories (like /usr/share/aclocal)
Comment 20 Marc-Andre Lureau 2012-04-11 07:32:59 UTC
(In reply to comment #19)
> ACLOCAL_PATH is consulted in addition to the hard-coded system directories
> (like /usr/share/aclocal)

where is it hardcoded? somewhere in aclocal? But if automake/aclocal is provided by jhbuild (not in /usr) and not libtool (thus in /usr), then it will fail to find it. Which is the problem with autoreconf in bug 590064
Comment 21 Allison Karlitskaya (desrt) 2012-04-11 15:30:34 UTC
That's a good point.  That's the basis of my suggestion for encouraging people to never run 'jhbuild bootstrap', and if we have them do so, to install all packages (ie: so that the m4 macros that we depend on are all installed into jhbuild's "system" aclocal dir)
Comment 22 Marc-Andre Lureau 2012-04-11 15:55:16 UTC
(In reply to comment #21)
> That's a good point.  That's the basis of my suggestion for encouraging people
> to never run 'jhbuild bootstrap', and if we have them do so, to install all
> packages (ie: so that the m4 macros that we depend on are all installed into
> jhbuild's "system" aclocal dir)

agreed, we can't really have the current situation where some of the bootstrap modules are installer. It is somehow ugly, and it causes headache. I would be also in favour of all (if really desired, manually) or nothing by default.
Comment 23 Craig Keogh 2012-04-12 01:43:42 UTC
(In reply to comment #22)

> agreed, we can't really have the current situation where some of the bootstrap
> modules are installer. It is somehow ugly, and it causes headache. I would be
> also in favour of all (if really desired, manually) or nothing by default.

That is bug 656818. I updated bug 656818's title from 'remove bootstrap' to 'make bootstrap all or nothing'.
Comment 24 Allison Karlitskaya (desrt) 2014-03-13 14:13:09 UTC
*** Bug 590064 has been marked as a duplicate of this bug. ***
Comment 25 Allison Karlitskaya (desrt) 2015-01-17 19:46:58 UTC
Created attachment 294751 [details] [review]
autotools: finish killing off ACLOCAL_FLAGS

The time has come...
Comment 26 Colin Walters 2015-01-18 15:42:51 UTC
When submitting patches like this, can you specify the level of testing you've done?

Basically at this point we're relying on automake-1.12 being universal?  FWIW build.gnome.org still uses jhbuild on RHEL6, but we're in the middle of upgrading the server to RHEL7, so I may stop caring about RHEL6 jhbuild myself.
Comment 27 Colin Walters 2015-01-18 15:43:23 UTC
(With RHEL6:

 walters@spinner:~$ cat /etc/redhat-release 
 Red Hat Enterprise Linux Server release 6.6 (Santiago)
 walters@spinner:~$ rpm -q automake
 automake-1.11.1-4.el6.noarch
)
Comment 28 Allison Karlitskaya (desrt) 2015-01-18 16:28:14 UTC
(In reply to comment #26)
> When submitting patches like this, can you specify the level of testing you've
> done?

I did a full rebuild of the default moduleset on Jessie.

I'm happy to hold off on this until you don't care about RHEL 6 anymore.
Comment 29 Allison Karlitskaya (desrt) 2015-02-01 11:28:32 UTC
Attachment 294751 [details] pushed as 62a9cd1 - autotools: finish killing off ACLOCAL_FLAGS