Thanks guys,
however I'm still curious - clearly a release make shouldn't break like
this.
I noticed the cast to void e.g. (void)::write(notifyFd, ".", 1); and
some Googling seems to suggest that that should help (though actually
using the return value sensibly seems neater) but I've no idea why the
void cast doesn't work in my Ubuntu system when I assume it does for
whoever tested the release.
My C++ is a bit rusty and I'm afraid that I don't know how "declared
with attribute warn_unused_result" is actually enabled in the first
place - is it a compiler switch? I'm guessing it's somewhere in the
prototype for "write" that gets enabled by some preprocessor magic.
Perhaps the gcc defaults are different for Ubuntu than for Redhat?
Clearly it's "work-around-able" but presumably the intention is that
distributions should *just work*.
Frase
Brandon Pedersen wrote:
Same here...just used --disable-warnings
On Nov 27, 2011 9:33 AM, "Peter Fetterer" <[email protected]> wrote:
I had this problem with my builds for Ubuntu Linux.
You can add --disable-warnings to the end of your ./configure command.
Will make the build not stop on warnings.
--
Peter Fetterer
On 11/27/2011 6:14 AM, Fraser Adams wrote:
OK so I fixed that one by doing:
ssize_t unused; // Prevents ignoring return value of ‘ssize_t
write..’, declared with attribute warn_unused_result
unused = ::write.......
in Daemon.cpp
but it cropped up again in LockFile.cpp
I noticed
cc1plus: warnings being treated as errors
qpid/sys/posix/LockFile.cpp: In destructor
‘qpid::sys::LockFile::~LockFile()’:
qpid/sys/posix/LockFile.cpp:61: error: ignoring return value of ‘int
lockf(int, int, __off_t)’, declared with attribute warn_unused_result
So clearly it's bombing out due to warnings rather than "real errors".
arguably a good thing but.......
Seems like there may be some issues with the code base, but surely
someone else would have seen similar. Any reason why make on my box is
treating warnings as errors whereas that's (I assume) not happening
with whoever packaged the distro.
Fraser Adams wrote:
Hi all,
I (finally) decided to upgrade to qpid 0.12
I downloaded from
**http://mirror.catn.com/pub/apache//qpid/0.12/qpid-0.12.tar.gz*
*I did
./bootstrap
and
./configure
With no problems, but unfortunately with make I get the following
fatal error
qpid/broker/Daemon.cpp: In member function ‘void
qpid::broker::Daemon::fork()’:
qpid/broker/Daemon.cpp:96: error: ignoring return value of ‘ssize_t
write(int, const void*, size_t)’, declared with attribute
warn_unused_result
qpid/broker/Daemon.cpp:102: error: ignoring return value of ‘ssize_t
write(int, const void*, size_t)’, declared with attribute
warn_unused_result
make[3]: *** [qpid/broker/Daemon.lo] Error 1
make[3]: Leaving directory `/home/fadams/java/qpid-0.12/cpp/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/fadams/java/qpid-0.12/cpp/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/fadams/java/qpid-0.12/cpp/src'
make: *** [all-recursive] Error 1
I'm compiling with the following:
gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.4.1-4ubuntu9'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --enable-multiarch --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4
--program-suffix=-4.4 --enable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-objc-gc --disable-werror
--with-arch-32=i486 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)
I've previously successfully build qpid 0.8 and 0.10 and whilst I've
had to tweak the make install I've never had it break during the
basic make. I have deleted everything from my previous 0.10 install
so it should be in a clean state, though of course it currently means
I don't have a working qpidd on my box :-(
I'd appreciate any thoughts - I'm guessing this is a bug in the
makefile. Has anyone else had this issue?
Cheers,
Frase.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]