GNU bug report logs - #14685
aclocal and AC_CONFIG_MACRO_DIR

Previous Next

Package: automake;

Reported by: Werner LEMBERG <wl <at> gnu.org>

Date: Fri, 21 Jun 2013 20:21:02 UTC

Severity: minor

To reply to this bug, email your comments to 14685 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#14685; Package automake. (Fri, 21 Jun 2013 20:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Werner LEMBERG <wl <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 21 Jun 2013 20:21:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Werner LEMBERG <wl <at> gnu.org>
To: bug-automake <at> gnu.org
Subject: aclocal and AC_CONFIG_MACRO_DIR
Date: Fri, 21 Jun 2013 22:19:43 +0200 (CEST)
[Message part 1 (text/plain, inline)]
[automake 1.14]

[erroneously sent to the `automake' list]

It seems that there are problems if AC_CONFIG_MACRO_DIR contains more
than a single directory.  Calling

  aclocal -I gnulib/m4 --force -I m4

within the attached bundle causes

  aclocal: error: couldn't open directory 'gnulib/m4 m4':
                  No such file or directory

If I comment out the lines

  AC_CONFIG_MACRO_DIR([gnulib/m4
                       m4])

in `configure.ac' the call succeeds.


    Werner


PS: Sorry for not sending a minimum example, but I don't have enough
    time to work on that.
[aclocal-problem.tar.xz (application/octet-stream, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#14685; Package automake. (Sat, 22 Jun 2013 06:57:05 GMT) Full text and rfc822 format available.

Message #8 received at 14685 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Werner LEMBERG <wl <at> gnu.org>
Cc: 14685 <at> debbugs.gnu.org
Subject: Re: bug#14685: aclocal and AC_CONFIG_MACRO_DIR
Date: Sat, 22 Jun 2013 08:55:59 +0200
severity 14685 minor
thanks

On 06/21/2013 10:19 PM, Werner LEMBERG wrote:
> 
> [automake 1.14]
> 
> [erroneously sent to the `automake' list]
> 
> It seems that there are problems if AC_CONFIG_MACRO_DIR contains more
> than a single directory.
>
That's because AC_CONFIG_MACRO_DIR (provided by Autoconf) is only
meant to accept one directory as its argument.  For two or more dirs,
you should use AC_CONFIG_MACRO_DIRS instead (which BTW also works
if only one dir is given, so I'd suggest you to unconditionally
prefer it over AC_CONFIG_MACRO_DIR).  But that said, ...

>  Calling
> 
>   aclocal -I gnulib/m4 --force -I m4
> 
> within the attached bundle causes
> 
>   aclocal: error: couldn't open directory 'gnulib/m4 m4':
>                   No such file or directory
>
... I see this error message is definitely unclear; it could be
improved to suggest you to use AC_CONFIG_MACRO_DIRS whenever you
have to or more m4 directories.  So I'm not closing this bug report,
either until such an improved error message is implemented (as
usual, patches are very welcome), or until someone proves me that
my proposed change would be a bad idea.

> If I comment out the lines
> 
>   AC_CONFIG_MACRO_DIR([gnulib/m4
>                        m4])
> 
> in `configure.ac' the call succeeds.
> 
> 
>     Werner
> 
> 
> PS: Sorry for not sending a minimum example, but I don't have enough
>     time to work on that.
> 
Not to worry, the issue is crystal-clear to us even without an
example (minimal or otherwise).

Thank you,
  Stefano




Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 22 Jun 2013 06:57:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14685; Package automake. (Sat, 22 Jun 2013 07:46:01 GMT) Full text and rfc822 format available.

Message #13 received at 14685 <at> debbugs.gnu.org (full text, mbox):

From: Werner LEMBERG <wl <at> gnu.org>
To: stefano.lattarini <at> gmail.com
Cc: 14685 <at> debbugs.gnu.org
Subject: Re: bug#14685: aclocal and AC_CONFIG_MACRO_DIR
Date: Sat, 22 Jun 2013 09:44:45 +0200 (CEST)
> That's because AC_CONFIG_MACRO_DIR (provided by Autoconf) is only
> meant to accept one directory as its argument.  For two or more
> dirs, you should use AC_CONFIG_MACRO_DIRS instead (which BTW also
> works if only one dir is given, so I'd suggest you to
> unconditionally prefer it over AC_CONFIG_MACRO_DIR).

Well, AC_CONFIG_MACRO_DIRS is not in autoconf 2.69, and 2.70 is not
released yet...  Ideally, automake provides this until 2.70 is out :-)

>>   aclocal: error: couldn't open directory 'gnulib/m4 m4':
>>                   No such file or directory
>>
> ... I see this error message is definitely unclear;

I don't think so, the error message is just fine if the background is
known.  However, I think it's a bad idea to make it a fatal error.  A
warning is fully sufficient IMHO.

> it could be improved to suggest you to use AC_CONFIG_MACRO_DIRS
> whenever you have to or more m4 directories.

Yes.  If opening a directory fails, and the directory name contains a
space, tell the user that AC_CONFIG_MACRO_DIR accepts one directory
only.  And if AC_CONFIG_MACRO_DIRS is available, suggest to use this
macro instead.


    Werner

Information forwarded to bug-automake <at> gnu.org:
bug#14685; Package automake. (Sat, 22 Jun 2013 08:06:02 GMT) Full text and rfc822 format available.

Message #16 received at 14685 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Werner LEMBERG <wl <at> gnu.org>
Cc: 14685 <at> debbugs.gnu.org
Subject: Re: bug#14685: aclocal and AC_CONFIG_MACRO_DIR
Date: Sat, 22 Jun 2013 10:05:06 +0200
On 06/22/2013 09:44 AM, Werner LEMBERG wrote:
> 
>> That's because AC_CONFIG_MACRO_DIR (provided by Autoconf) is only
>> meant to accept one directory as its argument.  For two or more
>> dirs, you should use AC_CONFIG_MACRO_DIRS instead (which BTW also
>> works if only one dir is given, so I'd suggest you to
>> unconditionally prefer it over AC_CONFIG_MACRO_DIR).
> 
> Well, AC_CONFIG_MACRO_DIRS is not in autoconf 2.69, and 2.70 is not
> released yet...  Ideally, automake provides this until 2.70 is out :-)
>
It does ;-)  Since Automake 1.13 in fact (barring unseen bugs).

>>>   aclocal: error: couldn't open directory 'gnulib/m4 m4':
>>>                   No such file or directory
>>>
>> ... I see this error message is definitely unclear;
> 
> I don't think so, the error message is just fine if the background is
> known.  However, I think it's a bad idea to make it a fatal error.  A
> warning is fully sufficient IMHO.
>
I disagree.  We definitely want to catch a potential user typo with
a hard error, rather than an easy to miss warning.

>> it could be improved to suggest you to use AC_CONFIG_MACRO_DIRS
>> whenever you have to or more m4 directories.
> 
> Yes.  If opening a directory fails, and the directory name contains a
> space, tell the user that AC_CONFIG_MACRO_DIR accepts one directory
> only.
>
Sine we never really supported directories with spaces in them (not in
AC_CONFIG_MACRO_DIR, nor in AC_CONFIG_AUX_DIR, nor in SUBDIRS, nor in
AC_CONFIG_FILES -- nowhere, basically), I'd rather raise the error
message whenever a whitespace is present in the AC_CONFIG_MACRO_DIR
argument, without checking for its existence.

> And if AC_CONFIG_MACRO_DIRS is available, suggest to use this
> macro instead.
>
Once you use Automake 1.13, that macro should be made automatically
available.  If you've find out a situation where that's not the case,
you've just found another Automake bug (in which case, please report
it separately).

Thanks,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#14685; Package automake. (Sat, 22 Jun 2013 10:35:02 GMT) Full text and rfc822 format available.

Message #19 received at 14685 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Diego Elio Pettenò <flameeyes <at> flameeyes.eu>
Cc: 14685 <at> debbugs.gnu.org, Werner LEMBERG <wl <at> gnu.org>
Subject: Re: aclocal and AC_CONFIG_MACRO_DIR
Date: Sat, 22 Jun 2013 12:34:48 +0200
Hi Diego, thanks for chiming in.

On 06/22/2013 12:19 PM, Diego Elio Pettenò wrote:
> Hi Werner,
> 
> AC_CONFIG_MACRO_DIR expects a single directory (it's used by among other
> libtool to put its m4 files).
> 
> AC_CONFIG_MACRO_DIRS is the one you want to use (plural form).
> 
> HTH
> 
I think you've missed the second part of my conversation with
Werner...  Reference:

  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14685>

Oh, but I see that's because Werner's report has been sent to both
the automake and bug-automake lists, causing some confusion.  Well,
now that I've added the above link the dicussion on the bug tracker,
the confusion should be cleared, and the situation for potential
thread-diggers from the feature should be improved :-)

So, let's continue the discussion on the bug tracker only from now
on, OK?

Thanks,
  Stefano




This bug report was last modified 11 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.