Code Monkey home page Code Monkey logo

Comments (5)

ligurio avatar ligurio commented on August 29, 2024

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

autoconf uses auxiliary build tools (e.g., install-sh, config.sub, config.guess, etc.), see description of AC_CONFIG_AUX_DIR in documentation. Directory for these tools could be specified with AC_CONFIG_AUX_DIR in configure.ac and it is there:

AC_CONFIG_AUX_DIR([build-aux])

However, for unknown reasons ./bootstrap.sh autoreconf (it is recommended way to generate configure script by libmemcached developers, see file README.FIRST) generates code in configure script that cannot use this directory (build-aux):

sergeyb@pony:~/sources/MRG/memcached/third_party/libmemcached$ ./bootstrap.sh autoreconf
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.         <---------------------
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'                                <---------------------
libtoolize: copying file 'build-aux/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:17: installing 'build-aux/compile'
configure.ac:27: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
sergeyb@pony:~/sources/MRG/memcached/third_party/libmemcached$ ./configure 
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
$ 

Part of configure script that find aux tools:

ac_aux_dir=                                                                      
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do                         
  if test -f "$ac_dir/install-sh"; then                                          
    ac_aux_dir=$ac_dir                                                           
    ac_install_sh="$ac_aux_dir/install-sh -c"                                    
    break                                                                        
  elif test -f "$ac_dir/install.sh"; then                                        
    ac_aux_dir=$ac_dir                                                           
    ac_install_sh="$ac_aux_dir/install.sh -c"                                    
    break                                                                        
  elif test -f "$ac_dir/shtool"; then                                            
    ac_aux_dir=$ac_dir                                                           
    ac_install_sh="$ac_aux_dir/shtool install -c"                                
    break                                                                        
  fi                                                                             
done                                                                             
if test -z "$ac_aux_dir"; then                                                   
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi   

The problem can be easily fixes in autogenerated configure script with patch below:

--- configure   2021-12-02 11:17:19.717927742 +0300
+++ configure_  2021-12-02 11:20:27.180894829 +0300
@@ -3456,7 +3456,7 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.." "$srcdir/build-aux"; do
   if test -f "$ac_dir/install-sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"

It is a question why autoconf haven't use directory passed in AC_CONFIG_AUX_DIR for searching auxiliary tools in autogenerated script.

from memcached.

ligurio avatar ligurio commented on August 29, 2024

Cannot reproduce on the latest version of libmemcached (https://code.launchpad.net/libmemcached)

from memcached.

ligurio avatar ligurio commented on August 29, 2024

It cannot be reproduced on upstream because AC_CONFIG_AUX_DIR moved to top level:

sergeyb@pony:~/sources/MRG/memcached/third_party/libmemcached$ diff -u configure.ac ~/sources/libmemcached/configure.ac 
--- configure.ac        2021-12-02 11:48:13.015706435 +0300
+++ /home/sergeyb/sources/libmemcached/configure.ac     2021-12-02 11:38:32.615768432 +0300
@@ -13,11 +13,12 @@
 AC_PREREQ([2.61])
 AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/])
 
+AC_CONFIG_AUX_DIR([build-aux])
+
 # Setup the compilers early on
 AC_PROG_CC([cc gcc clang])
 AC_PROG_CXX([c++ g++ clang++])
 
-AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
 AC_CANONICAL_HOST

from memcached.

ligurio avatar ligurio commented on August 29, 2024

Related:

from memcached.

ligurio avatar ligurio commented on August 29, 2024

Depends on:

from memcached.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.