LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2005, 03:52 PM   #1
sterrenkijker
Member
 
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302

Rep: Reputation: 31
cannot compile my program anymore (autotools, gnu make)


Hi everybody,

I am writing a program in C, using autotools and stuff. I reinstalled my OS (Debian Sarge), and continued programming. At first everything was fine, but when I did
Code:
aclocal && autoconf && automake
I got the following message:
Code:
configure.ac: 4: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
automake: configure.ac: required file `./config.guess' not found
automake: configure.ac: required file `./config.sub' not found
When I do "./configure && make" everything is fine, but "make dist" doesn't work anymore:
Code:
corien@sarge:~/redcat/redcat$ make dist
rm -rf redcat-0.0.1alfa14
mkdir redcat-0.0.1alfa14
chmod 777 redcat-0.0.1alfa14
here=`cd . && pwd`; \
top_distdir=`cd redcat-0.0.1alfa14 && pwd`; \
distdir=`cd redcat-0.0.1alfa14 && pwd`; \
cd . \
  && automake-1.4 --include-deps --build-dir=$here --srcdir-name=. --output-dir=$top_distdir --gnu Makefile
configure.ac: 4: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
automake: configure.ac: required file `./config.guess' not found
automake: configure.ac: required file `./config.sub' not found
make: *** [distdir] Fout 1
The required files indeed don't exist, but they used to be there. Does anyone know how to solve this problem?

Thanks,

Corien
 
Old 08-05-2005, 03:49 AM   #2
bigapple
LQ Newbie
 
Registered: Oct 2004
Location: Hangzhou.China
Distribution: Suse 9.3 | redhat 9.0 | Solaris 10
Posts: 29

Rep: Reputation: 15
hi,
Step 1: you should make sure that the following packages be installed on your box correctly.
there are :
1. GNU Automake
2. GNU Autoconf
3. GNU m4
4. perl
5. GNU Libtool
(you can use rpm -q packagename to confirm it)
Step 2 As I know, to use the auto tools chian,first you should run
autoscan
after the running,a file named "configure.scan" would be generated in the current directory.you must modify the file to specify the project name and some else, following is an example:
Code:
AC_INIT(hello.c) 
AM_INIT_AUTOMAKE(hello, 1.0) 
dnl Checks for programs. 
AC_PROG_CC 
dnl Checks for libraries. 
dnl Checks for header files. 
dnl Checks for typedefs, structures, and compiler ch aracteristics. 
dnl Checks for library functions. 
AC_OUTPUT(Makefile)
Step 3:
Run aclocal and autoconf,then the file "aclocal.m4 " and "configure" would be generated.
Step 4:
vi a file named "Makefile.am" contains the following text:
Code:
AUTOMAKE_OPTIONS= foreign 
bin_PROGRAMS= hello 
hello_SOURCES= hello.c
Step 5:run automake --add-missing
Last:you can run ./configure and make to continue

This is just a demo to use auto tools china,and the hello.c file just contain the printf function.I have test it successful on
my Suse box and AIX box.To konw more detail ,you can view some more Documents

Last edited by bigapple; 08-05-2005 at 03:51 AM.
 
Old 08-05-2005, 07:59 AM   #3
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
I am writing a program in C, using autotools and stuff. I reinstalled my OS (Debian Sarge), and continued programming.
The problem is a that a newer version of autoconf (and automake?) was installed by default. The newer autoconf (v2.5x) is not compatible with the older one (v.2.1x).

Either update your configure.in to configure.ac for the newer autoconf, or install the debian-sarge package called "autoconf2.13" and read the debian-doc's on how to use it.

Quoted the description of "autoconf2.13" below:
Quote:
Package: autoconf2.13
Description: automatic configure script builder (obsolete version)
Obsolete compatibility package of Autoconf 2.13. For use only with
packages that cannot easily be updated to use Autoconf 2.50+.
.
This package provides compatibility wrappers for autoconf,
autoheader, and autoreconf that attempt to automatically choose which
version of Autoconf to use, based on some simple heuristics. For
information on these heuristics or how to force use of a particular
Autoconf version, see /usr/share/doc/autoconf2.13/README.Debian.gz.
Don't forget to check "automake" for the same issue.

Last edited by Hko; 08-05-2005 at 08:00 AM.
 
Old 08-06-2005, 12:02 PM   #4
sterrenkijker
Member
 
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302

Original Poster
Rep: Reputation: 31
Thanks for your replies. "automake --add-missing" seemed to solve the problem. I'm an autotools fool .
 
Old 08-19-2005, 04:48 AM   #5
adrianmak
Member
 
Registered: Dec 2002
Posts: 56

Rep: Reputation: 15
does it mean that the automake version is outdated ?
 
Old 07-27-2006, 04:52 AM   #6
umeshg666
LQ Newbie
 
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
Hi every body,

Please could u help me to find a freeware linux install builder tool to install 4 packages of my application in the path specified by the user.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Impossible to use autotools to compile a MySQL client program? rylan76 Linux - Software 0 10-08-2005 08:34 AM
Using GNU autotools properly MadCactus Linux - Software 0 08-19-2004 07:36 AM
GNU autotools in Rh 9 broken? Worked fine in 7.3... rylan76 Red Hat 1 04-17-2004 02:27 PM
using gnu c compiler to compile objective c qanopus Linux - Software 1 10-20-2003 11:06 AM
Gnu Autotools jinksys Programming 0 10-08-2003 12:26 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration