when trying to compile log4cxx-0.9.7-r4 with gcc-4.3, a few files complain about memcpy references. A quick google search about the memcpy issue revealed that they're missing a #include <cstring.h> in the files, so i was able to quickly create a patch. The existing ebuild only has gcc fix for gcc-4.1, so you'll need to copy the log4cxx to your local portage overlay and add a line underneath the gcc-4.1 patch. As far as i can tell, you need both patches for it to compile. Reproducible: Always Steps to Reproduce: 1. emerge log4cxx with gcc 4.3 or greater 2. sit back and watch it fail 3.
save the following output to log4cxx-0.9.7-gcc43.patch (or whatever) and update the ebuild to include the patch: --- log4cxx-0.9.7/src/socketoutputstream.cpp 2004-05-10 12:38:06.000000000 +0000 +++ log4cxx-0.9.7-gcc43/src/socketoutputstream.cpp 2009-01-29 09:41:44.000000000 +0000 @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + +#include <cstring> #include <log4cxx/helpers/socketoutputstream.h> #include <log4cxx/helpers/socket.h> #include <log4cxx/helpers/loglog.h> --- log4cxx-0.9.7/src/stringtokenizer.cpp 2004-05-10 12:38:08.000000000 +0000 +++ log4cxx-0.9.7-gcc43/src/stringtokenizer.cpp 2009-01-29 09:42:17.000000000 +0000 @@ -15,6 +15,7 @@ */ #include <log4cxx/helpers/stringtokenizer.h> +#include <cstring> using namespace log4cxx; using namespace log4cxx::helpers; --- log4cxx-0.9.7/src/timezone.cpp 2004-05-10 12:38:13.000000000 +0000 +++ log4cxx-0.9.7-gcc43/src/timezone.cpp 2009-01-29 09:42:37.000000000 +0000 @@ -16,7 +16,7 @@ #include <log4cxx/helpers/timezone.h> #include <locale> - +#include <cstring> int getYear(int64_t date) { --- log4cxx-0.9.7/src/xmlsocketappender.cpp 2004-05-10 12:38:16.000000000 +0000 +++ log4cxx-0.9.7-gcc43/src/xmlsocketappender.cpp 2009-01-29 09:43:02.000000000 +0000 @@ -22,6 +22,7 @@ #include <log4cxx/xml/xmllayout.h> #include <log4cxx/level.h> #include <log4cxx/helpers/transform.h> +#include <cstring> using namespace log4cxx; using namespace log4cxx::helpers;
This bug is not fixed, until the patch is in the tree.
(In reply to comment #1) > save the following output to log4cxx-0.9.7-gcc43.patch (or whatever) and update > the ebuild to include the patch: > ... Thanks, but this is not enough: In file included from drfatestcase.cpp:21: ../../include/log4cxx/dailyrollingfileappender.h:49: warning: 'typedef' was ignored in this declaration drfatestcase.cpp: In member function 'void DRFATestCase::testRC1()': drfatestcase.cpp:73: warning: deprecated conversion from string constant to 'char*' drfatestcase.cpp:86: error: 'memset' was not declared in this scope drfatestcase.cpp: In member function 'void DRFATestCase::testRC2()': drfatestcase.cpp:127: warning: deprecated conversion from string constant to 'char*' drfatestcase.cpp:142: error: 'memset' was not declared in this scope make[3]: *** [drfatestcase.o] Error 1 make[3]: Leaving directory `/var/portage/tmp/portage/dev-libs/log4cxx-0.9.7-r4/work/log4cxx-0.9.7/tests/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/portage/tmp/portage/dev-libs/log4cxx-0.9.7-r4/work/log4cxx-0.9.7/tests/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/portage/tmp/portage/dev-libs/log4cxx-0.9.7-r4/work/log4cxx-0.9.7/tests' make: *** [all-recursive] Error 1 * * ERROR: dev-libs/log4cxx-0.9.7-r4 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3074: Called die * The specific snippet of code: * emake -j1 || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/log/portage/dev-libs:log4cxx-0.9.7-r4:20090623-061007.log'. * The ebuild environment file is located at '/var/portage/tmp/portage/dev-libs/log4cxx-0.9.7-r4/temp/environment'.
This is fixed by 0.10.0.