alac icon indicating copy to clipboard operation
alac copied to clipboard

autoreconf -fi fails with 'autoreconf: automake failed with exit status: 1'

Open Arve opened this issue 7 years ago • 7 comments

On Raspbian Stretch, installation fails on first run:

pi@soverommet:~/brutepi/alac $ autoreconf -fi
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in '..'.
libtoolize: copying file '../ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, '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'
configure.ac:40: installing './compile'
configure.ac:63: installing './config.guess'
configure.ac:63: installing './config.sub'
configure.ac:20: installing './install-sh'
configure.ac:63: error: required file './ltmain.sh' not found
configure.ac:20: installing './missing'
Makefile.am: installing './INSTALL'
codec/Makefile.am: installing './depcomp'
autoreconf: automake failed with exit status: 1

The offending line being libtoolize: putting auxiliary files in '..'. - so it tries to put ltmain.sh a directory up from where it's supposed to be.

On running autoreconf a second time (when m4 already exists), it appears to put the files in the correct location, and configure appears to work as intended

Arve avatar Apr 12 '18 09:04 Arve

Thanks for the report. I'll check it out.

mikebrady avatar Apr 12 '18 09:04 mikebrady

Hmm. Just tried this now, on Raspbian Stretch Lite (4.9.44+ August 2017)

pi@raspberrypi:~/alac $ autoreconf -fi
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, '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'
configure.ac:40: installing './compile'
configure.ac:63: installing './config.guess'
configure.ac:63: installing './config.sub'
configure.ac:20: installing './install-sh'
configure.ac:20: installing './missing'
Makefile.am: installing './INSTALL'
codec/Makefile.am: installing './depcomp'
pi@raspberrypi:~/alac $ 

Seemed to be okay.

mikebrady avatar Jun 18 '18 10:06 mikebrady

This happens when libtoolize tries to be smart about the auxiliary files directory: if there is a install.sh in the parent directory (e.g. when alac is installed as part of another project), libtoolize thinks it should put ltmain.sh alongside it.

pi@raspberrypi:~/alac $ touch ../install.sh
pi@raspberrypi:~/alac $ autoreconf -fi
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in '..'.
libtoolize: copying file '../ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, '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'
configure.ac:40: installing './compile'
configure.ac:63: installing './config.guess'
configure.ac:63: installing './config.sub'
configure.ac:20: installing './install-sh'
configure.ac:63: error: required file './ltmain.sh' not found
configure.ac:20: installing './missing'
Makefile.am: installing './INSTALL'
codec/Makefile.am: installing './depcomp'
autoreconf: automake failed with exit status: 1
pi@raspberrypi:~/alac $

A quick and dirty workaround is to install alac from a directory where there is no install.sh in one of its parent directories, e.g. in /tmp.

@mikebrady I have no idea about libtoolize, is there a way to avoid this behaviour?

nicokaiser avatar Apr 24 '21 19:04 nicokaiser

Thanks for the post, but I am not getting the same behaviour:

pi@RaspberryPi4B:~/bogus $ ls -al
total 12
drwxr-xr-x  3 pi pi 4096 Apr 25 11:24 .
drwxr-xr-x 15 pi pi 4096 Apr 25 11:23 ..
drwxr-xr-x  5 pi pi 4096 Apr 25 11:24 alac
-rw-r--r--  1 pi pi    0 Apr 25 11:22 ltmain.sh
pi@RaspberryPi4B:~/bogus $ cd alac/
pi@RaspberryPi4B:~/bogus/alac $ autoreconf -fi
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, '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'
configure.ac:40: installing './compile'
configure.ac:63: installing './config.guess'
configure.ac:63: installing './config.sub'
configure.ac:20: installing './install-sh'
configure.ac:20: installing './missing'
Makefile.am: installing './INSTALL'
codec/Makefile.am: installing './depcomp'
pi@RaspberryPi4B:~/bogus/alac $ cd ..
pi@RaspberryPi4B:~/bogus $ ls -al
total 12
drwxr-xr-x  3 pi pi 4096 Apr 25 11:24 .
drwxr-xr-x 15 pi pi 4096 Apr 25 11:23 ..
drwxr-xr-x  7 pi pi 4096 Apr 25 11:25 alac
-rw-r--r--  1 pi pi    0 Apr 25 11:22 ltmain.sh
pi@RaspberryPi4B:~/bogus $ ls -al

This is on a fully up-to-date Raspberry Pi 4. -- Version 10.9, "Buster".

pi@RaspberryPi4B:~/bogus $ autoreconf -V
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.


pi@RaspberryPi4B:~/bogus $ aclocal --version
aclocal (GNU automake) 1.16.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.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 Tom Tromey <[email protected]>
       and Alexandre Duret-Lutz <[email protected]>.


pi@RaspberryPi4B:~/bogus $ automake --version
automake (GNU automake) 1.16.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.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 Tom Tromey <[email protected]>
       and Alexandre Duret-Lutz <[email protected]>.

mikebrady avatar Apr 25 '21 10:04 mikebrady

Did you try to create (an empty) install.sh in ~/bogus?

nicokaiser avatar Apr 25 '21 11:04 nicokaiser

Apologies, I misread your post. You're right -- putting that install.sh file in the directory above the alac directory causes the problem you've identified.

I'm afraid I don't have a fix for it.

mikebrady avatar Apr 25 '21 12:04 mikebrady

I'm afraid I don't have a fix for it.

No problem – it already helps a lot to know that it should be installed in a directory that does not have an install.sh in one of its parents.

nicokaiser avatar Apr 25 '21 13:04 nicokaiser