Quantcast

autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

Ilker R Capoglu
Hi everyone,

I couldn't be sure whether this was a bug or my own doing (which is more
probable), so I decided to post here.

When I have both LT_INIT and AC_SUBST macros inside my "configure.ac",
autoreconf fails:
 $ autoreconf -vif
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
Use of uninitialized value $msg in concatenation (.) or string at
/usr/bin/autom4te line 1038.
unknown channel m4trarn_allow(^am__EXEEXT_FALSE$)
m4tra at /usr/share/autoconf/Autom4te/Channels.pm line 634
   
Autom4te::Channels::msg('m4trarn_allow(^am__EXEEXT_FALSE$)\x{a}m4tra',
undef, 'warning: ') called at /usr/bin/autom4te line 1038
aclocal: autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
---------------------------------------------------

I tried a lot of combinations, and found out that having both LT_INIT
and AC_SUBST in configure.ac causes the problem. If I remove one of
them, the errors disappear. However, if I run "libtoolize" before
autoreconf, everything works perfectly:
 $ libtoolize;autoreconf -vif
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `.'.
libtoolize: linking file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltsugar.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:10: installing `./missing'
src/Makefile.am: installing `./depcomp'
autoreconf: Leaving directory `.'
---------------------------------------------------


I have the following versions:  (As a side note, this problem happened
after I upgraded to Ubuntu 9.10 from 9.04)
Autoconf: 2.64
Automake: 1.11
libtool: 2.2.6


Here is my configure.ac:
---------------------------------------------------
AC_INIT([openfdtd],[0.1],[[hidden email]])

AC_CONFIG_SRCDIR([src/constants.h])
AC_CONFIG_HEADERS([config.h])

AC_CONFIG_AUX_DIR([.])

AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE

LT_INIT

# location of config++ directory
config_default=/usr/local
AC_ARG_WITH([config],
  [AS_HELP_STRING([--with-config=PATH],
   [specify location of config++ directory])],
  [],
  [with_config=$config_default])
AC_SUBST([configdir],[$with_config])

AC_CONFIG_FILES(Makefile \
  src/Makefile \
  src/main/Makefile \
  src/pml/Makefile \
  src/pointsources/Makefile \
  src/waveforms/Makefile \
  src/recorder/Makefile \
  src/estimator/Makefile \
  src/network/Makefile \
  src/nffft/Makefile \
  src/nffft/td/Makefile \
  src/nffft/pd/Makefile \
  src/tfsf/Makefile \
  src/tfsf/glquad/Makefile \
  src/tfsf/evan/Makefile)

AC_OUTPUT
---------------------------------------------------

If I am not being entirely clear, please forgive. I can provide more
detailed info if necessary.

Regards,

Ilker R Capoglu



_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

Ralf Wildenhues
Hello Ilker,

* Ilker R Capoglu wrote on Tue, Nov 10, 2009 at 06:54:48PM CET:
> I couldn't be sure whether this was a bug or my own doing (which is
> more probable), so I decided to post here.

This looks like a bug somewhere.  I can't reproduce it yet, so:
which Perl and M4 versions do you use?

> When I have both LT_INIT and AC_SUBST macros inside my
> "configure.ac", autoreconf fails:
> $ autoreconf -vif
> autoreconf: Entering directory `.'
> autoreconf: configure.ac: not using Gettext
> autoreconf: running: aclocal --force -I m4
> Use of uninitialized value $msg in concatenation (.) or string at
> /usr/bin/autom4te line 1038.

This is very suspicious, more so since 2.64 has a comment in that line.
Does Ubuntu have local patches in its Autoconf tree not in upstream?

> unknown channel m4trarn_allow(^am__EXEEXT_FALSE$)
> m4tra at /usr/share/autoconf/Autom4te/Channels.pm line 634
>    Autom4te::Channels::msg('m4trarn_allow(^am__EXEEXT_FALSE$)\x{a}m4tra',
> undef, 'warning: ') called at /usr/bin/autom4te line 1038
> aclocal: autom4te failed with exit status: 1
> autoreconf: aclocal failed with exit status: 1

Thanks,
Ralf


_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

Christian Egli-3
Ralf Wildenhues <[hidden email]> writes:

> * Ilker R Capoglu wrote on Tue, Nov 10, 2009 at 06:54:48PM CET:
>> When I have both LT_INIT and AC_SUBST macros inside my
>> "configure.ac", autoreconf fails:
>> $ autoreconf -vif
>> autoreconf: Entering directory `.'
>> autoreconf: configure.ac: not using Gettext
>> autoreconf: running: aclocal --force -I m4
>> Use of uninitialized value $msg in concatenation (.) or string at
>> /usr/bin/autom4te line 1038.
>
> This is very suspicious, more so since 2.64 has a comment in that line.
> Does Ubuntu have local patches in its Autoconf tree not in upstream?

The diffs can be found at
http://archive.ubuntu.com/ubuntu/pool/main/a/autoconf/autoconf_2.64-1ubuntu1.diff.gz.
There seems to be a packaging bug in that the diff contains itself, but
aside from that the changes seem pretty harmles. In particular the diff
contains no mentioning of the string '$msg', so I don't know if it is
really the cause of above error. Below are the relevant excerpts from
the diff.

Thanks
Christian

--- autoconf-2.64.orig/lib/Autom4te/C4che.pm
+++ autoconf-2.64/lib/Autom4te/C4che.pm
@@ -37,6 +37,8 @@
 use Carp;
 use strict;
 
+my $VERSION = 'Mon Jul 27 20:42:01 PDT 2009';
+
 =over 4
 
 =item @request
@@ -182,7 +184,7 @@
   $file->seek (0, 0);
   $file->truncate (0);
   print $file
-    "# This file was generated.\n",
+    "# This file was generated by Autom4te $VERSION.\n",
     "# It contains the lists of macros which have been traced.\n",
     "# It can be safely removed.\n",
     "\n",
@@ -196,6 +198,16 @@
 
 =cut
 
+#
+# GOOD_VERSION ($FILE)
+sub good_version ($$)
+{
+  my ($self, $file) = @_;
+  my ($line) = $file->getline;
+
+  return defined ($line) && scalar ($line =~ / $VERSION.$/);
+}
+
 # LOAD ($FILE)
 # ------------
 sub load ($$)
--- autoconf-2.64.orig/bin/autom4te.in
+++ autoconf-2.64/bin/autom4te.in
@@ -545,13 +545,21 @@
   # stdout is to be handled by hand :(.  Don't use fdopen as it means
   # we will close STDOUT, which we already do in END.
   my $out = new Autom4te::XFile;
-  if ($output eq '-')
+  my $atomic_replace;
+  if ($output eq '-' || (-e $output && ! -f $output))
     {
       $out->open (">$output");
+      $atomic_replace = 0;
     }
   else
     {
-      $out->open($output, O_CREAT | O_WRONLY | O_TRUNC, oct ($mode));
+      $out->open("$output.tmp", O_CREAT | O_WRONLY | O_TRUNC, oct ($mode));
+      if ($out) {
+        $atomic_replace = 1;
+      } else {
+        $out->open($output, O_CREAT | O_WRONLY | O_TRUNC, oct ($mode));
+        $atomic_replace = 0;
+      }
     }
   fatal "cannot create $output: $!"
     unless $out;
@@ -590,6 +598,11 @@
 
   $out->close();
 
+  if ($atomic_replace && !rename("$output.tmp", "$output")) {
+    move ("${output}.tmp", "$output")
+      or fatal "cannot rename ${output}.tmp as $output: $!";
+  }
+
   # If no forbidden words, we're done.
   return
     if ! %prohibited;
@@ -987,7 +1000,8 @@
 # If autom4te is younger, then some structures such as C4che might
 # have changed, which would corrupt its processing.
 Autom4te::C4che->load ($icache_file)
-  if -f $icache && mtime ($icache) > mtime ($0);
+  if -f $icache && mtime ($icache) > mtime ($0)
+                && Autom4te::C4che->good_version ($icache_file);
 
 # Add the new trace requests.
 my $req = Autom4te::C4che->request ('input' => \@ARGV,
--- autoconf-2.64.orig/bin/autoreconf.in
+++ autoconf-2.64/bin/autoreconf.in
@@ -125,6 +125,8 @@
 my $aclocal_supports_force = 0;
 # Does automake support --force-missing?
 my $automake_supports_force_missing = 0;
+# Does libtoolize support --install?
+my $libtoolize_supports_install = 0;
 
 my @prepend_include;
 my @include;
@@ -185,6 +187,7 @@
 
   $aclocal_supports_force = `$aclocal --help 2>/dev/null` =~ /--force/;
   $automake_supports_force_missing = `$automake --help 2>/dev/null` =~ /--force-missing/;
+  $libtoolize_supports_install = `$libtoolize --help` =~ /--install/;
 
   # Dispatch autoreconf's option to the tools.
   # --include;
@@ -199,8 +202,9 @@
     {
       $automake   .= ' --add-missing';
       $automake   .= ' --copy' unless $symlink;
-      $libtoolize .= ' --copy' unless $symlink;
+      $libtoolize .= ' --install' if $libtoolize_supports_install;
     }
+  $libtoolize .= ' --copy' unless $symlink;
   # --force;
   if ($force)
     {
@@ -528,7 +532,7 @@
     {
       verb "$configure_ac: not using Libtool";
     }
-  elsif ($install)
+  elsif ($install || $libtoolize_supports_install)
     {
       if ($uses_libltdl)
  {



_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

Ilker R Capoglu
In reply to this post by Ralf Wildenhues
Thanks Ralf,



Ralf Wildenhues wrote:
>
> which Perl and M4 versions do you use?

Perl : 5.10.0
M4 :  1.4.13


>> When I have both LT_INIT and AC_SUBST macros inside my
>> "configure.ac", autoreconf fails:
>> $ autoreconf -vif
>> autoreconf: Entering directory `.'
>> autoreconf: configure.ac: not using Gettext
>> autoreconf: running: aclocal --force -I m4
>> Use of uninitialized value $msg in concatenation (.) or string at
>> /usr/bin/autom4te line 1038.
>
> This is very suspicious, more so since 2.64 has a comment in that line.
> Does Ubuntu have local patches in its Autoconf tree not in upstream?

Indeed, ubuntu's autom4te (current version 2.64-1ubuntu1) turns out to
be different from the original 2.64. In ubuntu's version, line 1038 is
the following:

  msg $cat, $loc, "warning: $msg";


Here is the diff between the original autom4te and the ubuntu version:

-------------------------------------------------------------------------------------------
30c30
<   my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
'/usr/local/share/autoconf';
---
 >   my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '/usr/share/autoconf';
50c50
< my $pkgdatadir = $ENV{'AC_MACRODIR'} || '/usr/local/share/autoconf';
---
 > my $pkgdatadir = $ENV{'AC_MACRODIR'} || '/usr/share/autoconf';
548c548,549
<   if ($output eq '-')
---
 >   my $atomic_replace;
 >   if ($output eq '-' || (-e $output && ! -f $output))
550a552
 >       $atomic_replace = 0;
554c556,562
<       $out->open($output, O_CREAT | O_WRONLY | O_TRUNC, oct ($mode));
---
 >       $out->open("$output.tmp", O_CREAT | O_WRONLY | O_TRUNC, oct
($mode));
 >       if ($out) {
 >         $atomic_replace = 1;
 >       } else {
 >         $out->open($output, O_CREAT | O_WRONLY | O_TRUNC, oct ($mode));
 >         $atomic_replace = 0;
 >       }
592a601,605
 >   if ($atomic_replace && !rename("$output.tmp", "$output")) {
 >     move ("${output}.tmp", "$output")
 >       or fatal "cannot rename ${output}.tmp as $output: $!";
 >   }
 >
990c1003,1004
<   if -f $icache && mtime ($icache) > mtime ($0);
---
 >   if -f $icache && mtime ($icache) > mtime ($0)
 >                 && Autom4te::C4che->good_version ($icache_file);
---------------------------------------------------------------------------------------


I don't know if this is useful, but here is the Changelog for Ubuntu's
autoconf package:

 http://changelogs.ubuntu.com/changelogs/pool/main/a/autoconf/autoconf_2.64-1ubuntu1/changelog


Thanks,

Ilker


_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

Ralf Wildenhues
Hello, and thanks for the additional information.

* Ilker R Capoglu wrote on Wed, Nov 11, 2009 at 06:33:39PM CET:
> >>When I have both LT_INIT and AC_SUBST macros inside my
> >>"configure.ac", autoreconf fails:
> >>$ autoreconf -vif
> >>autoreconf: Entering directory `.'
> >>autoreconf: configure.ac: not using Gettext
> >>autoreconf: running: aclocal --force -I m4
> >>Use of uninitialized value $msg in concatenation (.) or string at
> >>/usr/bin/autom4te line 1038.

I still don't get it.  Can you run autoreconf with --debug added, post
all output, locate the /tmp/ar* directory with the leftovers and post
all the 'warnings' files you find below that tree?  Please gzip large
output, thanks.

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

Ilker R Capoglu
I ran the following:

  $ autoreconf -vif --debug &> debug_output.txt

The output is attached (gzipped, since it is 747 lines long)

I don't know if the attachment will be accepted by the list; if not,
please advise as to how I can upload it.

Thanks,

Ilker



Ralf Wildenhues wrote:

> Hello, and thanks for the additional information.
>
> * Ilker R Capoglu wrote on Wed, Nov 11, 2009 at 06:33:39PM CET:
>>>> When I have both LT_INIT and AC_SUBST macros inside my
>>>> "configure.ac", autoreconf fails:
>>>> $ autoreconf -vif
>>>> autoreconf: Entering directory `.'
>>>> autoreconf: configure.ac: not using Gettext
>>>> autoreconf: running: aclocal --force -I m4
>>>> Use of uninitialized value $msg in concatenation (.) or string at
>>>> /usr/bin/autom4te line 1038.
>
> I still don't get it.  Can you run autoreconf with --debug added, post
> all output, locate the /tmp/ar* directory with the leftovers and post
> all the 'warnings' files you find below that tree?  Please gzip large
> output, thanks.
>
> Cheers,
> Ralf

_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf

debug_output.tar.gz (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autoreconf fails when LT_INIT and AC_SUBST are both present in configure.ac

Ilker R Capoglu
Oh, I forgot to mention that the /tmp/ar* directory was empty after this
operation.


Ilker



Ilker R Capoglu wrote:

> I ran the following:
>
>  $ autoreconf -vif --debug &> debug_output.txt
>
> The output is attached (gzipped, since it is 747 lines long)
>
> I don't know if the attachment will be accepted by the list; if not,
> please advise as to how I can upload it.
>
> Thanks,
>
> Ilker
>
>
>
> Ralf Wildenhues wrote:
>> Hello, and thanks for the additional information.
>>
>> * Ilker R Capoglu wrote on Wed, Nov 11, 2009 at 06:33:39PM CET:
>>>>> When I have both LT_INIT and AC_SUBST macros inside my
>>>>> "configure.ac", autoreconf fails:
>>>>> $ autoreconf -vif
>>>>> autoreconf: Entering directory `.'
>>>>> autoreconf: configure.ac: not using Gettext
>>>>> autoreconf: running: aclocal --force -I m4
>>>>> Use of uninitialized value $msg in concatenation (.) or string at
>>>>> /usr/bin/autom4te line 1038.
>>
>> I still don't get it.  Can you run autoreconf with --debug added, post
>> all output, locate the /tmp/ar* directory with the leftovers and post
>> all the 'warnings' files you find below that tree?  Please gzip large
>> output, thanks.
>>
>> Cheers,
>> Ralf
>



_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Loading...