Hello Mohammad,
I ran make check after including the valgrind commands;
The configure script was
./configure --prefix=/home/cnaw/bin LDFLAGS=-L/home/cnaw/bin/lib
CPPFLAGS=-I/home/cnaw/bin/include --disable-shared CFLAGS="-g -O0"
and the good news is that all tests pass:
============================================================================
Testsuite summary for GNU Astronomy Utilities 0.2
============================================================================
# TOTAL: 48
# PASS: 47
# SKIP: 1
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[4]: Leaving directory `/home/cnaw/gnuastro-0.2/tests'
make[3]: Leaving directory `/home/cnaw/gnuastro-0.2/tests'
make[2]: Leaving directory `/home/cnaw/gnuastro-0.2/tests'
make[2]: Entering directory `/home/cnaw/gnuastro-0.2'
make check-local
make[3]: Entering directory `/home/cnaw/gnuastro-0.2'
===================================================================
===================================================================
Your build of Gnuastro 0.2 didn't fail on any tests.
To install Gnuastro, please run the commands below:
make install
(The following "Leaving directory" notices can be ignored.)
===================================================================
===================================================================
Now, if I run configure as
./configure --prefix=/home/cnaw/bin LDFLAGS=-L/home/cnaw/bin/lib
CPPFLAGS=-I/home/cnaw/bin/include --disable-shared
make check will fail, and I am appending the errors, obtained using:
valgrind --leak-check=full --show-reachable=yes
(this is after I had used valgrind --leak-check=yes following your
suggestion; valgrind actually suggests using this command).
make check works when
./configure --prefix=/home/cnaw/bin LDFLAGS=-L/home/cnaw/bin/lib
CPPFLAGS=-I/home/cnaw/bin/include CFLAGS="-g -O0"
is used. It fails with -g -O3 and -g -O2.
Hopefully this is helpful.
Cheers,
Christopher