[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't repeat build.
From: |
Dan Smithers |
Subject: |
Re: Can't repeat build. |
Date: |
Thu, 22 Jan 2009 10:35:32 +0000 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
Thanks for the reply Ralph,
>> I have configure.ac in the top directories and Makefile.am in all source
>> directories and top directories.
>>
>> I use a sequence
>>
>> autoreconf --install
>> cd build
>> ../configure <options>
>> make
>>
>> Sometime this works fine. On other occasions I get an error
>>
>> automake-1.10: no Automake input file found for
>> `activation_analyser/src/Makefile.in'
>> automake-1.10: no input file among supplied arguments.
>
> Can you post the command that caused this error, including the 'make'
> sequence leading up to it, please?
cd ~/v1700/components/build/gcc/debug/
make
make all-recursive
make[1]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug'
Making all in helpnet
make[2]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet'
Making all in src
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet/src'
Making all in include
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet/include'
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet'
make[2]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/helpnet'
Making all in app_server
make[2]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server'
Making all in .
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server'
Making all in src
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server/src'
Making all in lib
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server/lib'
Making all in include
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server/include'
make[2]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/app_server'
Making all in alarm_manager
make[2]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/alarm_manager'
Making all in .
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/alarm_manager'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/alarm_manager'
Making all in src
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/alarm_manager/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/alarm_manager/src'
make[2]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/alarm_manager'
Making all in libag
make[2]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag'
Making all in include
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag/include'
Making all in src
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag/src'
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag'
make[2]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/libag'
Making all in astranet
make[2]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/astranet'
Making all in .
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/astranet'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/astranet'
Making all in src
make[3]: Entering directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/astranet/src'
cd ../../../../../astranet && /bin/bash
/homesint/dwhs1/v1700/components/astranet/config/missing --run
automake-1.10 --foreign astranet/src/Makefile
automake-1.10: no Automake input file found for `astranet/src/Makefile'
automake-1.10: no input file found among supplied arguments
make[3]: *** [../../../../../astranet/src/Makefile.in] Error 1
make[3]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/astranet/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug/astranet'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/homesint/dwhs1/v1700/components/build/gcc/debug'
make: *** [all] Error 2
Compilation exited abnormally with code 2 at Thu Jan 22 09:58:51
>> sometime this happens because I have edited a Makefile.am without
>> clearing out the build directory and repeating the autoreconf step. Is
>> this the wrong way to use autotools?
>
> No, it should work fine.
>
> Are you using AM_MAINTAINER_MODE by the way?
No (at least I don't think so)
>> Also, I am a bit confused about when to use $(srcdir) and $(top_builddir).
>
> Well, imagine instead of
> cd build
> ../configure
>
> I would do
>
> mkdir /dev/shm/build
> cd /dev/shm/build
> /path/to/configure <options>
I think that this is pretty much what I do - except that I have build in
the top source directory.
> then everything that is below /dev/shm should be part of the build tree,
> thus referenced using relative paths or $(top_builddir). Everything in
> the source tree may be referenced using $(srcdir) or $(top_srcdir). The
> choice between the latter two can be based upon taste or convenience
> sometimes, typically done so that it can be easily reused elsewhere.
> It does have some consequences though: when the file is used as target
> or dependency, 'make' will typically not identify paths like ../sub/file
> and ./file (and most non-GNU will not even identify the latter file
> plain file).
>
>> I have several related executables and libraries.
>> In Makefile.am I use
>> AM_CPPFLAGS=$(srcdir)/../include
>
> Did you mean
> AM_CPPFLAGS=-I$(srcdir)/../include
>
> here?
yes - The development machine is not on the internet so I
have to copy the text (or export files on a USB stick).
>> to get the exported header files for the current target
>>
>> $(srcdir)/../../libname/include to get exported header files for library
>> name.
>
>> bin_PROGRAM=exec
>> exec_SOURCES=exec.c
>> exec_LDADD=$(top_builddir)/../libname/src/.libs -lname
>
> Please replace this line with
> exec_LDADD=$(top_builddir)/../libname/src/libname.la
>
> but I do wonder: $(top_builddir)/.. points outside of the build tree.
> Is that an error or on purpose?
It points to a neighbouring tree set up by autotools.
A reduced version of the auto files and build structure:
components - directory containing source for executables and libraries.
==========
components/build - directory containing build trees.
================
This is populated by autoconf and automake. I actually have several
trees for different compilers and debug and release builds under this.
components/configure.ac
=======================
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT([v1700], [0.2], address@hidden)
AC_CONFIG_AUX_DIR([config])
AM_CONFIG_HEADER([config.h])
AC_PREFIX_DEFAULT([/opt/astraguard/])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
#AC_PROG_RANLIB
AC_PROG_LIBTOOL
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lhelp_net':
#AC_CHECK_LIB([help_net], [hn_channel_new])
# FIXME: Replace `main' with a function in `-lm':
#AC_CHECK_LIB([m], [main])
# FIXME: Replace `main' with a function in `-lpthread':
#AC_CHECK_LIB([pthread], [main])
# FIXME: Replace `main' with a function in `-lrt':
#AC_CHECK_LIB([rt], [main])
# FIXME: Replace `main' with a function in `-lz':
#AC_CHECK_LIB([z], [main])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h
string.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h sys/vfs.h
syslog.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRCOLL
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([alarm bzero clock_gettime ftime ftruncate gettimeofday
inet_ntoa memset mkdir rmdir select socket strcasecmp strchr strndup
strdup strncasecmp strrchr strstr])
AC_CONFIG_SUBDIRS([libag astranet])
BOOSTDIR=[/vol/build/boost_1_37_0]
AC_SUBST([BOOSTDIR])
AC_OUTPUT([Makefile
astranet/Makefile
astranet/src/Makefile
libag/Makefile
libag/src/Makefile
libag/include/Makefile])
components/Makefile.am
======================
AUX_DIST = $(ac_aux_dir)/config.guess \
$(ac_aux_dir)/config.sub \
$(ac_aux_dir)/install-sh \
$(ac_aux_dir)/ltconfig \
$(ac_aux_dir)/ltmain.sh \
$(ac_aux_dir)/mdate-sh \
$(ac_aux_dir)/missing \
$(ac_aux_dir)/mkinstalldirs
SUBDIRS= libag astranet
EXTRA_DIST= bootstrap.sh
MAINTAINERCLEANFILES=Makefile.in configure $(AUX_DIST)
components/astranet - directory containing programme code
===================
components/astranet/configure.ac
================================
# preamble
AC_INIT([astranet], [0.1])
AC_PREREQ([2.61])
# specify alternative directory
AC_CONFIG_AUX_DIR([config])
# set up auto make - require version 1.10
AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.10])
# specify config header name.
AM_CONFIG_HEADER([config.h])
# set default path prefix
AC_PREFIX_DEFAULT([/opt/astraguard/])
# require programs
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
# require functions
AC_FUNC_VPRINTF
BOOSTDIR=[/vol/build/boost_1_37_0]
AC_SUBST([BOOSTDIR])
AC_OUTPUT(Makefile src/Makefile)
components/astranet/Makefile.am
SUBDIRS= . src
EXTRA_DIST=bootstrap.sh
MAINTAINERCLEANFILES=Makefile.in
components/astranet/src/Makefile.am
===================================
AM_CPPFLAGS=-I$(BOOSTDIR)/include -I$(srcdir)/../../libag/include
AM_CFLAGS=-Wall -Werror
AM_CXXFLAGS=$(AM_CFLAGS)
bin_PROGRAMS=alms
alms_SOURCES=neighbours.cpp alms.cpp
alms_LDADD= -L$(BOOSTDIR)/lib -lboost_regex
-L$(top_builddir)/../libag/src -lagthread -lagmessage -laglogger -lagcomms
EXTRA_DIST=
MAINTAINERCLEANFILES=Makefile.in
components/libag - directory containing libraries
================
components/libag/configure.ac
=============================
# preamble
AC_INIT([libcomms], [0.1])
AC_PREREQ([2.61])
# specify alternative directory
AC_CONFIG_AUX_DIR([config])
# set up auto make - require version 1.10
AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.10])
# specify config header name.
AM_CONFIG_HEADER([config.h])
# set default path prefix
AC_PREFIX_DEFAULT([/opt/astraguard/])
# require programs
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
# require functions
AC_FUNC_VPRINTF
BOOSTDIR=[/vol/build/boost_1_37_0]
AC_SUBST([BOOSTDIR])
AC_OUTPUT(Makefile src/Makefile include/Makefile)
components/libag/Makefile.am
============================
SUBDIRS= include src
EXTRA_DIST=bootstrap.sh
MAINTAINERCLEANFILES=Makefile.in
components/libag/src/Makefile.am
AM_CFLAGS=-Wall -Werror
AM_CXXFLAGS=$(AM_CFLAGS)
AM_CPPFLAGS=-I$(srcdir)/../include
lib_LTLIBRARIES=libaglogger.la libagmessage.la libagcomms.la libagthread.la
libaglogger_la_SOURCES=logger.cpp
libagmessage_la_SOURCES=msg_fact.cpp text_msg.cpp
libagthread_la_SOURCES=thread.cpp mutex.cpp message.cpp pool_thread.cpp
thread_pool.cpp
libagcomms_la_SOURCES=socket.cpp socket_factory.cpp ip_address.cpp
comms_except.cpp
EXTRA_DIST=
noinst_PROGRAMS=test_comms test_log test_msg test_thread
test_comms_SOURCES=test_comms.cpp
test_comms_LDADD=-lagcomms -lagmessage -lboost_regex -lagthread -laglogger
test_log_SOURCES=test_log.cpp
test_log_LDADD= -laglogger -lagthread -lpthread
test_msg_SOURCES=test_msg.cpp
test_msg_LDADD=-lagmessage -lboost_regex -laglogger -lagthread
test_thread_SOURCES=test_thread.cpp
test_thread_LDADD=-lagthread -lpthread -laglogger
MAINTAINERCLEANFILES=Makefile.in
components/libag/include/Makefile.am
====================================
include_HEADERS=ag_defs.h ag_except.h ag_log.h if_comms.h log.cpp
text_msg.h ag_log.def ag_thread.h if_msg.h
MAINTAINERCLEANFILES=Makefile.in
thanks
dan
Re: Can't repeat build., Ralf Wildenhues, 2009/01/24