On Mar 4, 2005, at 11:36 AM, Jwahar Bammi wrote:

Thanks Curt,
I took the refresh from CVS, and that got me past the INT64_C problem,
now i unfortunately ran into the next problem whilst building unittests: Have you seen this before?
(again this is on Linux Fedora 3, gcc 3.4.2 20041017 (Red Hat 3.4.2-6.fc3))


build-unittest:
[mkdir] Created dir: /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/build/debug/ shared/log4cxx-test_obj
[cc] 69 total files to be compiled.
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/include/ log4cxx/helpers/locale.h: In member function `virtual void L7dTestCase::setUp()':
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/include/ log4cxx/helpers/locale.h:40: error: `log4cxx::helpers::Locale::Locale(const log4cxx::helpers::Locale&)' is protected
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/tests/src/ l7dtestcase.cpp:52: error: within this context
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/include/ log4cxx/helpers/locale.h:40: error: `log4cxx::helpers::Locale::Locale(const log4cxx::helpers::Locale&)' is protected
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/tests/src/ l7dtestcase.cpp:56: error: within this context
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/include/ log4cxx/helpers/locale.h:40: error: `log4cxx::helpers::Locale::Locale(const log4cxx::helpers::Locale&)' is protected
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/tests/src/ l7dtestcase.cpp:60: error: within this context
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/include/ log4cxx/helpers/locale.h: In member function `log4cxx::helpers::ResourceBundlePtr LoggerTestCase::getBundle(const log4cxx::LogString&, const log4cxx::LogString&)':
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/include/ log4cxx/helpers/locale.h:40: error: `log4cxx::helpers::Locale::Locale(const log4cxx::helpers::Locale&)' is protected
[cc] /root/Memento/dev/src/trunk/log4cxx-0.98/logging-log4cxx/tests/src/ loggertestcase.cpp:288: error: within this context




No I haven't seen this before. I have no clue why the compiler believes it needs to invoke the Locale copy constructor on these calls.

The offending lines are:

bundles[0] =
ResourceBundle::getBundle(LOG4CXX_STR("L7D"), Locale(LOG4CXX_STR("en"), LOG4CXX_STR("US")));


The definition of ResourceBundle::getBundle is

static ResourceBundlePtr getBundle(const LogString& baseName,
const Locale& locale);


So there should be no need to attempt to copy the Locale after it is created. Could you try rewriting the offending lines like:

Locale localeUS(LOG4CXX_STR("en"), LOG4CXX_STR("US"));
bundles[0] =
ResourceBundle::getBundle(LOG4CXX_STR("L7D"), localeUS);


and see if gcc still complains?



Reply via email to