Hi,
Today while I am trying to compile the latest source code, I got the following build errors:
gcc -DHAVE_CONFIG_H -I. -I../../src -I../../lib -I../../src -I../../src/base -I../../src/object -I../../torture/tortutils -DTEST_DATA_PATH=\"../../torture/testdata\" -Inocheck/ -g -g -MT pdf-stm-write.o -MD -MP -MF .deps/pdf-stm-write.Tpo -c -o pdf-stm-write.o `test -f 'base/stm/pdf-stm-write.c' || echo './'`base/stm/pdf-stm-write.c
base/stm/pdf-stm-write.c: In function 'mem_stm_fixture_setup':
base/stm/pdf-stm-write.c:52: error: 'test_name' undeclared (first use in this function)
base/stm/pdf-stm-write.c:52: error: (Each undeclared identifier is reported only once
base/stm/pdf-stm-write.c:52: error: for each function it appears in.)
make[2]: ***
[pdf-stm-write.o] Error 1
make[2]: Leaving directory `/home/GNU-pdf/gnupdf.gaurav/torture/unit'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/GNU-pdf/gnupdf.gaurav/torture'
make: *** [all-recursive] Error 1
FYI, I used the following command during configure time:
./configure -prefix=/home/GNU-pdf/inst --enable-debug-base --enable-debug-object --enable-debug-document --enable-debug-page --enable-nocheck CFLAGS=-g
Bug Analysis - After looking at the source code, it seems to me that in "torture/unit/base/stm/pdf-stm-write.c" file, "fail_if()" is used inside the mem_stm_fixture_setup() function which is NOT a valid usage scenario. fail_if() macro used a variable 'test_name' but this variable is initialized only in the START_TEST macro which is not getting called in this particular case. I double check it, and currently this
function ( 'mem_stm_fixture_setup') is the only place where we are calling the fail_if without invoking the START_TEST earlier. Also, function "tcase_add_checked_fixture" used in the same file i.e. in pdf-stm-write.c file is not defined anywhere. So, even if you fix the first problem, person will get the undefined function error for this during linking time. I would suggest that the author of this file take a relook at this file and do the necessary changes.
Let me know in case you guys need more information regarding this. Hope, this will help.
--
Regards,
Gaurav Aggarwal