snikulov's picture

Hi,

I've disable all logging with PION_DISABLE_LOGGING in PionConfig.hpp and unable to build pion-net-0.5.8. Is it expected behavior?

Errors as follows:

on Linux box (configured with --disable-logging):

Making all in src
make[2]: Entering directory `/home/snikulov/pion/pion-net-0.5.8/net/src'
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../common/include/pion -I/home/snikulov/pion/pion-net-0.5.8/common/include -I../include -pthread -D_REENTRANT -I/usr/local/include/boost-1_34_1 -DPION_NETWORK_LIBRARY -O2 -Wall -Wno-strict-aliasing -DNDEBUG -MT HTTPServer.lo -MD -MP -MF .deps/HTTPServer.Tpo -c -o HTTPServer.lo HTTPServer.cpp
g++ -DHAVE_CONFIG_H -I. -I../../common/include/pion -I/home/snikulov/pion/pion-net-0.5.8/common/include -I../include -pthread -D_REENTRANT -I/usr/local/include/boost-1_34_1 -DPION_NETWORK_LIBRARY -O2 -Wall -Wno-strict-aliasing -DNDEBUG -MT HTTPServer.lo -MD -MP -MF .deps/HTTPServer.Tpo -c HTTPServer.cpp -fPIC -DPIC -o .libs/HTTPServer.o
../include/pion/net/HTTPResponseWriter.hpp: In member function 'virtual void pion::net::HTTPResponseWriter::handleWrite(const boost::system::error_code&, size_t)':
../include/pion/net/HTTPResponseWriter.hpp:152: error: invalid lvalue in increment
../include/pion/net/HTTPResponseWriter.hpp:156: error: invalid lvalue in increment
../include/pion/net/HTTPResponseWriter.hpp:158: error: invalid lvalue in increment
make[2]: *** [HTTPServer.lo] Error 1
make[2]: Leaving directory `/home/snikulov/pion/pion-net-0.5.8/net/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/snikulov/pion/pion-net-0.5.8/net'
make: *** [all-recursive] Error 1

On winxp box (defined to 1 PION_DISABLE_LOGGING in PionConfig.hpp):

1>Compiling...
1>WebServer.cpp
1>D:\LIB\BOOST\include\boost-1_36\boost/asio/detail/win_iocp_serial_port_service.hpp(240) : warning C4100: 'impl' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(105) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(127) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4510: 'boost::array' : default constructor could not be generated
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(410) : see reference to class template instantiation 'boost::array' being compiled
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4610: class 'boost::array' can never be instantiated - user defined constructor required
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(72) : warning C4100: 'value' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/WebService.hpp(59) : warning C4100: 'value' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(152) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(156) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(158) : error C2105: '++' needs l-value
1>HTTPServer.cpp
1>D:\LIB\BOOST\include\boost-1_36\boost/asio/detail/win_iocp_serial_port_service.hpp(240) : warning C4100: 'impl' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(105) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(127) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4510: 'boost::array' : default constructor could not be generated
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(410) : see reference to class template instantiation 'boost::array' being compiled
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4610: class 'boost::array' can never be instantiated - user defined constructor required
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(72) : warning C4100: 'value' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(152) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(156) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(158) : error C2105: '++' needs l-value
1>HTTPCookieAuth.cpp
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(50) : warning C4512: 'pion::PionException' : assignment operator could not be generated
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(24) : see declaration of 'pion::PionException'
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(70) : warning C4512: 'pion::BadAssertException' : assignment operator could not be generated
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(56) : see declaration of 'pion::BadAssertException'
1>D:\LIB\BOOST\include\boost-1_36\boost/asio/detail/win_iocp_serial_port_service.hpp(240) : warning C4100: 'impl' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(105) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(127) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(292) : warning C4244: 'argument' : conversion from 'const unsigned int' to 'unsigned short', possible loss of data
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4510: 'boost::array' : default constructor could not be generated
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(410) : see reference to class template instantiation 'boost::array' being compiled
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4610: class 'boost::array' can never be instantiated - user defined constructor required
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(40) : warning C4512: 'pion::net::HTTPAuth::UnknownOptionException' : assignment operator could not be generated
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(36) : see declaration of 'pion::net::HTTPAuth::UnknownOptionException'
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(72) : warning C4100: 'value' : unreferenced formal parameter
1>D:\LIB\BOOST\include\boost-1_36\boost/random/detail/pass_through_engine.hpp(49) : warning C4512: 'boost::random::detail::pass_through_engine' : assignment operator could not be generated
1> with
1> [
1> UniformRandomNumberGenerator=boost::random::mersenne_twister
1> ]
1> D:\LIB\BOOST\include\boost-1_36\boost/random/variate_generator.hpp(92) : see reference to class template instantiation 'boost::random::detail::pass_through_engine' being compiled
1> with
1> [
1> UniformRandomNumberGenerator=boost::random::mersenne_twister
1> ]
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPCookieAuth.hpp(161) : see reference to class template instantiation 'boost::variate_generator' being compiled
1> with
1> [
1> Engine=boost::mt19937 &,
1> Distribution=boost::uniform_int<>
1> ]
1>D:\LIB\BOOST\include\boost-1_36\boost/random/detail/pass_through_engine.hpp(49) : warning C4512: 'boost::random::detail::pass_through_engine' : assignment operator could not be generated
1> with
1> [
1> UniformRandomNumberGenerator=boost::random::detail::pass_through_engine >
1> ]
1> D:\LIB\BOOST\include\boost-1_36\boost/random/variate_generator.hpp(127) : see reference to class template instantiation 'boost::random::detail::pass_through_engine' being compiled
1> with
1> [
1> UniformRandomNumberGenerator=boost::random::detail::pass_through_engine >
1> ]
1>D:\LIB\BOOST\include\boost-1_36\boost/random/variate_generator.hpp(129) : warning C4512: 'boost::variate_generator' : assignment operator could not be generated
1> with
1> [
1> Engine=boost::mt19937 &,
1> Distribution=boost::uniform_int<>
1> ]
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(152) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(156) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(158) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPServer.hpp(66) : warning C4244: 'argument' : conversion from 'unsigned int' to 'unsigned short', possible loss of data
1>..\..\..\pion\net\src\HTTPCookieAuth.cpp(42) : warning C4244: 'argument' : conversion from 'time_t' to 'boost::uint32_t', possible loss of data
1>HTTPBasicAuth.cpp
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(50) : warning C4512: 'pion::PionException' : assignment operator could not be generated
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(24) : see declaration of 'pion::PionException'
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(70) : warning C4512: 'pion::BadAssertException' : assignment operator could not be generated
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/PionException.hpp(56) : see declaration of 'pion::BadAssertException'
1>D:\LIB\BOOST\include\boost-1_36\boost/asio/detail/win_iocp_serial_port_service.hpp(240) : warning C4100: 'impl' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(105) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(127) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(292) : warning C4244: 'argument' : conversion from 'const unsigned int' to 'unsigned short', possible loss of data
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4510: 'boost::array' : default constructor could not be generated
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(410) : see reference to class template instantiation 'boost::array' being compiled
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\LIB\BOOST\include\boost-1_36\boost/array.hpp(164) : warning C4610: class 'boost::array' can never be instantiated - user defined constructor required
1> with
1> [
1> T=const char,
1> N=8192
1> ]
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_flag' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPConnection.hpp(657) : warning C4100: 'ssl_context' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(40) : warning C4512: 'pion::net::HTTPAuth::UnknownOptionException' : assignment operator could not be generated
1> D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(36) : see declaration of 'pion::net::HTTPAuth::UnknownOptionException'
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPAuth.hpp(72) : warning C4100: 'value' : unreferenced formal parameter
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(152) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(156) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/HTTPResponseWriter.hpp(158) : error C2105: '++' needs l-value
1>D:\WORK\BEHOLDER\my_wbranch\include\pion/net/TCPServer.hpp(66) : warning C4244: 'argument' : conversion from 'unsigned int' to 'unsigned short', possible loss of data
1>Generating Code...
1>Build log was saved at "file://d:\WORK\BEHOLDER\my_wbranch\build\pion\net\pion-net.dir\Debug\BuildLog.htm"
1>pion-net - 12 error(s), 47 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Mike Dickey's picture
That's a bug

Thanks for reporting it!

I added a ticket for this to trac:

http://trac.atomiclabs.com/ticket/254

Submitted by Mike Dickey on Mon, 07/21/2008 - 09:32.
Mike Dickey's picture
Fixed --disable-loggin

Patch is in SVN and also attached to the ticket

Submitted by Mike Dickey on Mon, 07/21/2008 - 15:51.
snikulov's picture
so what about PION_STATIC_LINKING?

see my another post
http://pion.org/node/90

Submitted by snikulov on Mon, 07/21/2008 - 14:08.