[CIG-MC] svn download question for CitcomS

Leif Strand leif at geodynamics.org
Wed Jan 21 13:58:01 PST 2009


Hi Clint,

> I had to install Libtool myself

This is the core of the problem.  The Autotools are designed to work 
together.  They assume that they are installed under the same prefix. 
Currently, your system's 'aclocal' program can't find the Libtool that 
you installed yourself.  Therefore, Libtool macros such as 
AC_PROG_LIBTOOL are undefined.

If you're using Linux and your distro has an Libtool package available, 
I would try that instead, rather than using your own Libtool that you 
built yourself.

Another solution is to set the environment variable ACLOCAL:

export ACLOCAL="aclocal -I /path/to/libtool/share/aclocal"
autoreconf -if

This will change the way 'autoreconf' runs 'aclocal'.  Obviously, you 
would replace "/path/to/libtool" with the prefix under which you 
installed Libtool.  Note that $LIBTOOL_PREFIX/share/aclocal contains 
libtool.m4, which contains the definition of AC_PROG_LIBTOOL.

A third option is to install all three Autotools as a complete set.  You 
would install Autoconf, Automake, and Libtool (in that order) somewhere 
under your home directory, say $HOME/opt/autotools.  After installing 
Autoconf, be sure to add $HOME/opt/autotools/bin to your $PATH, so that 
the subsequent installs can find the right installation of the other tools.

The reason you got different results the second time is because you ran 
"autoreconf -i" (as opposed to "autoreconf -if").  So, it only installed 
missing files.  I.e., it used the cached results from the previous run.

> what 
> is the reason that configure and other scripts are not included in the 
> svn download? I guess my original thought was that it would be easiest 
> for users if they were included

Indeed, we try to insulate users from all this madness by including the 
files generated by the Autotools in the *.tar.gz source packages.

The SVN access isn't really intended for ordinary users; it's for 
developers.  For developers, it's more convenient to omit the files from 
SVN, and generate them on the local workstation.  As an example, suppose 
Eh adds new C source file.  He'd have to list the source file in one the 
Makefile.am files so that it would get compiled.  Then, the autotools 
would attempt to regenerate Makefile.in, which would then register as a 
"changed" file under SVN, and he'd check-in that file along with his 
other changes.  The problem emerges when you or I try to edit the code, 
and we have a different, conflicting version of Autotools...  Plus, all 
those changes to Autotools-generated files would generate a lot of noise 
in "svn diff" output.

I hope this helps.  Let us know if you still have trouble.

--Leif



CLINT CONRAD wrote:
> Hi Eh,
> 
> RTM! I should Read The Manual more carefully! Sorry about that, but 
> thanks for the pointer.
> 
> However, when I download the svn version and the follow the directions, 
> I am immediately halted by:
> (I am separating pasted text using "----------" breaks)
> 
> --------------------
> [clintc at akua CitcomS.svn]$ autoreconf -i
> configure.ac:84: error: possibly undefined macro: AC_PROG_LIBTOOL
>       If this token and others are legitimate, please use m4_pattern_allow.
>       See the Autoconf documentation.
> autoreconf: /usr/bin/autoconf failed with exit status: 1
> ------------------
> 
> and then I try again and I get something different:
> 
> ------------------
> [clintc at akua CitcomS.svn]$ autoreconf -i
> configure.ac: installing `./aux-config/install-sh'
> configure.ac: installing `./aux-config/missing'
> CitcomS/Makefile.am:26: installing `./aux-config/py-compile'
> bin/Makefile.am: installing `./aux-config/compile'
> bin/Makefile.am: installing `./aux-config/depcomp'
> lib/Makefile.am:27: library used but `RANLIB' is undefined
> lib/Makefile.am:27: 
> lib/Makefile.am:27: The usual way to define `RANLIB' is to add 
> `AC_PROG_RANLIB'
> lib/Makefile.am:27: to `configure.ac' and run `autoconf' again.
> lib/Makefile.am:28: Libtool library used but `LIBTOOL' is undefined
> lib/Makefile.am:28: 
> lib/Makefile.am:28: The usual way to define `LIBTOOL' is to add 
> `AC_PROG_LIBTOOL'
> lib/Makefile.am:28: to `configure.ac' and run `aclocal' and `autoconf' 
> again.
> module/Exchanger/Makefile.am:26: library used but `RANLIB' is undefined
> module/Exchanger/Makefile.am:26: 
> module/Exchanger/Makefile.am:26: The usual way to define `RANLIB' is to 
> add `AC_PROG_RANLIB'
> module/Exchanger/Makefile.am:26: to `configure.ac' and run `autoconf' again.
> module/Exchanger/Makefile.am:27: Libtool library used but `LIBTOOL' is 
> undefined
> module/Exchanger/Makefile.am:27: 
> module/Exchanger/Makefile.am:27: The usual way to define `LIBTOOL' is to 
> add `AC_PROG_LIBTOOL'
> module/Exchanger/Makefile.am:27: to `configure.ac' and run `aclocal' and 
> `autoconf' again.
> module/Makefile.am:32: library used but `RANLIB' is undefined
> module/Makefile.am:32: 
> module/Makefile.am:32: The usual way to define `RANLIB' is to add 
> `AC_PROG_RANLIB'
> module/Makefile.am:32: to `configure.ac' and run `autoconf' again.
> module/Makefile.am:33: Libtool library used but `LIBTOOL' is undefined
> module/Makefile.am:33: 
> module/Makefile.am:33: The usual way to define `LIBTOOL' is to add 
> `AC_PROG_LIBTOOL'
> module/Makefile.am:33: to `configure.ac' and run `aclocal' and 
> `autoconf' again.
> autoreconf: automake failed with exit status: 1
> ------------------
> 
> So obviously I didn't get very far. Just in case it helps, here are some 
> other details: I am using Autoconf 2.59, Automake 1.9.2, and Libtool 
> 2.2. Note that I had to install Libtool myself (because my system didn't 
> have it). My system also didn't have svn installed, and the installation 
> failed (near the end) when I tried to install it. Rather than digging 
> through that problem (which looked complicated), I simply implemented 
> svn on my laptop (which did have svn installed) and then ftp'ed the 
> contents over to the cluster. 
> 
> Do you have any suggestions on how I should proceed? (By the way, what 
> is the reason that configure and other scripts are not included in the 
> svn download? I guess my original thought was that it would be easiest 
> for users if they were included (as they are included in the 3.0.3 
> version that you can download), but I am sure there are good reasons for 
> excluding them - do they change with successive updates, but are easily 
> updated using autoconf, automake, libtool?)
> 
> Sorry for the detailed technical questions, but thanks for any help you 
> can give me! I really appreciate your efforts to make the lastest 
> changes to CitcomS (and other codes) available to us.
> 
> Clint
> 
> 
> 
> On Jan 21, 2009, at 7:38 AM, Eh Tan wrote:
> 
>> Hi Clint,
>>
>> Those "missing" files are not stored in the svn repository and need to
>> be generated by autoconf. The following is the instruction on how to
>> generate those files, copied from "Section 2.11 Installing from the
>> Software Repository" in the manual.
>>
>> ------------------------
>> 2.11.1 Tools You Will Need
>> In addition to the usual system requirements, you will need a handful of
>> additional development tools
>> installed in order to work with the source from the CIG software
>> repository.
>>
>> (...)
>>
>> Second, you must have the GNU tools Autoconf, Automake, and Libtool
>> installed. To check, enter the
>> following commands:
>> $ autoconf --version
>> $ automake --version
>> $ libtoolize --version
>> For more information about these GNU tools, see the GNU website
>> (www.gnu.org/software) <http://www.gnu.org/software)>. The CitcomS
>> v3.0.2 source package was created with Autoconf 2.59, Automake 1.9.2,
>> and Libtool 1.5.6.
>>
>> (...)
>>
>> 2.11.3 Generating the GNU Build System
>> Your working directory should now contain a fresh checkout of CitcomS:
>> $ ls
>> CitcomS
>> $
>>
>> Before you can run configure or make, you must generate the necessary
>> files using the GNU tools. The
>> easiest way to do this is to run autoreconf -i:
>> $ cd CitcomS
>> $ autoreconf -i
>> $ ./configure
>> $ make
>>
>> The autoreconf tool runs Autoconf to generate the configure script from
>> configure.ac. It also runs
>> Automake to generate Makefile.in from Makefile.am in each source 
>> directory.
>>
>> The configure script stores dependency information for source files in
>> hidden subdirectories called .deps.
>> If source files are added, deleted, moved, or renamed – which may happen
>> if you run svn update to merge
>> the latest changes – the make command may report errors for source files
>> which no longer exist. If this
>> happens, clean your existing configuration using the make distclean
>> command, and then re-run configure
>> and make:
>> $ make distclean
>> $ ./configure
>> $ make
>>
>> The make distclean command deletes all files generated by configure,
>> including the Makefiles themselves!
>> Therefore, after running make distclean, you will not be able to run
>> make again until you re-run configure.
>>
>> Regards,
>> ----
>> Eh Tan
>>
>> Staff Scientist
>> Computational Infrastructure for Geodynamics
>> Pasadena, CA 91125
>> (626) 395-1693
>> http://www.geodynamics.org
>>
>>
>>
>> CLINT CONRAD wrote:
>>
>>> Dear CitcomS Developers,
>>>
>>> I tried to download the latest version of CitcomS using the svn
>>> command listed on the CitcomS web page:
>>>
>>> svn checkout http://geodynamics.org/svn/cig/mc/3D/CitcomS/trunk
>>> CitcomS.svn
>>>
>>> When I do this, I find that several key installation files are missing
>>> from the download, such as:
>>> configure
>>> config.h
>>> Makefile.in
>>> as well as several similar files in the various subdirectories (lib,
>>> visual, module, etc.)
>>>
>>> These files are all present in the latest release (3.0.3). However,
>>> because these files are missing from the svn download,
>>> I cannot configure and compile the code. I could copy these files from
>>> the 3.0.3 release (which compiles fine), but I worry
>>> that there will be inconsistencies.
>>>
>>> Are the configuration files and makefiles supposed to be included with
>>> the svn download? If not, how can I get them?
>>> Sorry if I am missing something basic about svn...
>>>
>>> Thanks!
>>> Clint
>>>
>>>
>>>
>>> ---------------------------------------------
>>> Clint Conrad Assistant Professor
>>> Dept. Geology & Geophysics, SOEST, 804 POST
>>> Univ. Hawaii at Manoa ph: 808-956-6649
>>> 1680 East-West Road fax: 808-956-5154
>>> Honolulu, HI 96822 clintc at hawaii.edu <mailto:clintc at hawaii.edu>
>>> http://www.soest.hawaii.edu/GG/FACULTY/conrad
>>> ---------------------------------------------
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> CIG-MC mailing list
>>> CIG-MC at geodynamics.org
>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-mc
>>>
>>>
>>
>> _______________________________________________
>> CIG-MC mailing list
>> CIG-MC at geodynamics.org
>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-mc
> 
> 
> ---------------------------------------------
> Clint Conrad              Assistant Professor
> Dept. Geology & Geophysics,  SOEST,  804 POST
> Univ. Hawaii at Manoa        ph: 808-956-6649
> 1680 East-West Road         fax: 808-956-5154
> Honolulu, HI 96822          clintc at hawaii.edu <mailto:clintc at hawaii.edu>
> http://www.soest.hawaii.edu/GG/FACULTY/conrad
> ---------------------------------------------
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> CIG-MC mailing list
> CIG-MC at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-mc



More information about the CIG-MC mailing list