Opened 3 years ago

Last modified 21 months ago

#67874 assigned update

mosquitto: update to 2.0.20

Reported by: danh1979 Owned by: slewsys (Andrew L. Moore)
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: haspatch Cc: slewsys (Andrew L. Moore)
Port: mosquitto

Description (last modified by danh1979)

After some Internet-search-aided debugging, I found that I needed to:

  • add libcjson dependency
  • deal with missing symbols via the extra linker flag
  • deal with an xslt error by installing docbook XSL

I tested a previous version of my patch to update to 2.0.16 on Ventura 13.5 on M2 Pro by creating my own local Portfile and installing it from source.

Recently tested update to 2.0.20 on Sonoma 14.7.1 M2 Pro.

Github merge request: https://github.com/macports/macports-ports/pull/26992

Attachments (2)

macports-ports.mosquitto-2.0.15.patch (2.3 KB) - added by danh1979 3 years ago.
macports-ports.mosquitto-2.0.15.patch
macports-ports.mosquitto-2.0.16.patch (2.3 KB) - added by danh1979 3 years ago.
mosquitto: update to 2.0.16

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to slewsys
Status: newassigned

revision should drop to 0 when the version is increased.

http://mosquitto.org redirects to https://mosquitto.org so master_sites should be changed to ${homepage}/files/source/.

Needing to specify -undefined dynamic_lookup manually is surprising and suggests a bug in the build system. What error did you get before adding that? Did you file a bug report with upstream? Please provide its URL.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: update mosquitto to 2.0.15mosquitto: update to 2.0.15

comment:3 Changed 3 years ago by danh1979

Description: modified (diff)

I updated the patch with the revision and master_sites suggestions.

Regarding -undefined dynamic_lookup, it seems there are some plugins in mosquitto, written add_library(targetname MODULE ...) in cmake, where targetname is one of these three:

  • mosquitto_dynamic_security
  • mosquitto_message_timestamp
  • mosquitto_payload_modification

These don't compile without adding -DCMAKE_MODULE_LINKER_FLAGS="-undefined dynamic_lookup".

Prompted by your suggestion, and then learning about cmake-1.1.tcl and recreating a macports-equivalent build environment, I searched the mosquitto source and found

https://github.com/eclipse/mosquitto/blob/v2.0.15/CMakeLists.txt#L22

If I change this to

  • CMakeLists.txt

    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index b8913c2d..145f6255 100644
    a b if (WIN32) 
    2020endif (WIN32)
    2121
    2222if(APPLE)
    23        set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup")
     23       set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -undefined dynamic_lookup")
    2424endif(APPLE)
    2525
    2626include(GNUInstallDirs)

... then mosquitto builds without -DCMAKE_MODULE_LINKER_FLAGS="-undefined dynamic_lookup" fed on the cmake command line.

comment:4 Changed 3 years ago by danh1979

Description: modified (diff)

modified patch for this port to use a patch for mosquitto's CMakeLists.txt instead of an extra command line arg

comment:5 Changed 3 years ago by danh1979

Looks like mosquitto already has an issue; I added a comment https://github.com/eclipse/mosquitto/issues/2858

Changed 3 years ago by danh1979

macports-ports.mosquitto-2.0.15.patch

Changed 3 years ago by danh1979

mosquitto: update to 2.0.16

comment:6 Changed 3 years ago by danh1979

Description: modified (diff)
Summary: mosquitto: update to 2.0.15mosquitto: update to 2.0.16

comment:8 Changed 21 months ago by danh1979

Description: modified (diff)
Summary: mosquitto: update to 2.0.16mosquitto: update to 2.0.20
Version: 2.8.12.10.5

comment:9 Changed 21 months ago by danh1979

Description: modified (diff)
Note: See TracTickets for help on using tickets.