cannot compile my program anymore (autotools, gnu make)
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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:
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.