Package Details: paho-mqtt-c 1.3.12-1

Git Clone URL: https://aur.archlinux.org/paho-mqtt-c.git (read-only, click to copy)
Package Base: paho-mqtt-c
Description: Eclipse Paho C Client Library for the MQTT Protocol
Upstream URL: https://www.eclipse.org/paho/
Licenses: custom:EDL, custom:EPL2
Submitter: MrAnno
Maintainer: MrAnno
Last Packager: MrAnno
Votes: 5
Popularity: 0.000005
First Submitted: 2021-06-18 12:01 (UTC)
Last Updated: 2023-05-04 20:36 (UTC)

Latest Comments

jasonc commented on 2023-09-12 05:19 (UTC) (edited on 2023-09-12 05:26 (UTC) by jasonc)

I was running into a build error during the package step:

...
[125/125] Linking C executable test/test95
==> Starting check()...
==> Entering fakeroot environment...
==> Starting package()...
ninja: error: unknown target 'DESTDIR=/home/jasonc/.cache/paru/clone/paho-mqtt-c/pkg/paho-mqtt-c'
==> ERROR: A failure occurred in package().
Aborting...
error: failed to build 'paho-mqtt-c-1.3.12-1':

It looks like the makefile was treating DESTDIR=... as a target. Note I am using ninja makefile generator for cmake by default. This issue does not exist for normal unix makefiles.

This patch to the PKGBUILD fixed the issue for me and works with both ninja and unix makefiles:

diff --git a/PKGBUILD b/PKGBUILD
index 511e1a6..30c891d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,7 +27,7 @@ check() {

package() {
cd "${pkgname//-/.}-${pkgver}"
-  cmake --build build --target install -- DESTDIR="$pkgdir/"
+  DESTDIR="$pkgdir/" cmake --install build

install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 edl-v10 "${pkgdir}/usr/share/licenses/${pkgname}/edl-v10"