Menu

#285 bootstrap fails if "install.sh" in parent directory

0.10.0
assigned
None
http://openocd.zylin.com/5890
automake
Defect
2020-10-27
2020-10-27
MrLavender
No

I've just spent hours tearing my hair out wondering why my build was suddenly failing. It turns out that if there is a file called install.sh in the parent of the build directory then glibtoolize decides to copy ltmain.sh into that directory, which then causes automake to fail with

configure.ac:37: error: required file './ltmain.sh' not found

Steps to reproduce;

$ git clone https://git.code.sf.net/p/openocd/code openocd-code
$ touch install.sh
$ cd openocd-code
$ ./bootstrap

Fails with the above error and now ../ltmain.sh exists instead of ./ltmain.sh.

I fixed this by adding AC_CONFIG_AUX_DIR([.]) on line 5 of configure.ac, which ensures it doesn't use .. instead of ..

Discussion

  • Antonio Borneo

    Antonio Borneo - 2020-10-27

    I also got some issue with garbage in "../..", but did not went ahead to fix it, just deleted the garbage.
    Your fix seams ok, to me.
    Are you willing to send a patch in gerrit for this change?

     
  • MrLavender

    MrLavender - 2020-10-27

    Sorry, I've never used Gerrit and don't really have the time to learn it right now. This is the patch if anyone who knows the process would like to do it.

    diff --git a/configure.ac b/configure.ac
    index 569816637..47a167e28 100644
    --- a/configure.ac
    +++ b/configure.ac
    @@ -2,6 +2,7 @@ AC_PREREQ(2.64)
     AC_INIT([openocd], [0.10.0+dev],
       [OpenOCD Mailing List <openocd-devel@lists.sourceforge.net>])
     AC_CONFIG_SRCDIR([src/openocd.c])
    +AC_CONFIG_AUX_DIR([.])
    
     m4_include([config_subdir.m4])dnl
    
     
  • Antonio Borneo

    Antonio Borneo - 2020-10-27

    Understand. No problem, I can post it for you.
    I would like to add you as author, if you agree. In this case, what real-name/email should I use for git and gerrit? Usually it is added in the form:
    Author: Antonio Borneo borneo.antonio@gmail.com
    Signed-off-by: Antonio Borneo borneo.antonio@gmail.com

     
  • MrLavender

    MrLavender - 2020-10-27

    I don't require any attribution, and would rather not provide my real name and email address here. If you require copyright assignment then I hereby assign copyright in this code to the OpenOCD project, to be licensed under the same terms as the rest of the code.

     
  • Antonio Borneo

    Antonio Borneo - 2020-10-27

    Ok, clear.
    I just posted http://openocd.zylin.com/5890
    Thanks!

     
  • Antonio Borneo

    Antonio Borneo - 2020-10-27
     

Log in to post a comment.