Menu

#1 make sockets fails

open
nobody
None
5
2008-06-18
2008-06-18
Anonymous
No

I'm trying to compile OpenVeoh on my Fedora 9 box, but it sadly fails when I run "make sockets". This is the make output:

$ LC_ALL=C make sockets
cd src/sockets-cpp && make -f Makefile
make[1]: Entering directory `/home/martin/Desktop/desktop/openveoh2/src/sockets-cpp'
g++ -Wall -g -MD -D_VERSION='"2.1.7"' -O2 -DLINUX -c -o Utility.o Utility.cpp
Utility.cpp: In static member function 'static bool Utility::u2ip(const std::string&, ipaddr_t&)':
Utility.cpp:254: error: 'memcpy' was not declared in this scope
Utility.cpp: In static member function 'static void Utility::l2ip(ipaddr_t, std::string&)':
Utility.cpp:275: error: 'memset' was not declared in this scope
Utility.cpp:277: error: 'memcpy' was not declared in this scope
Utility.cpp: In static member function 'static void Utility::l2ip(const in_addr&, std::string&)':
Utility.cpp:285: error: 'memset' was not declared in this scope
Utility.cpp: In static member function 'static std::string Utility::Sa2String(sockaddr*)':
Utility.cpp:480: error: 'memcpy' was not declared in this scope
Utility.cpp: In static member function 'static bool Utility::u2ip(const std::string&, sockaddr_in&, int)':
Utility.cpp:534: error: 'memset' was not declared in this scope
Utility.cpp:553: error: 'memcpy' was not declared in this scope
Utility.cpp:573: error: 'memcpy' was not declared in this scope
Utility.cpp: In static member function 'static bool Utility::reverse(sockaddr*, socklen_t, std::string&, std::string&, int)':
Utility.cpp:771: error: 'memcpy' was not declared in this scope
make[1]: *** [Utility.o] Error 1
make[1]: Leaving directory `/home/martin/Desktop/desktop/openveoh2/src/sockets-cpp'
make: *** [sockets] Error 2

Discussion

  • Martin Jürgens

    Martin Jürgens - 2008-06-30

    Logged In: YES
    user_id=1160423
    Originator: NO

    subscribing even though the project seems to be dead sadly.. :(

     
  • Ben Boeckel

    Ben Boeckel - 2008-07-02

    Logged In: YES
    user_id=1545841
    Originator: NO

    I have a patch which fixes this. GCC 4.3 doesn't include standard headers by default anymore. there are a couple instances where #include <cstring> are needed. Here's what I have to fix it:

    ===================================================================
    --- src/sockets-cpp/HttpdForm.cpp (revision 15)
    +++ src/sockets-cpp/HttpdForm.cpp (working copy)
    @@ -35,6 +35,7 @@
    #include "Parse.h"
    #include "IFile.h"
    #include "HttpdForm.h"
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    namespace SOCKETS_NAMESPACE {
    Index: src/sockets-cpp/Debug.cpp
    ===================================================================
    --- src/sockets-cpp/Debug.cpp (revision 15)
    +++ src/sockets-cpp/Debug.cpp (working copy)
    @@ -1,5 +1,6 @@
    #include "Debug.h"
    #include <stdarg.h>
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    Index: src/sockets-cpp/Utility.cpp
    ===================================================================
    --- src/sockets-cpp/Utility.cpp (revision 15)
    +++ src/sockets-cpp/Utility.cpp (working copy)
    @@ -40,6 +40,7 @@
    #include <pthread.h>
    #endif
    #include <map>
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    namespace SOCKETS_NAMESPACE {
    Index: src/sockets-cpp/MemFile.cpp
    ===================================================================
    --- src/sockets-cpp/MemFile.cpp (revision 15)
    +++ src/sockets-cpp/MemFile.cpp (working copy)
    @@ -31,6 +31,7 @@
    #pragma warning(disable:4786)
    #endif
    #include <stdarg.h>
    +#include <cstring>

    #include "MemFile.h"

    Index: src/sockets-cpp/Ipv4Address.cpp

    --- src/sockets-cpp/Ipv4Address.cpp (revision 15)
    +++ src/sockets-cpp/Ipv4Address.cpp (working copy)
    @@ -26,6 +26,7 @@
    #ifndef _WIN32
    #include <netdb.h>
    #endif
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE

    --- src/sockets-cpp/HttpdForm.cpp (revision 15)
    +++ src/sockets-cpp/HttpdForm.cpp (working copy)
    @@ -35,6 +35,7 @@
    #include "Parse.h"
    #include "IFile.h"
    #include "HttpdForm.h"
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    namespace SOCKETS_NAMESPACE {
    Index: src/sockets-cpp/Debug.cpp
    ===================================================================
    --- src/sockets-cpp/Debug.cpp (revision 15)
    +++ src/sockets-cpp/Debug.cpp (working copy)
    @@ -1,5 +1,6 @@
    #include "Debug.h"
    #include <stdarg.h>
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    Index: src/sockets-cpp/Utility.cpp
    ===================================================================
    --- src/sockets-cpp/Utility.cpp (revision 15)
    +++ src/sockets-cpp/Utility.cpp (working copy)
    @@ -40,6 +40,7 @@
    #include <pthread.h>
    #endif
    #include <map>
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    namespace SOCKETS_NAMESPACE {
    Index: src/sockets-cpp/MemFile.cpp
    ===================================================================
    --- src/sockets-cpp/MemFile.cpp (revision 15)
    +++ src/sockets-cpp/MemFile.cpp (working copy)
    @@ -31,6 +31,7 @@
    #pragma warning(disable:4786)
    #endif
    #include <stdarg.h>
    +#include <cstring>

    #include "MemFile.h"

    Index: src/sockets-cpp/Ipv4Address.cpp

    --- src/sockets-cpp/Ipv4Address.cpp (revision 15)
    +++ src/sockets-cpp/Ipv4Address.cpp (working copy)
    @@ -26,6 +26,7 @@
    #ifndef _WIN32
    #include <netdb.h>
    #endif
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE

     
  • Ben Boeckel

    Ben Boeckel - 2008-07-02

    Logged In: YES
    user_id=1545841
    Originator: NO

    Darn it, pasted twice. Here's a batter version:

    Index: src/sockets-cpp/HttpdForm.cpp

    --- src/sockets-cpp/HttpdForm.cpp (revision 15)
    +++ src/sockets-cpp/HttpdForm.cpp (working copy)
    @@ -35,6 +35,7 @@
    #include "Parse.h"
    #include "IFile.h"
    #include "HttpdForm.h"
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    namespace SOCKETS_NAMESPACE {
    Index: src/sockets-cpp/Debug.cpp
    ===================================================================
    --- src/sockets-cpp/Debug.cpp (revision 15)
    +++ src/sockets-cpp/Debug.cpp (working copy)
    @@ -1,5 +1,6 @@
    #include "Debug.h"
    #include <stdarg.h>
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    Index: src/sockets-cpp/Utility.cpp
    ===================================================================
    --- src/sockets-cpp/Utility.cpp (revision 15)
    +++ src/sockets-cpp/Utility.cpp (working copy)
    @@ -40,6 +40,7 @@
    #include <pthread.h>
    #endif
    #include <map>
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE
    namespace SOCKETS_NAMESPACE {
    Index: src/sockets-cpp/MemFile.cpp
    ===================================================================
    --- src/sockets-cpp/MemFile.cpp (revision 15)
    +++ src/sockets-cpp/MemFile.cpp (working copy)
    @@ -31,6 +31,7 @@
    #pragma warning(disable:4786)
    #endif
    #include <stdarg.h>
    +#include <cstring>

    #include "MemFile.h"

    Index: src/sockets-cpp/Ipv4Address.cpp

    --- src/sockets-cpp/Ipv4Address.cpp (revision 15)
    +++ src/sockets-cpp/Ipv4Address.cpp (working copy)
    @@ -26,6 +26,7 @@
    #ifndef _WIN32
    #include <netdb.h>
    #endif
    +#include <cstring>

    #ifdef SOCKETS_NAMESPACE

     

Log in to post a comment.

MongoDB Logo MongoDB