Code Monkey home page Code Monkey logo

Comments (17)

Bendr0id avatar Bendr0id commented on August 15, 2024

Please pull and try again.

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

You like Flash :)
But another error
remove old dir get clear pull
libmicrohttpd instaled

cmake . -DWITH_HTTPD=OFF
-- The C compiler identification is Clang 3.4.1
-- The CXX compiler identification is Clang 3.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found UV: /usr/local/lib/libuv.so
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Found mhd: /usr/local/include
-- Configuring done
-- Generating done
-- Build files have been written to: /xmrigCC
make
.....
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:76:31: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    inline static std::string string()
                              ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
...

Error with -DWITH_HTTPD=OFF|ON

Full error stack:

In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:76:31: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    inline static std::string string()
                              ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:78:36: error: no member named 'to_string' in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::string(".") + std::to_string(APP_VER_MINOR) +
                              ~~~~~^
/xmrigCC/src/version.h:78:63: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::string version = std::to_string(APP_VER_MAJOR) + std::string(".") + std::to_string(APP_VER_MINOR) +
                                                              ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:78:87: error: no member named 'to_string' in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::string(".") + std::to_string(APP_VER_MINOR) +
                                                                                 ~~~~~^
/xmrigCC/src/version.h:79:31: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
                              std::string(".") + std::to_string(APP_VER_BUILD);
                              ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:79:55: error: no member named 'to_string' in namespace 'std'
                              std::string(".") + std::to_string(APP_VER_BUILD);
                                                 ~~~~~^
/xmrigCC/src/version.h:78:21: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::string version = std::to_string(APP_VER_MAJOR) + std::string(".") + std::to_string(APP_VER_MINOR) +
                    ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:86:36: error: no member named 'to_string' in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::to_string(APP_VER_MINOR) + std::to_string...
                              ~~~~~^
/xmrigCC/src/version.h:86:68: error: no member named 'to_string' in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::to_string(APP_VER_MINOR) + std::to_string...
                                                              ~~~~~^
/xmrigCC/src/version.h:86:100: error: no member named 'to_string' in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::to_string(APP_VER_MINOR) + std::to_string...
                                                                                              ~~~~~^
/xmrigCC/src/version.h:86:21: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::string version = std::to_string(APP_VER_MAJOR) + std::to_string(APP_VER_MINOR) + std::to_string...
                    ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:88:21: error: no member named 'stoi' in namespace 'std'
        return std::stoi(version);
               ~~~~~^

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

maybe add option to build only daemon and worker without CC?

from xmrigcc.

Bendr0id avatar Bendr0id commented on August 15, 2024

It's jus a missing include. I'll fix it soon.

from xmrigcc.

Bendr0id avatar Bendr0id commented on August 15, 2024

Could you please open /xmrigCC/src/version.h in text editor and add this above "class Version".

#include
#include
#include

after that just save + make.

from xmrigcc.

Bendr0id avatar Bendr0id commented on August 15, 2024

@monerorus could you please pull and test again?

from xmrigcc.

Bendr0id avatar Bendr0id commented on August 15, 2024

@monerorus any update on this topic?

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

Sory for long response.
Try one more time. Clean and clone.
Error:

In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:78:31: error: implicit instantiation of
      undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
    inline static std::string string()
                              ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:80:36: error: no member named 'to_string'
      in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::strin...
                              ~~~~~^
/xmrigCC/src/version.h:80:63: error: implicit instantiation of
      undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::string version = std::to_string(APP_VER_MAJOR) + std::strin...
                                                              ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:80:87: error: no member named 'to_string'
      in namespace 'std'
  ...version = std::to_string(APP_VER_MAJOR) + std::string(".") + std::to_str...
                                                                  ~~~~~^
/xmrigCC/src/version.h:81:31: error: implicit instantiation of
      undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
                              std::string(".") + std::to_string(APP_VER_BUILD);
                              ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:81:55: error: no member named 'to_string'
      in namespace 'std'
                              std::string(".") + std::to_string(APP_VER_BUILD);
                                                 ~~~~~^
/xmrigCC/src/version.h:80:21: error: implicit instantiation of
      undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::string version = std::to_string(APP_VER_MAJOR) + std::strin...
                    ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:88:36: error: no member named 'to_string'
      in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::to_st...
                              ~~~~~^
/xmrigCC/src/version.h:88:68: error: no member named 'to_string'
      in namespace 'std'
        std::string version = std::to_string(APP_VER_MAJOR) + std::to_string(APP...
                                                              ~~~~~^
/xmrigCC/src/version.h:88:100: error: no member named 'to_string'
      in namespace 'std'
  ...+ std::to_string(APP_VER_MINOR) + std::to_string(APP_VER_BUILD);
                                       ~~~~~^
/xmrigCC/src/version.h:88:21: error: implicit instantiation of
      undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::string version = std::to_string(APP_VER_MAJOR) + std::to_st...
                    ^
/usr/include/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from /xmrigCC/src/cc/Httpd.cpp:29:
/xmrigCC/src/version.h:90:21: error: no member named 'stoi' in
      namespace 'std'
        return std::stoi(version);
               ~~~~~^

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

Fix this error by changing in version.h <string.h> to < string >

#else
#include <string>
#endif

Get anover error:

[ 17%] Building CXX object CMakeFiles/xmrigCCServer.dir/src/cc/Httpd.cpp.o (sig!)
[ 19%] Building CXX object CMakeFiles/xmrigCCServer.dir/src/cc/XMRigCC.cpp.o
[ 20%] Linking CXX executable xmrigCCServer
[ 38%] Built target xmrigCCServer
Scanning dependencies of target xmrigDaemon
[ 39%] Building CXX object CMakeFiles/xmrigDaemon.dir/src/cc/XMRigd.cpp.o
/xmrigCC/src/cc/XMRigd.cpp:71:14: error: use of undeclared identifier 'WEXITSTATUS'
    } while (WEXITSTATUS(status) == EINTR);

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

change to

#else
    } while (status == EINTR);

and build success

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024
 grep -r "WEXITSTATUS" ./src/*
./src/3rdparty/cpp-httplib/test/gtest/gtest-all.cc:  return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;
./src/3rdparty/cpp-httplib/test/gtest/gtest-all.cc:    m << "Exited with exit status " << WEXITSTATUS(exit_code);
./src/cc/XMRigd.cpp:    } while (WEXITSTATUS(status) == EINTR);

Did i change WEXITSTATUS() in these files too?

from xmrigcc.

Bendr0id avatar Bendr0id commented on August 15, 2024

No need to change these files. It's test code only.

#else
    } while (status == EINTR);

I'm not 100% sure if with this fix the restart is still working.

Could you please share all the needed changes so that i can integrate it into master.

Much appreciate!

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

Yap. Restart not working, for Daemon builded on FreeBSD. Other daemons (get from releases page) restart fine.

[2018-01-10 03:05:19] accepted (5/0) diff 3990 (91 ms)
[2018-01-10 03:05:20] [CC-Client] Command: RESTART received -> restart
[2018-01-10 03:05:20] no active pools, stop mining

And aslo all miners on this server (FreeBSD) are offline. But data is refresh and looks fine.

#git diff
diff --git a/src/cc/XMRigd.cpp b/src/cc/XMRigd.cpp
index 24078fc..39d9857 100644
--- a/src/cc/XMRigd.cpp
+++ b/src/cc/XMRigd.cpp
@@ -68,7 +68,7 @@ int main(int argc, char **argv) {
                std::this_thread::sleep_for(std::chrono::milliseconds(5000));
        }
 #else
-    } while (WEXITSTATUS(status) == EINTR);
+    } while (status == EINTR);
 #endif
 }

diff --git a/src/version.h b/src/version.h

index 5c12a54..2c1a2bd 100644
--- a/src/version.h
+++ b/src/version.h
@@ -68,7 +68,7 @@
 #   endif
 #include <string>
 #else
-#include <string.h>
+#include <string>
 #endif

from xmrigcc.

Bendr0id avatar Bendr0id commented on August 15, 2024

Solution for the offline miners: check the system clock on server and your PC where you open the dashboard. I bet it's drifted.

Currently the offline detection is in the dashboard and it takes last connect timestamp from the server to compare. Maybe not optimal but was dmthey easiest approach to implement.

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

Yes time is different. Close this issue.
changes to fix build is:

git diff
diff --git a/src/cc/XMRigd.cpp b/src/cc/XMRigd.cpp
index 24078fc..de07fc2 100644
--- a/src/cc/XMRigd.cpp
+++ b/src/cc/XMRigd.cpp
@@ -24,6 +24,7 @@

 #include <stdlib.h>
 #include <string>
+#include <sys/wait.h>

 #ifdef WIN32
     #define WIN32_LEAN_AND_MEAN  /* avoid including junk */

diff --git a/src/version.h b/src/version.h
index 5c12a54..2c1a2bd 100644
--- a/src/version.h
+++ b/src/version.h
@@ -68,7 +68,7 @@
 #   endif
 #include <string>
 #else
-#include <string.h>
+#include <string>
 #endif

from xmrigcc.

Bendr0id avatar Bendr0id commented on August 15, 2024

Working with latest master?

from xmrigcc.

monerorus avatar monerorus commented on August 15, 2024

Yes. build fine.

from xmrigcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.