LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Compiling Mintest 5.4.1 on slackware current (https://www.linuxquestions.org/questions/slackware-14/compiling-mintest-5-4-1-on-slackware-current-4175700571/)

SlackCoder 09-13-2021 08:56 AM

Compiling Mintest 5.4.1 on slackware current
 
Hi, I'm having trouble compiling the latest minetest on Slackware current, anyone know what the problem maybe? Its C++ related.

Code:

        In file included from /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:21:
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:444:36: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
          444 |        ClientInterface(const std::shared_ptr<con::Connection> &con);
              |                                    ^~~~~~~~~~
        In file included from /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:21:
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:34:1: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
          33 | #include <set>
          +++ |+#include <memory>
          34 | #include <mutex>
        In file included from /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:21:
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:444:46: error: expected ‘,’ or ‘...’ before ‘<’ token
          444 |        ClientInterface(const std::shared_ptr<con::Connection> &con);
              |                                              ^
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:517:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
          517 |        std::shared_ptr<con::Connection> m_con;
              |              ^~~~~~~~~~
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:517:9: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
          517 |        std::shared_ptr<con::Connection> m_con;
              |        ^~~
        /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:604:1: error: no declaration matches ‘ClientInterface::ClientInterface(const std::shared_ptr<con::Connection>&)’
          604 | ClientInterface::ClientInterface(const std::shared_ptr<con::Connection> & con)
              | ^~~~~~~~~~~~~~~
        In file included from /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:21:
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:439:7: note: candidates are: ‘ClientInterface::ClientInterface(const ClientInterface&)’
          439 | class ClientInterface {
              |      ^~~~~~~~~~~~~~~
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:444:9: note:                ‘ClientInterface::ClientInterface(int)’
          444 |        ClientInterface(const std::shared_ptr<con::Connection> &con);
              |        ^~~~~~~~~~~~~~~
        /tmp/SBo/minetest-5.4.1/src/clientiface.h:439:7: note: ‘class ClientInterface’ defined here
          439 | class ClientInterface {
              |      ^~~~~~~~~~~~~~~
        /tmp/SBo/minetest-5.4.1/src/clientiface.cpp: In member function ‘void ClientInterface::send(session_t, irr::u8, NetworkPacket*, bool)’:
        /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:701:9: error: ‘m_con’ was not declared in this scope; did you mean ‘con’?
          701 |        m_con->Send(peer_id, channelnum, pkt, reliable);
              |        ^~~~~
              |        con
        /tmp/SBo/minetest-5.4.1/src/clientiface.cpp: In member function ‘void ClientInterface::sendToAll(NetworkPacket*)’:
        /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:711:25: error: ‘m_con’ was not declared in this scope; did you mean ‘con’?
          711 |                        m_con->Send(client->peer_id,
              |                        ^~~~~
              |                        con
        /tmp/SBo/minetest-5.4.1/src/clientiface.cpp: In member function ‘void ClientInterface::sendToAllCompat(NetworkPacket*, NetworkPacket*, irr::u16)’:
        /tmp/SBo/minetest-5.4.1/src/clientiface.cpp:736:17: error: ‘m_con’ was not declared in this scope; did you mean ‘con’?
          736 |                m_con->Send(client->peer_id,
              |                ^~~~~
              |                con
        make[2]: *** [src/CMakeFiles/minetest.dir/build.make:3254: src/CMakeFiles/minetest.dir/clientiface.cpp.o] Error 1
        make[1]: *** [CMakeFiles/Makefile2:465: src/CMakeFiles/minetest.dir/all] Error 2
        make: *** [Makefile:156: all] Error 2


ponce 09-13-2021 10:09 AM

you need this upstream patch.

garpu 09-13-2021 10:26 AM

Good to know...(I'm a few behind on minetest.) It's a nifty idea, but doesn't feel fully fleshed out yet. Rather, it doesn't have the modding scene that Minecraft has yet. It's definitely getting there, though.

SlackCoder 09-17-2021 08:14 AM

thanks @ponce, I've created a slackbuild with the necessary patch. For anyone interested:

https://git.server.ky/slackcoder/slackbuilds/tree/


All times are GMT -5. The time now is 04:27 PM.