automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configure: error: cannot find install-sh, install.sh, or shtool in "


From: TomK
Subject: Re: configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
Date: Sat, 25 Jul 2020 13:17:51 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.0

Hey Karl,

Using this:

[root@dd-wrt01 wifidog]# head -n 20 configure.ac
## -*-m4-*-
# $Id$

dnl Process this file with autoconf to produce a configure script.

# FILE:
# configure.in
#
# FUNCTION:
# implements checks for a variety of system-specific functions

# AC_PROG_RANLIB  Obsoleted.  Use LT_INIT

AC_CONFIG_AUX_DIR([config])
AC_INIT([wifidog], [1.3.0])

# AC_INIT(src/common.h)

AC_CONFIG_MACRO_DIR([m4])
LT_INIT
[root@dd-wrt01 wifidog]#

I get this:

[root@dd-wrt01 wifidog]# ./autogen.sh
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
Running aclocal
Running autoheader
Running automake -a
Running autoconf
Running ./configure  --enable-maintainer-mode
${POSTCONF}=   conf_flags=
__________________________________________________________
configure: error: cannot run /bin/sh /config.sub
[root@dd-wrt01 wifidog]#



When I put AC_CONFIG_AUX_DIR([config]) back:



[root@dd-wrt01 wifidog]# head -n 30 configure.ac
## -*-m4-*-
# $Id$

dnl Process this file with autoconf to produce a configure script.

# FILE:
# configure.in
#
# FUNCTION:
# implements checks for a variety of system-specific functions

# AC_PROG_RANLIB  Obsoleted.  Use LT_INIT

AC_INIT([wifidog], [1.3.0])

# AC_INIT(src/common.h)

AC_CONFIG_MACRO_DIR([m4])
LT_INIT

AC_CONFIG_AUX_DIR([config])
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_CXX

AC_SUBST(BUILDROOT)

# we use Semantic Versioning x.y.z tag for release, docs: http://semver.org/
WIFIDOG_MAJOR_VERSION=1
WIFIDOG_MINOR_VERSION=3
[root@dd-wrt01 wifidog]#


I get this:


[root@dd-wrt01 wifidog]# ./autogen.sh
Running mkdir -p config
Running libtoolize --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: linking file `config/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'
Running aclocal
Running autoheader
Running automake -a
Running autoconf
Running ./configure  --enable-maintainer-mode
${POSTCONF}=   conf_flags=
__________________________________________________________
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
[root@dd-wrt01 wifidog]#


When I comment it out:



[root@dd-wrt01 wifidog]# head -n 30 configure.ac
## -*-m4-*-
# $Id$

dnl Process this file with autoconf to produce a configure script.

# FILE:
# configure.in
#
# FUNCTION:
# implements checks for a variety of system-specific functions

# AC_PROG_RANLIB  Obsoleted.  Use LT_INIT

AC_INIT([wifidog], [1.3.0])

# AC_INIT(src/common.h)

AC_CONFIG_MACRO_DIR([m4])
LT_INIT

# AC_CONFIG_AUX_DIR([config])
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_CXX

AC_SUBST(BUILDROOT)

# we use Semantic Versioning x.y.z tag for release, docs: http://semver.org/
WIFIDOG_MAJOR_VERSION=1
WIFIDOG_MINOR_VERSION=3
[root@dd-wrt01 wifidog]#



All links are created in the home folder and everything works:



[root@dd-wrt01 wifidog]# ./autogen.sh
Running mkdir -p config
Running libtoolize --force
libtoolize: putting auxiliary files in `.'.
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'
Running aclocal
Running autoheader
Running automake -a
configure.ac:19: installing './compile'
configure.ac:19: installing './config.guess'
configure.ac:19: installing './config.sub'
configure.ac:39: installing './install-sh'
configure.ac:39: installing './missing'
libhttpd/Makefile.am: installing './depcomp'
Running autoconf
Running ./configure  --enable-maintainer-mode
${POSTCONF}=   conf_flags=
__________________________________________________________
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /root/toolchains/toolchain-arm_cortex-a9_gcc-8.2.0_musl_eabi/bin//sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /bin/ld -m elf_x86_64
checking if the linker (/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for library containing strerror... none required
checking whether byte ordering is bigendian... no
checking whether make sets $(MAKE)... (cached) yes
checking for ANSI C header files... (cached) yes
checking for doxygen... /bin/doxygen
checking for dot... /bin/dot
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
Begining libhttpd dependencies check
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for unistd.h... (cached) yes
checking for main in -lsocket... no
checking for main in -lnsl... yes
libhttpd dependencies check complete
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating wifidog.spec
config.status: creating wifidog-msg.html
config.status: creating src/Makefile
config.status: creating libhttpd/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing libtool commands
config.status: executing depfiles commands
[root@dd-wrt01 wifidog]#
[root@dd-wrt01 wifidog]#
[root@dd-wrt01 wifidog]#
[root@dd-wrt01 wifidog]# ls -altri
total 2068
414045364 -rw-r--r--.   1 root root    798 Jul 14 21:45 .travis.yml
414045365 -rwxr-xr-x. 1 root root 1751 Jul 14 21:45 .travis_configure_wrapper.sh
414045360 -rw-r--r--.   1 root root    373 Jul 14 21:45 .gitignore
414045367 -rw-r--r--.   1 root root  15131 Jul 14 21:45 COPYING
414045366 -rw-r--r--.   1 root root    164 Jul 14 21:45 AUTHORS
414045368 -rw-r--r--.   1 root root  43154 Jul 14 21:45 ChangeLog
414045372 -rw-r--r--.   1 root root   1806 Jul 14 21:45 README.md
414045371 -rw-r--r--.   1 root root   8924 Jul 14 21:45 NEWS
414045369 -rw-r--r--.   1 root root  20989 Jul 14 21:45 FAQ
414045373 -rw-r--r--.   1 root root   4551 Jul 14 21:45 README.openwrt
221859172 drwxr-xr-x.   8 root root   4096 Jul 14 21:45 contrib
134714546 drwxr-xr-x.   3 root root     19 Jul 14 21:45 scripts
566341789 -rw-r--r--.   1 root root   1757 Jul 14 21:45 wifidog.spec.in
566341787 -rw-r--r--.   1 root root   1428 Jul 14 21:45 wifidog-msg.html.in
566341788 -rw-r--r--.   1 root root  12541 Jul 14 21:45 wifidog.conf
414045352 drwxr-xr-x.   8 root root   4096 Jul 14 21:45 .git
414045348 -rwxr-xr-x. 1 root root 34008 Jul 14 22:40 sconfig.status-backup
425361134 -rw-r--r--.   1 root root    360 Jul 14 22:43 Makefile.am
425361135 -rw-r--r--.   1 root root   4635 Jul 14 22:44 _configure.in
284655126 -rw-r--r--.   1 root root   2474 Jul 18 13:13 config.h.in~
201871270 -rw-r--r--.   1 root root   2560 Jul 18 13:27 config.h.in
417388282 -rw-r--r--.   1 root root  99251 Jul 18 13:36 wifidog-01.log
417388290 -rw-r--r--.   1 root root 128247 Jul 18 16:44 conigure.ac.tar.gz
414588679 -rwxr-xr-x.   1 root root    758 Jul 24 23:52 autogen.sh
135042633 drwxr-xr-x. 367 root root  16384 Jul 25 12:48 ..
567091968 drwxr-xr-x.   2 root root   4096 Jul 25 13:00 config
414124718 -rw-r--r--.   1 root root   4702 Jul 25 13:02 configure.ac
414124717 lrwxrwxrwx. 1 root root 35 Jul 25 13:03 ltmain.sh -> /usr/share/libtool/config/ltmain.sh
414442719 drwxr-xr-x.   2 root root     99 Jul 25 13:03 m4
414045370 -rw-r--r--.   1 root root  44955 Jul 25 13:03 aclocal.m4
134983569 drwxr-xr-x.   2 root root   4096 Jul 25 13:03 autom4te.cache
414195369 lrwxrwxrwx. 1 root root 54 Jul 25 13:03 config.sub -> /opt/ohpc/pub/autotools/share/automake-1.15/config.sub 414195368 lrwxrwxrwx. 1 root root 56 Jul 25 13:03 config.guess -> /opt/ohpc/pub/autotools/share/automake-1.15/config.guess 414195367 lrwxrwxrwx. 1 root root 51 Jul 25 13:03 compile -> /opt/ohpc/pub/autotools/share/automake-1.15/compile 414114644 lrwxrwxrwx. 1 root root 51 Jul 25 13:03 missing -> /opt/ohpc/pub/autotools/share/automake-1.15/missing 414195370 lrwxrwxrwx. 1 root root 54 Jul 25 13:03 install-sh -> /opt/ohpc/pub/autotools/share/automake-1.15/install-sh
414045351 -rw-r--r--.   1 root root  28574 Jul 25 13:03 Makefile.in
414124719 lrwxrwxrwx. 1 root root 51 Jul 25 13:03 depcomp -> /opt/ohpc/pub/autotools/share/automake-1.15/depcomp
412648762 -rwxr-xr-x.   1 root root 592857 Jul 25 13:03 configure
414195104 -rwxr-xr-x.   1 root root  71789 Jul 25 13:04 config.status
537769125 -rw-r--r--.   1 root root  28538 Jul 25 13:04 Makefile
537769127 -rw-r--r--.   1 root root   1753 Jul 25 13:04 wifidog.spec
537769128 -rw-r--r--.   1 root root   1416 Jul 25 13:04 wifidog-msg.html
 68596830 drwxr-xr-x.   2 root root   4096 Jul 25 13:04 doc
537769132 -rw-r--r--.   1 root root   2783 Jul 25 13:04 config.h
414195105 -rw-r--r--.   1 root root     23 Jul 25 13:04 stamp-h1
414195107 -rwxr-xr-x.   1 root root 298836 Jul 25 13:04 libtool
414045401 drwxr-xr-x.   3 root root   4096 Jul 25 13:04 src
 68596836 drwxr-xr-x.   3 root root   4096 Jul 25 13:04 libhttpd
414045375 -rw-r--r--.   1 root root  35655 Jul 25 13:04 config.log
414045347 drwxr-xr-x.  11 root root   4096 Jul 25 13:04 .
[root@dd-wrt01 wifidog]#



---------------------------------------------------------------------------


Out of curiosity and a bit on another topic. Is the syntax written like this for compatibility reasons with other shells? Or because it could get in the way of the parsers Automake uses?


Code snippet:

# FIXME: To remove some day.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi



In particular:


"x$host_alias" != x;


I know adding 'x' or another character prevents failures when a variable is empty but that's been deprecated for sometime.


[] is deprecated in favor of [[]]
`` is deprecated in favor of $()


[ is also a command, not a bracket:

[root@dd-wrt01 wifidog]# which [
/bin/[
[root@dd-wrt01 wifidog]# ]
-bash: ]: command not found
[root@dd-wrt01 wifidog]#


[] also return false positives allowing conditions to execute in cases where they shouldn't. Rare but happens. Not sure about test though.


This is the updated way, at least for bash. [[ ]] ensures comparisons take into account empty variables. [] like 'test' doesn't do that:


# FIXME: To remove some day.
if [[ "$host_alias" != "" ]]; then
  if [[ "$build_alias" = "" ]]; then
    cross_compiling=maybe
  elif [[ "$build_alias" != "$host_alias" ]]; then
    cross_compiling=yes
  fi
fi


REF: https://wiki-dev.bash-hackers.org/scripting/obsolete
REF: http://mywiki.wooledge.org/BashFAQ/082

Cheers,
TK





On 7/24/2020 9:42 PM, Karl Berry wrote:
     Guess the macro never really worked?

AC_CONFIG_AUX_DIR is used in almost every package. For example,
Texinfo's configure.ac starts as below.  As the comment there says,
maybe you were using it after AM_INIT_AUTOMAKE?

-----------------------------------------------------------------------------
AC_INIT([GNU Texinfo], [6.7dev], [bug-texinfo@gnu.org])

dnl Must come before AM_INIT_AUTOMAKE.
AC_CONFIG_AUX_DIR([build-aux])
dnl tar-ustar because we have long filenames for some test files.
dnl parallel-tests as recommended by stefano.
AM_INIT_AUTOMAKE([1.14
                  info-in-builddir parallel-tests readme-alpha tar-ustar])

# Where to generate output; srcdir location.
AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
AC_CONFIG_SRCDIR([info/info.c])
-----------------------------------------------------------------------------

Oddly, I cannot find that necessary ordering mentioned in the
documentation. I'm not 100% sure it's always required, either.
I'll have to look into that. --thanks, karl.




--
Thx,
TK.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]