Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-360

log4cxx does not compile on kernel 2.6.29.6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 0.10.0
    • None
    • Build
    • None
    • OS: Slackware 13.0
      Kernel: 2.6.29.6
      Architecture: x86_64
      GCC: g++ (GCC) 4.3.3

    Description

      Tried to compile log4cxx via ./configure && make && make install.

      Compiling log4cxx failed with message:

      inputstreamreader.cpp: In member function 'virtual log4cxx::LogString log4cxx::helpers::InputStreamReader::read(log4cxx::helpers::Pool&)':
      inputstreamreader.cpp:66: error: 'memmove' was not declared in this scope

      Therefore i added '#include <string.h>' to inputstreamreader.cpp:

      #include <log4cxx/logstring.h>
      #include <log4cxx/helpers/inputstreamreader.h>
      #include <log4cxx/helpers/exception.h>
      #include <log4cxx/helpers/pool.h>
      #include <log4cxx/helpers/bytebuffer.h>
      #include <string.h>

      Due to the next compiling try the following error occured:

      socketoutputstream.cpp: In member function 'virtual void log4cxx::helpers::SocketOutputStream::write(log4cxx::helpers::ByteBuffer&, log4cxx::helpers::Pool&)':
      socketoutputstream.cpp:52: error: 'memcpy' was not declared in this scope

      Same solution as before. I added '#include <string.h>' to socketoutputstream.cpp:

      #include <log4cxx/logstring.h>
      #include <log4cxx/helpers/socketoutputstream.h>
      #include <log4cxx/helpers/socket.h>
      #include <log4cxx/helpers/bytebuffer.h>
      #include <string.h>

      During the 3rd try the following error occured:

      console.cpp: In function 'int main(int, char**)':
      console.cpp:63: error: 'strcmp' was not declared in this scope

      Same solution:

      #include <stdlib.h>
      #include <string.h>
      #include <log4cxx/logger.h>
      #include <log4cxx/consoleappender.h>
      #include <log4cxx/simplelayout.h>
      #include <log4cxx/logmanager.h>
      #include <iostream>
      #include <locale.h>

      After tree times adding string.h as a header all compiled well and after installation a test programm including '#include <log4cxx/logger.h>' compiled well.

      Attachments

        1. cppFolder_stringInclude.patch
          1 kB
          Markus Mazurczak
        2. exampleFolder_stringInclude.patch
          0.5 kB
          Markus Mazurczak

        Activity

          People

            carnold@apache.org Curt Arnold
            shelltux Markus Mazurczak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: