Skip to contentSkip to conversation

package/paho-mqtt-c: fix build on musl

PATCH New Fabrice Fontaine 2 participants 2 messages May 2, 2020 – May 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/paho-mqtt-c: fix build on musl

Set PAHO_HIGH_PERFORMANCE to disable free redefiniton as suggested by upstream in https://github.com/eclipse/paho.mqtt.c/issues/846.

This will avoid the following build failure on musl:

/tmp/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/include/sched.h:80:17: error: expected declaration specifiers or '...' before string constant

 void free(void *);
                 ^
/tmp/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/include/sched.h:80:17: error: expected declaration specifiers or '...' before numeric constant
 void free(void *);
                 ^

[ 35%] Building C object src/CMakeFiles/common_obj.dir/Base64.c.o
[ 36%] Building C object src/CMakeFiles/common_obj.dir/SHA1.c.o
make[3]: *** [src/CMakeFiles/common_obj.dir/build.make:284: src/CMakeFiles/common_obj.dir/MQTTReasonCodes.c.o] Error 1

Fixes:
- http://autobuild.buildroot.org/results//fbe57a1602fed331ddff3ff3560dce02573816ff

---
 package/paho-mqtt-c/paho-mqtt-c.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/paho-mqtt-c/paho-mqtt-c.mk +2 -1
index 6a6b5f3d64..c7ecf412cd 100644
@@ -12,7 +12,8 @@ PAHO_MQTT_C_INSTALL_STAGING = YES
 
 PAHO_MQTT_C_CONF_OPTS = \
 	-DPAHO_ENABLE_TESTING=FALSE \
-	-DPAHO_ENABLE_CPACK=FALSE
+	-DPAHO_ENABLE_CPACK=FALSE \
+	-DPAHO_HIGH_PERFORMANCE=TRUE
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 PAHO_MQTT_C_DEPENDENCIES += openssl
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/paho-mqtt-c: fix build on musl

Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Set PAHO_HIGH_PERFORMANCE to disable free redefiniton as suggested by upstream in https://github.com/eclipse/paho.mqtt.c/issues/846.

This will avoid the following build failure on musl:

/tmp/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/include/sched.h:80:17: error: expected declaration specifiers or '...' before string constant

 void free(void *);
                 ^
/tmp/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/include/sched.h:80:17: error: expected declaration specifiers or '...' before numeric constant
 void free(void *);
                 ^
Quoted 8 lines

[ 35%] Building C object src/CMakeFiles/common_obj.dir/Base64.c.o
[ 36%] Building C object src/CMakeFiles/common_obj.dir/SHA1.c.o
make[3]: *** [src/CMakeFiles/common_obj.dir/build.make:284: src/CMakeFiles/common_obj.dir/MQTTReasonCodes.c.o] Error 1

Fixes:
- http://autobuild.buildroot.org/results//fbe57a1602fed331ddff3ff3560dce02573816ff

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard