Trouble with sample project's autoconf

I'm trying to follow docs/Projects.html to use llvm in a project of my own.

If I just copy the sample directory, running configure in the new one
works fine:
~/programming/llvm-1.9/projects $ cp -a sample/ zhe
~/programming/llvm-1.9/projects $ cd zhe/
~/programming/llvm-1.9/projects/zhe $ ./configure
configure: creating ./config.status
config.status: creating Makefile.common
config.status: executing setup commands
config.status: executing Makefile commands
config.status: executing lib/Makefile commands
config.status: executing lib/sample/Makefile commands
config.status: executing tools/Makefile commands
config.status: executing tools/sample/Makefile commands

However, if I run the AutoRegen.sh script (after modifying it to
accept autoconf 2.61, which I think is fine as gentoo slots it the
same as the 2.5[0-9] versions), the configure no longer works:
~/programming/llvm-1.9/projects/zhe $ cd autoconf/
~/programming/llvm-1.9/projects/zhe/autoconf $ ./AutoRegen.sh
Regenerating aclocal.m4 with aclocal
/usr/share/aclocal/sdlmm.m4:12: warning: underquoted definition of AM_PATH_SDLMM
/usr/share/aclocal/sdlmm.m4:12: run info '(automake)Extending aclocal'
/usr/share/aclocal/sdlmm.m4:12: or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal
Regenerating configure with autoconf 2.5x
~/programming/llvm-1.9/projects/zhe/autoconf $ cd ..
~/programming/llvm-1.9/projects/zhe $ ./configure
configure: error: cannot find install-sh or install.sh in
../../../autoconf "."/../../../autoconf

I've tried this with both the 1.9 release and a fresh CVS checkout,
with the same results. What am I missing?

Confused,
Scott McMurray

Hello Scott,

I'm trying to follow docs/Projects.html to use llvm in a project of my own.

If I just copy the sample directory, running configure in the new one
works fine:
~/programming/llvm-1.9/projects $ cp -a sample/ zhe
~/programming/llvm-1.9/projects $ cd zhe/
~/programming/llvm-1.9/projects/zhe $ ./configure
configure: creating ./config.status
config.status: creating Makefile.common
config.status: executing setup commands
config.status: executing Makefile commands
config.status: executing lib/Makefile commands
config.status: executing lib/sample/Makefile commands
config.status: executing tools/Makefile commands
config.status: executing tools/sample/Makefile commands

However, if I run the AutoRegen.sh script (after modifying it to
accept autoconf 2.61, which I think is fine as gentoo slots it the
same as the 2.5[0-9] versions), the configure no longer works:
~/programming/llvm-1.9/projects/zhe $ cd autoconf/
~/programming/llvm-1.9/projects/zhe/autoconf $ ./AutoRegen.sh
Regenerating aclocal.m4 with aclocal
/usr/share/aclocal/sdlmm.m4:12: warning: underquoted definition of AM_PATH_SDLMM
/usr/share/aclocal/sdlmm.m4:12: run info '(automake)Extending aclocal'
/usr/share/aclocal/sdlmm.m4:12: or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal

This one is because you're using 2.61. This kind of thing i why we
*strongly* recommend people to use only the exact version of autoconf,
libtool and automake that LLVM uses. There's obviously a difference in
your aclocal that isn't handling the AM_PATH_SDLMM macro correctly.

Regenerating configure with autoconf 2.5x
~/programming/llvm-1.9/projects/zhe/autoconf $ cd ..
~/programming/llvm-1.9/projects/zhe $ ./configure
configure: error: cannot find install-sh or install.sh in
../../../autoconf "."/../../../autoconf

Assuming that your /programming/llvm-1.9 directory contains llvm 1.9, it
should have found it in /programming/llvm-1.9/autoconf/install-sh. Check
to make sure that that directory and file are there. If it is there,
then its some kind of bug.

I've tried this with both the 1.9 release and a fresh CVS checkout,
with the same results. What am I missing?

Nothing. :slight_smile:

> However, if I run the AutoRegen.sh script (after modifying it to
> accept autoconf 2.61, which I think is fine as gentoo slots it the
> same as the 2.5[0-9] versions), the configure no longer works:
> ~/programming/llvm-1.9/projects/zhe $ cd autoconf/
> ~/programming/llvm-1.9/projects/zhe/autoconf $ ./AutoRegen.sh
> Regenerating aclocal.m4 with aclocal
> /usr/share/aclocal/sdlmm.m4:12: warning: underquoted definition of AM_PATH_SDLMM
> /usr/share/aclocal/sdlmm.m4:12: run info '(automake)Extending aclocal'
> /usr/share/aclocal/sdlmm.m4:12: or see
> http://sources.redhat.com/automake/automake.html#Extending-aclocal

This one is because you're using 2.61. This kind of thing i why we
*strongly* recommend people to use only the exact version of autoconf,
libtool and automake that LLVM uses. There's obviously a difference in
your aclocal that isn't handling the AM_PATH_SDLMM macro correctly.

Well, I went and installed autoconf 2.59 (the only autoconf 2.5x
available in Gentoo), but I still get the same thing:

~/programming/llvm-cvs $ cd projects/
~/programming/llvm-cvs/projects $ cp -a sample/ zhe
~/programming/llvm-cvs/projects $ cd zhe/
~/programming/llvm-cvs/projects/zhe $ ./configure
configure: creating ./config.status
config.status: creating Makefile.common
config.status: executing setup commands
config.status: executing Makefile commands
config.status: executing lib/Makefile commands
config.status: executing lib/sample/Makefile commands
config.status: executing tools/Makefile commands
config.status: executing tools/sample/Makefile commands
~/programming/llvm-cvs/projects/zhe $ cd autoconf/
~/programming/llvm-cvs/projects/zhe/autoconf $ ./AutoRegen.sh
Regenerating aclocal.m4 with aclocal
/usr/share/aclocal/sdlmm.m4:12: warning: underquoted definition of AM_PATH_SDLMM
/usr/share/aclocal/sdlmm.m4:12: run info '(automake)Extending aclocal'
/usr/share/aclocal/sdlmm.m4:12: or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal
Regenerating configure with autoconf 2.5x
~/programming/llvm-cvs/projects/zhe/autoconf $ cd ..
~/programming/llvm-cvs/projects/zhe $ ./configure
configure: error: cannot find install-sh or install.sh in
../../../autoconf ./../../../autoconf
~/programming/llvm-cvs/projects/zhe $ autoconf --version
autoconf (GNU Autoconf) 2.59

What are the exact versions of libtool and automake that LLVM uses? I have
~/programming/llvm-cvs $ libtool --version
ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
And Gentoo is set up with a script that tries to run the correct
automake by looking at aclocal.m4, Makefile.in, env variables, and
such, so I have all of automake 1.4, 1.5, ..., 1.9, and 1.10.

Assuming that your /programming/llvm-1.9 directory contains llvm 1.9, it
should have found it in /programming/llvm-1.9/autoconf/install-sh. Check
to make sure that that directory and file are there. If it is there,
then its some kind of bug.

install-sh is most definitely there:
~/programming/llvm-cvs $ ls autoconf/install-sh
autoconf/install-sh

However, configure seems to be looking for it in one directory too
low. The ../../.. is correct from the autoconf directory, but
obviously not the directory in which configure is run. I've tried
changing it to ../.. in configure.ac, but AutoRegen.sh overwrites it.

Thanks for the help Reid,
Scott McMurray

Scott,

> > However, if I run the AutoRegen.sh script (after modifying it to
> > accept autoconf 2.61, which I think is fine as gentoo slots it the
> > same as the 2.5[0-9] versions), the configure no longer works:
> > ~/programming/llvm-1.9/projects/zhe $ cd autoconf/
> > ~/programming/llvm-1.9/projects/zhe/autoconf $ ./AutoRegen.sh
> > Regenerating aclocal.m4 with aclocal
> > /usr/share/aclocal/sdlmm.m4:12: warning: underquoted definition of AM_PATH_SDLMM
> > /usr/share/aclocal/sdlmm.m4:12: run info '(automake)Extending aclocal'
> > /usr/share/aclocal/sdlmm.m4:12: or see
> > http://sources.redhat.com/automake/automake.html#Extending-aclocal
>
> This one is because you're using 2.61. This kind of thing i why we
> *strongly* recommend people to use only the exact version of autoconf,
> libtool and automake that LLVM uses. There's obviously a difference in
> your aclocal that isn't handling the AM_PATH_SDLMM macro correctly.
>
Well, I went and installed autoconf 2.59 (the only autoconf 2.5x
available in Gentoo), but I still get the same thing:

~/programming/llvm-cvs $ cd projects/
~/programming/llvm-cvs/projects $ cp -a sample/ zhe
~/programming/llvm-cvs/projects $ cd zhe/
~/programming/llvm-cvs/projects/zhe $ ./configure
configure: creating ./config.status
config.status: creating Makefile.common
config.status: executing setup commands
config.status: executing Makefile commands
config.status: executing lib/Makefile commands
config.status: executing lib/sample/Makefile commands
config.status: executing tools/Makefile commands
config.status: executing tools/sample/Makefile commands
~/programming/llvm-cvs/projects/zhe $ cd autoconf/
~/programming/llvm-cvs/projects/zhe/autoconf $ ./AutoRegen.sh
Regenerating aclocal.m4 with aclocal
/usr/share/aclocal/sdlmm.m4:12: warning: underquoted definition of AM_PATH_SDLMM
/usr/share/aclocal/sdlmm.m4:12: run info '(automake)Extending aclocal'
/usr/share/aclocal/sdlmm.m4:12: or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal
Regenerating configure with autoconf 2.5x
~/programming/llvm-cvs/projects/zhe/autoconf $ cd ..
~/programming/llvm-cvs/projects/zhe $ ./configure
configure: error: cannot find install-sh or install.sh in
../../../autoconf ./../../../autoconf
~/programming/llvm-cvs/projects/zhe $ autoconf --version
autoconf (GNU Autoconf) 2.59

What are the exact versions of libtool and automake that LLVM uses?

It depends on three things, as I mentioned in my last email: autoconf,
automake, and libtool. The versions are:

autoconf (GNU Autoconf) 2.60
ltmain.sh (GNU libtool) 1.5.22
automake (GNU automake) 1.9.6

I have
~/programming/llvm-cvs $ libtool --version
ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
And Gentoo is set up with a script that tries to run the correct
automake by looking at aclocal.m4, Makefile.in, env variables, and
such, so I have all of automake 1.4, 1.5, ..., 1.9, and 1.10.

1.9.6 is needed.

> Assuming that your /programming/llvm-1.9 directory contains llvm 1.9, it
> should have found it in /programming/llvm-1.9/autoconf/install-sh. Check
> to make sure that that directory and file are there. If it is there,
> then its some kind of bug.
>
install-sh is most definitely there:
~/programming/llvm-cvs $ ls autoconf/install-sh
autoconf/install-sh

However, configure seems to be looking for it in one directory too
low. The ../../.. is correct from the autoconf directory, but
obviously not the directory in which configure is run. I've tried
changing it to ../.. in configure.ac, but AutoRegen.sh overwrites it.

You're supposed to run AutoRegen.sh from the autoconf directory, so that
if cwd is /programming/llvm-1.9/projects/xhe/autoconf then it finds
install-sh in ../../../autoconf. It should be found at the time of
running autoconf (AutoRegen.sh) and a normalized path used in configure.
If that's not happening then it's likely something system specific going
on. It doesn't happen elsewhere.

Reid.