Search code examples
cmakefileconfigureautoconfautomake

How can I do in order to generate the makefile with ./configure?


I am trying to install EZTrace which is a tool that aims at generating automatically execution trace from HPC. I downloaded the installation folder from here, https://eztrace.gitlab.io/eztrace/index.html. After extracting it, I found a README file:

Requirements
=============================================
In order to run EZTrace, you need the following software:

  * autoconf 2.63;

  * libelf or libbfd. Otherwise, only eztrace.old would be installed and the
    functionality would be limited, see the FAQ section.
    On Debian, libelf can be installed from command line by the following
    command: apt-get install libelf-dev

  * [Optional] Any MPI implementation.    

Building EZTrace
=============================================
At first, you need to configure EZTrace by invoking the configure script:

$ ./configure --prefix=<WHERE_YOU_INSTALL_EZTRACE>

Options to configure. You can pass several options to the configure script for
specifying where it should find the needed libraries:
--with-litl=$LITL_ROOT or ARG(=no): specify where LiTL is installed
--with-gtg=$GTG_ROOT: specify where GTG is installed.
--with-mpi=$MPI_ROOT: specify where MPI is installed. The mpi.h file must be
  located in the $MPI_ROOT/include/ directory.
--with-mpi-include=<PATH_TO_MPI.H>: specify the directory that contains the
  mpi.h file.
--with-papi=$PAPI_ROOT: specify where PAPI is installed. The papi.h file must be
  located in the $PAPI_ROOT/include directory and libpapi should be in 
  $PAPI_ROOT/lib

Once EZTrace is configured, just type:

$ make
$ make install

I checked if I have already installed the requirements (done). When reaching the ./configure command, I faced a problem that I fixed by typing autoreconf -i.

The problem is that, after executing the ./configure command and when executing the make command, I get this error:

make: *** No targets specified and no makefile found.  Stop.

(it is because the command ./configure doesn't generate a makefile as expected). I only have Makefile.am & Makefile.in.

I try to check this block of commands:

aclocal
autoconf
autoheader
automake --add-missing

and I got:

autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
automake: warning: LINK was already defined in condition USE_CUDA, which is included in condition TRUE ...
src/modules/cuda/Makefile.am:15: ... 'LINK' previously defined here

I want to mention that I'm located in a folder called

"/home/hakim/Téléchargements/eztrace-eztrace-1.1-9"

Any help to generate the makefile, please ?


Solution

    • don't run autoheader - the project is not setup to use it
    • the automake warning is a warning, not an error.

    usually, the simplest way to bootstrap an autotools-project is by running autoreconf -fiv. that will create a configure script which you need to run in order to create the Makefile.

    autoreconf -fiv
    ./configure
    make
    

    EDIT: EZtraze

    the original answer (above) was a generic answer to a generic question ("How can I generate the makefile with ./configure?").

    With a specific project, like EZtrace, it usually helps to read the README. You already quoted the README, but for whatever reasons, it seems that you left out the crucial bit:

    Getting EZTrace
    =============================================
    * You can get the latest stable release on EZTrace website:
      http://eztrace.gforge.inria.fr/
    
    * Current development version is available via GIT
      git clone git://scm.gforge.inria.fr/eztrace/eztrace.git
    
    After getting the latest development version (from GIT), you need to run
    './bootstrap' and only then build the tool.
    

    (both the git version and the release tarballs available on the page you have linked to contain this section).

    It clearly tells you that you must run ./bootstrap first.

    So the answer to your question is: please read the documentation.

    (also note that the build process for a specific software package is off-topic here in general; use the support forum for that software package)