I am compiling a project with automake, but when I try to run valgrind in the resulting executable, it does not behave as expected, appearing 8 times before actually executing the code I want to check and the heap summary since this code fragment is not displayed at all :
==4601== Memcheck, a memory error detector ==4601== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==4601== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==4601== Command: ./launcher -g ../data/params.txt ==4601== ==4605== ==4605== HEAP SUMMARY: ==4605== in use at exit: 0 bytes in 0 blocks ==4605== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==4605== ==4605== All heap blocks were freed
There were no such problems when compiling with the standard make file, and valgrind would display exactly what I expected. makefile.am , which I use to compile the directory, looks like this:
lib_LTLIBRARIES = libfile_util.la libmath_util.la libgeneral_util.la libparamlist.la libfile_util_la_SOURCES = file_util.c file_util.h libmath_util_la_SOURCES = math_util.c math_util.h libgeneral_util_la_SOURCES = general_util.c general_util.h libparamlist_la_SOURCES = paramlist.c paramlist.h bin_PROGRAMS = launcher generator_CFLAGS = -I/usr/include/muParser generator_SOURCES = generator.c generator.h estimator_SOURCES = estimator.c estimator.h estimator_iwls_SOURCES = estimator_IWLS.c estimator.h estimator_piecewise_SOURCES = estimator_IWLS.c estimator_piecewise.c estimator.h estimator_baseline_SOURCES = estimator_IWLS.c estimator_piecewise.c estimator_baseline.c estimator.h launcher_CFLAGS = -I/usr/include/muParser launcher_SOURCES = launcher.c generator.c estimator.c estimator.h generator.h generator_LDADD = libfile_util.la libmath_util.la libgeneral_util.la libparamlist.la launcher_LDADD = libfile_util.la libmath_util.la libgeneral_util.la libparamlist.la estimator_iwls_LDADD = libfile_util.la libmath_util.la libgeneral_util.la libparamlist.la estimator_piecewise_LDADD = libfile_util.la libmath_util.la libgeneral_util.la libparamlist.la estimator_baseline_LDADD = libfile_util.la libmath_util.la libgeneral_util.la libparamlist.la
Is this a problem with how automake compiles files? If so, what am I doing wrong in the makefile?
source share