Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I got the latest, unreleased version of the ctags source code from the svn repository using

svn co https://ctags.svn.sourceforge.net/svnroot/ctags

I ran ./configure, which failed with the following error:

config.status: creating Makefile
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir setting
config.status: error: cannot find input file: config.h.in
[mirror@home ctags-5.7]$ echo $?
1

Then I created an empty file named config.h.in, and now ./configure succeed.

configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir setting
config.status: creating config.h
[mirror@home ctags-5.7]$ echo $?
0

Running make still failed.

[mirror@home ctags-5.7]$ make
gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c args.c
In file included from args.c:17:
/usr/include/stdio.h:88: error: two or more data types in declaration specifiers
make: *** [args.o] Error 1
  • Why did this not work?
  • How do I build ctags from the svn repository?
share|improve this question

3 Answers 3

up vote 3 down vote accepted

It fails because (in contrast to prepared source tarballs) the svn repositroy does not contain intermediate files used by autotools.

I'm not too familar with AT or ctags, but try running automake and autoconf before running ./configure again. The procedure is probably located somewhere in a INSTALL file or a documentation folder, you might want to look for that.

Addendum:

According to an (unofficial) Gentoo ebuild, running autoreconf should be enough.

Addendum 2:

As I said, I'm no AT guru, I'm told there are only a two-digit number of those in the world.

config.h is not included in the svn repository because it is not written by a human and it only depends on the other files in the repository. The developers have to re-make it often anyway as they change things, so it would just be an extra file to download and then immediately delete when checking out changes.

On the other hand, it is included in the tarballs in order to make the building of the software less painful. I believe it also prevents some problems when people have different versions of AT than the developers. There's no real backside to it in this case, as it does not depend on which system or architecture you build for and the other files "aren't usually" modified when building from the tarball. That is, unless you have some patches you need to apply. Then you may need to regenerate something anyway.

My approach to AT is to try different things until it works or I give it up. Different files come out of different commands, and some of the commands start other commands magically. In the Wikipedia page, there is a flowchart. I don't find it helpful, but perhaps you might.

I suggest staying away from it. If you think you need to use it for your own project, go use cmake or scons or whatever else works well and is simple at that time.

share|improve this answer
    
why config.h.in is not included by svn repo? i can find this find in its tarball from official web site. –  hugemeow Sep 23 '12 at 9:22
    
what is the difference between autoconf and autoreconf? –  hugemeow Sep 23 '12 at 9:22

Why don't you do $ sudo apt-get install exuberant-ctags or whatever fits your Linux flavour?

share|improve this answer
1  
Because the stable version of ctags has bugs that are only fixed in current version (and look when was the latest stable version of ctags released). –  AnonymousLurker Sep 22 '12 at 17:49
1  
A loooooooooong time ago, indeed. But @hugemeow is apparently trying to build 5.7 which is not particularly cutting edge. –  romainl Sep 22 '12 at 21:26
    
I agree, you are trying to point that using the repository to install things is the best option, however I happened to know that this isn't the best option in this particular case - for ctags, hence my comment. I am sure that latest stable vanilla ctags has bugs, maybe in distro repos some patches are applied when packages are built. –  AnonymousLurker Sep 23 '12 at 2:26

I had a similar issue on my linux system, which I resolved by running "autoheader" and "autoconf" (from the "trunk" subdirectory of the unpacked tarball) before running "./configure". The subsequent "make" and "make install" operations ran without a hitch.

It seems autoconf knows how to make configure from configure.at (which was in the tarball), but you have to run autoheader first in order to create the .in files which are used by configured to generate the header files which are then used when you actually run ./configure.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.