Search code examples
compilationautoconfautomake

autoreconf failed when compiling fribidi


The command I used to compile was

./bootstrap

the results were:

Usable autoreconf found, running    
main::scan_file() called too early to check prototype at 
/usr/local/bin/aclocal line 617.
aclocal: couldn't open directory `m4': No such file or directory
autoreconf: aclocal failed with exit status: 1

by tracing bootsrap, I found that those errors were caused by:

autoreconf     --force --install

autoreconf version was:

autoreconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, 
<http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille

Could anyone help me solve this problem.


Solution

  • The actual error is raised by aclocal (which is invoked by autoreconf).

    Recent versions of aclocal should handle that gracefully, so check your aclocal-version (OR: whether you are actually running the correct aclocal-binary)

    Alternatively, you could simply create an (empty) m4/ directory in your build-dir.

    Arguably this (ensuring the existance of the m4/ directory), should be handled by the bootstrap script, however:

    • current fribidi has dropped autotools in favor of meson (although it still supports autotools)

    • fribidi has come with a non-empty m4 directory for quite some time now.

    • afaict, the last version of fribidi that used autotools and lacked an m4/ directory was 0.19.7 (released about 2015-08)

    So: please use the latest and greatest (stable) version of any library. If you cannot, you should clearly state that in your problem description, and note which version you are trying to compile.