On 05/17/2010 10:04 AM, Kim van der Riet wrote:
On Sun, 2010-05-16 at 17:05 +0200, Mario Grotschar wrote:
Hello,
I have downloaded qpid-cpp-0.6. Make / make intall works but make check will
fail (Please see following output of make ckeck). As i can see the -Werror
option is on, so i dont understand the line "cc1plus: warnings being treated
as errors".
I believe that if a warning is generated, then it is normal for the
compiler to state that warnings are being treated as errors on the first
occurrence if the -Werror option is set.
Furhtermore I have noticed that the following test examples are missing ( I
am looking for them in src/tests as described in
https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt) :
# ./direct_producer
# ./listener
# ./server
# ./client
These examples are located in the cpp/examples directory, not
cpp/src/tests. I cannot find in the README file above (at least in the
latest version on trunk) where the tests directory is mentioned. The
examples are built as part of "make check"; it is possible that the
error you are experiencing below may stop the build before it gets to
the examples.
Making check in managementgen
make[1]: Entering directory
`/home/volare/mom_brokers/qpidc-0.6/managementgen'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory
`/home/volare/mom_brokers/qpidc-0.6/managementgen'
Making check in etc
make[1]: Entering directory `/home/volare/mom_brokers/qpidc-0.6/etc'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/home/volare/mom_brokers/qpidc-0.6/etc'
Making check in src
make[1]: Entering directory `/home/volare/mom_brokers/qpidc-0.6/src'
Making check in .
make[2]: Entering directory `/home/volare/mom_brokers/qpidc-0.6/src'
make[2]: Leaving directory `/home/volare/mom_brokers/qpidc-0.6/src'
Making check in tests
make[2]: Entering directory `/home/volare/mom_brokers/qpidc-0.6/src/tests'
if test -d /home/volare/mom_brokers/qpidc-0.6/src/tests/../../../python -a
-d /home/volare/mom_brokers/qpidc-0.6/src/tests/../../../specs; \
then make -C
/home/volare/mom_brokers/qpidc-0.6/src/tests/../../../python install
PREFIX=/home/volare/mom_brokers/qpidc-0.6/src/tests/python
PYTHON_LIB=/home/volare/mom_brokers/qpidc-0.6/src/tests/python
EXEC_PREFIX=/home/volare/mom_brokers/qpidc-0.6/src/tests/python/commands
AMQP_SPEC_DIR=/home/volare/mom_brokers/qpidc-0.6/src/tests/../../../specs; \
else echo "WARNING: python client not built, missing one of
/home/volare/mom_brokers/qpidc-0.6/src/tests/../../../python
/home/volare/mom_brokers/qpidc-0.6/src/tests/../../../specs"; fi
WARNING: python client not built, missing one of
/home/volare/mom_brokers/qpidc-0.6/src/tests/../../../python
/home/volare/mom_brokers/qpidc-0.6/src/tests/../../../specs
make libshlibtest.la libdlclose_noop.la unit_test perftest txtest
latencytest echotest client_test topic_listener topic_publisher publish
consume header_test failover_soak declare_queues replaying_sender
resuming_receiver txshift txjob PollerTest DispatcherTest qpid_ping datagen
qrsh_server qrsh_run qrsh qpid_stream
make[3]: Entering directory `/home/volare/mom_brokers/qpidc-0.6/src/tests'
make[3]: `libshlibtest.la' is up to date.
make[3]: `libdlclose_noop.la' is up to date.
make[3]: `unit_test' is up to date.
make[3]: `perftest' is up to date.
make[3]: `txtest' is up to date.
make[3]: `latencytest' is up to date.
make[3]: `echotest' is up to date.
make[3]: `client_test' is up to date.
make[3]: `topic_listener' is up to date.
make[3]: `topic_publisher' is up to date.
make[3]: `publish' is up to date.
make[3]: `consume' is up to date.
make[3]: `header_test' is up to date.
make[3]: `failover_soak' is up to date.
make[3]: `declare_queues' is up to date.
make[3]: `replaying_sender' is up to date.
make[3]: `resuming_receiver' is up to date.
make[3]: `txshift' is up to date.
make[3]: `txjob' is up to date.
make[3]: `PollerTest' is up to date.
make[3]: `DispatcherTest' is up to date.
make[3]: `qpid_ping' is up to date.
make[3]: `datagen' is up to date.
depbase=`echo qrsh_server.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I../../src -I../../include -I../../include
-I../../src -I../../src -Werror -pedantic -Wall -Wextra -Wno-shadow
-Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
-Wvolatile-register-var -Winvalid-pch -Wno-system-headers
-Woverloaded-virtual -DBOOST_TEST_DYN_LINK -g -O2 -MT qrsh_server.o -MD -MP
-MF $depbase.Tpo -c -o qrsh_server.o qrsh_server.cpp&&\
mv -f $depbase.Tpo $depbase.Po
cc1plus: warnings being treated as errors
qrsh_server.cpp: In member function ‘void
qpid::tests::QrshServer::getNames()’:
qrsh_server.cpp:489: error: ignoring return value of ‘int fscanf(FILE*,
const char*, ...)’, declared with attribute warn_unused_result
qrsh_server.cpp: In member function ‘void
qpid::tests::QrshServer::execute(const qpid::client::Message&)’:
qrsh_server.cpp:590: error: ignoring return value of ‘int system(const
char*)’, declared with attribute warn_unused_result
make[3]: *** [qrsh_server.o] Error 1
make[3]: Leaving directory `/home/volare/mom_brokers/qpidc-0.6/src/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/home/volare/mom_brokers/qpidc-0.6/src/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/volare/mom_brokers/qpidc-0.6/src'
make: *** [check-recursive] Error 1
It might be helpful if you could tell us which distribution you are
using, and what the compiler version is.
It looks on the face of it that your compiler is tuning on a
"warn_unused_result" warning check - possibly as part of the -Wall flag
which is set during configure, and this is picking up these two lines in
the qrsh_server.cpp file - which do indeed ignore the result of two
system calls, and should be fixed at some point. I would see if you can
override that particular warning flag, or turn off the -Werror flag -
that should get you a compile you can use.
Adding a (void) cast before the calls should silence the compiler. If that does
the trick attach a patch to a JIRA and we can commit it.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]