On 3-Oct-10, at 4:35 PM, Markus Hoenicka wrote:

> Toby Thain writes:
>> But 'make check' in the top directory then fails:
>>   ...
>>   test_dbi.c:33:27: error: cgreen/cgreen.h: No such file or directory
>>
>> 'make check' in tests/ fails in the same way:
>>
>>   ~/workspace/libdbi-drivers/tests $ make check
>>   make  test_dbi
>>   make[1]: Entering directory `/home/toby/workspace/libdbi-drivers/
>> tests'
>>   if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -DDBDIR= 
>> \"/
>> usr/local/var/lib/libdbi\"   -g -DDBI_DRIVER_DIR=\"/usr/local/lib/dbd
>
> This is a bit weird. Look at the options that define the directories
> that should be checked for headers. tests/Makefile.am contains the
> following definition:
>
> INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/ 
> tests/cgreen/include -...@includedir@
>
> On my box, this expands to the following in Makefile:
>
> INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/ 
> tests/cgreen/include -I${prefix}/include
>
> Interestingly, on your box all -I options that reference $(top_srcdir)
> seem to expand to something useless. What definition do you see in
> your Makefile? Also, do you configure and build in the source
> directory or in a separate build directory?
>
> Also, what OS did you use for your tests, and what are the versions of
> automake and autoconf?


Hi Markus

I am doing this on Linux. However, it is possible that this checkout  
is very stale. I had this error at the top level ./configure:

        *** [Gentoo] sanity check failed! ***
        *** libtool.m4 and ltmain.sh have a version mismatch! ***
        *** (libtool.m4 = 1.5.26, ltmain.sh = 2.2.6b) ***

        Please run:

          libtoolize --copy --force


After autoreconf -f -i, the configure succeeded.

        t...@deepthought ~/workspace/libdbi-drivers/tests $ automake --version
        automake (GNU automake) 1.9.6
        ...
        t...@deepthought ~/workspace/libdbi-drivers/tests $ autoconf --version
        autoconf (GNU Autoconf) 2.65


It looks like cgreen is now built OK:

make[3]: Entering directory `/home/toby/workspace/libdbi-drivers/tests/ 
cgreen'
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -Iinclude    -O20 -ffast-math - 
D_REENTRANT -fsigned-char -g -O2 -MT unit.o -MD -MP -MF ".deps/ 
unit.Tpo" -c -o unit.o `test -f 'src/unit.c' || echo './'`src/unit.c; \
        then mv -f ".deps/unit.Tpo" ".deps/unit.Po"; else rm -f ".deps/ 
unit.Tpo"; exit 1; fi

... snip ...

if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -Iinclude    -O20 -ffast-math - 
D_REENTRANT -fsigned-char -g -O2 -MT cdash_reporter.o -MD -MP -MF  
".deps/cdash_reporter.Tpo" -c -o cdash_reporter.o `test -f 'src/ 
cdash_reporter.c' || echo './'`src/cdash_reporter.c; \
        then mv -f ".deps/cdash_reporter.Tpo" ".deps/cdash_reporter.Po"; else  
rm -f ".deps/cdash_reporter.Tpo"; exit 1; fi
rm -f libcgreen.a
ar cru libcgreen.a unit.o messaging.o breadcrumb.o reporter.o  
assertions.o vector.o mocks.o constraint.o parameters.o  
text_reporter.o cdash_reporter.o
ranlib libcgreen.a
make[3]: Leaving directory `/home/toby/workspace/libdbi-drivers/tests/ 
cgreen'


However, on 'make check', I get compile warnings and errors.

$ make check
Making check in drivers
make[1]: Entering directory `/home/toby/workspace/libdbi-drivers/ 
drivers'
Making check in mysql
make[2]: Entering directory `/home/toby/workspace/libdbi-drivers/ 
drivers/mysql'
Converting dbd_mysql.sgml to PDF...
...
Making check in cgreen
make[2]: Entering directory `/home/toby/workspace/libdbi-drivers/tests/ 
cgreen'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/home/toby/workspace/libdbi-drivers/tests/ 
cgreen'
make[2]: Entering directory `/home/toby/workspace/libdbi-drivers/tests'
make  test_dbi
make[3]: Entering directory `/home/toby/workspace/libdbi-drivers/tests'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../include -I../tests/ 
cgreen/include -I/usr/local/include -DDBDIR=\"/usr/local/var/lib/libdbi 
\"   -DDBI_DRIVER_DIR=\"/usr/local/lib/dbd\" -g -MT test_dbi.o -MD -MP  
-MF ".deps/test_dbi.Tpo" -c -o test_dbi.o test_dbi.c; \
        then mv -f ".deps/test_dbi.Tpo" ".deps/test_dbi.Po"; else rm -f  
".deps/test_dbi.Tpo"; exit 1; fi
test_dbi.c:124: warning: this decimal constant is unsigned only in ISO  
C90
test_dbi.c:124: warning: this decimal constant is unsigned only in ISO  
C90
test_dbi.c:126:68: warning: integer constant is so large that it is  
unsigned
test_dbi.c:126: warning: this decimal constant is unsigned only in ISO  
C90
test_dbi.c:126: warning: integer constant is too large for 'long' type

... many similar warnings omitted ...

test_dbi.c: In function 'main':
test_dbi.c:543: error: expected expression before '<<' token
test_dbi.c:550: error: expected expression before '==' token
test_dbi.c:560: error: expected expression before '>>' token
...
test_dbi.c: In function 'test_custom_function_parameters':
test_dbi.c:2608: warning: format '%d' expects type 'int', but argument  
2 has type 'long long unsigned int'
test_dbi.c:2640: warning: format '%d' expects type 'int', but argument  
2 has type 'long int'
test_dbi.c:2640: warning: format '%d' expects type 'int', but argument  
3 has type 'long int'
test_dbi.c: In function 'test_dbi_conn_queryf':
test_dbi.c:2856: warning: integer constant is too large for 'long' type
test_dbi.c:2882: warning: integer constant is too large for 'long' type
test_dbi.c:2890: warning: integer constant is too large for 'long' type
test_dbi.c: In function 'test_dbi_result_get_as_string':
test_dbi.c:3491: warning: assignment makes pointer from integer  
without a cast
test_dbi.c:3492: warning: assignment makes pointer from integer  
without a cast

... many similar warnings omitted ...

test_dbi.c: In function 'test_dbi_result_get_datetime':
test_dbi.c:4312: warning: assignment makes integer from pointer  
without a cast
test_dbi.c:4313: warning: passing argument 3 of 'assert_string_equal_'  
makes pointer from integer without a cast
../tests/cgreen/include/cgreen/assertions.h:35: note: expected 'const  
char *' but argument is of type 'time_t'
test_dbi.c:4315: warning: assignment makes integer from pointer  
without a cast
test_dbi.c:4316: warning: passing argument 3 of 'assert_string_equal_'  
makes pointer from integer without a cast
../tests/cgreen/include/cgreen/assertions.h:35: note: expected 'const  
char *' but argument is of type 'time_t'
make[3]: *** [test_dbi.o] Error 1
make[3]: Leaving directory `/home/toby/workspace/libdbi-drivers/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/home/toby/workspace/libdbi-drivers/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/toby/workspace/libdbi-drivers/tests'
make: *** [check-recursive] Error 1


It seems to me that the warnings should be eliminated.

Not sure what to think about the compile error. Do you want to  
investigate (if you can reproduce), or shall I?

--Toby


>
> regards,
> Markus
>
>
>
> -- 
> Markus Hoenicka
> http://www.mhoenicka.de
> AQ score 38
>
> ------------------------------------------------------------------------------
> Virtualization is moving to the mainstream and overtaking non- 
> virtualized
> environment for deploying applications. Does it make network security
> easier or more difficult to achieve? Read this whitepaper to  
> separate the
> two and get a better understanding.
> http://p.sf.net/sfu/hp-phase2-d2d
> _______________________________________________
> Libdbi-drivers-devel mailing list
> Libdbi-drivers-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to