Giter Club home page Giter Club logo

Comments (9)

X-Ryl669 avatar X-Ryl669 commented on September 26, 2024

Sorry, I forgot to commit those files. Meanwhile, you can replace both line 859 and 873 of Address.cpp by int speed = 0; to remove both symbol requirement.

BTW, you can compile without those files by defining MQTTOnlyBSDSocket to 1

from emqtt5.

X-Ryl669 avatar X-Ryl669 commented on September 26, 2024

Should be pushed by now, please try again.

from emqtt5.

wrmbaron avatar wrmbaron commented on September 26, 2024

Thanks for the quick fix. However, I still have to do the following to make it compile:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4a47cc..7065217 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.13)
+cmake_minimum_required(VERSION 3.9)

# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
@@ -11,4 +11,4 @@ option(REDUCED_FOOTPRINT "Whether to enable reduced footprint for the client cod


add_subdirectory(lib)
-add_subdirectory(tests)
\ No newline at end of file
+add_subdirectory(tests)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 0009966..71467de 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -33,4 +33,4 @@ IF(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
ENDIF()


-target_link_libraries(MQTTc LINK_PUBLIC eMQTT5)
+target_link_libraries(MQTTc LINK_PUBLIC eMQTT5 pthread dl)
diff --git a/tests/ClassPath/src/LinuxSpecific.cpp b/tests/ClassPath/src/LinuxSpecific.cpp
index d3d85d9..abbbed5 100644
--- a/tests/ClassPath/src/LinuxSpecific.cpp
+++ b/tests/ClassPath/src/LinuxSpecific.cpp
@@ -1,5 +1,6 @@
+#include "../../lib/include/Types.hpp"
+
#if defined(_LINUX)
-#include "../../include/Types.hpp"

    // We have to build this out of the standard header, as we are using kernel stuff that conflicts with userspace include
    #include <sys/ioctl.h>

I guess linking will be a problem like this on windows (probably conditional linking needed), but I cannot check on that at the moment. Feel free to apply any of the above.

from emqtt5.

X-Ryl669 avatar X-Ryl669 commented on September 26, 2024

I have to think about this a bit more. This is clearly linux specific and I'm pretty sure there's a good cmake rule to let it add the right library & flags by itself without having to list pthread and dl by hand.

from emqtt5.

X-Ryl669 avatar X-Ryl669 commented on September 26, 2024

BTW, why are you using CMake 3.9 ? It's almost 3 years old by now. What distribution is it ?

from emqtt5.

wrmbaron avatar wrmbaron commented on September 26, 2024

BTW, why are you using CMake 3.9 ? It's almost 3 years old by now. What distribution is it ?

Debian 9, hopefully moving to Debian 10 soon. The point is, that you are not using features beyond version 3.9, so why make a higher version the minimum requirement?

from emqtt5.

X-Ryl669 avatar X-Ryl669 commented on September 26, 2024

Well, I've used 3.13 because that's the version in Debian buster. Debian stretch uses 3.7 and it seems it does not like my generator expressions. So, 3.9 did not seem to be a standard pivot version to choose from. I'm trying to see what is the minimal version I can use.

I'll let you know when I'm done. Thanks for helping!

from emqtt5.

X-Ryl669 avatar X-Ryl669 commented on September 26, 2024

Ok, I've added continuous integration with building on old Debian Stretch. Let me know if it fixes your build on your side.

Thanks!

from emqtt5.

wrmbaron avatar wrmbaron commented on September 26, 2024

Works perfectly now, thanks for the fast reaction!

from emqtt5.

Related Issues (17)

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.