How to overcome “'aclocal-1.15' is missing on your system” warning?

后端 未结 9 1779
有刺的猬
有刺的猬 2020-12-12 11:44

Im trying to run a c++ program on github. (available at the following link https://github.com/mortehu/text-classifier)

I have a mac, and am trying to run it in the t

相关标签:
9条回答
  • 2020-12-12 11:51

    The problem is not automake package, is the repository

    sudo apt-get install automake

    Installs version aclocal-1.4, that's why you can't find 1.5 (In Ubuntu 14,15)

    Use this script to install latest https://github.com/gp187/nginx-builder/blob/master/fix/aclocal.sh

    0 讨论(0)
  • 2020-12-12 11:53

    I think the touch command is the right answer e.g. do something like

    touch --date="`date`" aclocal.m4 Makefile.am configure Makefile.in
    

    before [./configure && make].

    Sidebar I: Otherwise, I agree with @kaz: adding dependencies for aclocal.m4 and/or configure and/or Makefile.am and/or Makefile.in makes assumptions about the target system that may be invalid. Specifically, those assumptions are

    1) that all target systems have autotools,

    2) that all target systems have the same version of autotools (e.g. automake.1.15 in this case).

    3) that if either (1) or (2) are not true for any user, that the user is extracting the package from a maintainer-produced TAR or ZIP format that maintains timestamps of the relevant files, in which case all autotool/configure/Makefile.am/Makefile.in dependencies in the configure-generated Makefile will be satisfied before the make command is issued.

    The second assumption fails on many Mac systems because automake.1.14 is the "latest" for OSX (at least that is what I see in MacPorts, and apparently the same is true for brew).

    The third assumption fails spectacularly in a world with Github. This failure is an example of an "everyone thinks they are normative" mindset; specifically, the maintainers, who are the only class of users that should need to edit Makefile.am, have now put everyone into that class.

    Perhaps there is an option in autowhatever that keeps these dependencies from being added to Makefile.in and/or Makefile.

    Sidebar II [Why @kaz is right]: of course it is obvious, to me and other cognoscenti, to simply try a sequence of [touch] commands to fool the configure-created Makefile from re-running configure and the autotools. But that is not the point of configure; the point of configure is to ensure as many users on as many different systems as as possible can simply do [./configure && make] and move on; most users are not interested in "shaving the yak" e.g. debugging faulty assumptions of the autotools developers.

    Sidebar III: it could be argued that ./configure, now that autotools adds these dependencies, is the wrong build tool to use with Github-distributed packages.

    Sidebar IV: perhaps configure-based Github repos should put the necessary touch command into their readme, e.g. https://github.com/drbitboy/Tycho2_SQLite_RTree.

    0 讨论(0)
  • 2020-12-12 11:54

    Before running ./configure try running autoreconf -f -i. The autoreconf program automatically runs autoheader, aclocal, automake, autopoint and libtoolize as required.

    Edit to add: This is usually caused by checking out code from Git instead of extracting it from a .zip or .tar.gz archive. In order to trigger rebuilds when files change, Git does not preserve files' timestamps, so the configure script might appear to be out of date. As others have mentioned, there are ways to get around this if you don't have a sufficiently recent version of autoreconf.

    Another edit: This error can also be caused by copying the source folder extracted from an archive with scp to another machine. The timestamps can be updated, suggesting that a rebuild is necessary. To avoid this, copy the archive and extract it in place.

    0 讨论(0)
  • 2020-12-12 11:54

    A generic answer that may or not apply to this specific case:

    As the error message hint at, aclocal-1.15 should only be required if you modified files that were used to generate aclocal.m4

    If you don't modify any of those files (including configure.ac) then you should not need to have aclocal-1.15.

    In my case, the problem was not that any of those files was modified but somehow the timestamp on configure.ac was 6 minutes later compared to aclocal.m4.

    I haven't figured out why, but a clean clone of my git repo solved the issue for me. Maybe something linked to git and how it created files in the first place.

    Rather than rerunning autoconf and friends, I would just try to get a clean clone and try again.

    It's also possible that somebody committed a change to configure.ac but didn't regenerate the aclocal.m4, in which case you indeed have to rerun automake and friends.

    0 讨论(0)
  • 2020-12-12 11:55

    Often, you don't need any auto* tools and the simplest solution is to simply run touch aclocal.m4 configure in the relevant folder (and also run touch on Makefile.am and Makefile.in if they exist). This will update the timestamp of aclocal.m4 and remind the system that aclocal.m4 is up-to-date and doesn't need to be rebuilt. After this, it's probably best to empty your build directory and rerun configure from scratch after doing this. I run into this problem regularly. For me, the root cause is that I copy a library (e.g. mpfr code for gcc) from another folder and the timestamps change.

    Of course, this trick isn't valid if you really do need to regenerate those files, perhaps because you have manually changed them. But hopefully the developers of the package distribute up-to-date files.


    And of course, if you do want to install automake and friends, then use the appropriate package-manager for your distribution.


    Install aclocal which comes with automake:

    brew install automake          # for Mac
    apt-get install automake       # for Ubuntu
    

    Try again:

    ./configure && make 
    
    0 讨论(0)
  • 2020-12-12 12:01

    2018, yet another solution ...

    https://github.com/apereo/mod_auth_cas/issues/97

    in some cases simply running

    $ autoreconf -f -i
    

    and nothing else .... solves the problem.

    You do that in the directory /pcre2-10.30 .

    What a nightmare.

    (This usually did not solve the problem in 2017, but now usually does seem to solve the problem - they fixed something. Also, it seems your Dockerfile should now usually start with "FROM ibmcom/swift-ubuntu" ; previously you had to give a certain version/dev-build to make it work.)

    0 讨论(0)
提交回复
热议问题