Getting error in github ci-cd pipeline

Getting error in github ci-cd pipeline.
Using docker alpine

Error

> [builder 9/9] RUN cargo build --release:
682.8           MQTTAsyncUtils.c:(.text.MQTTAsync_receiveThread+0x49f): undefined reference to `OPENSSL_thread_stop'
682.8           /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/rustcYJwl73/libpaho_mqtt_sys-b0cba40a70d81679.rlib(MQTTAsyncUtils.c.o): in function `MQTTAsync_sendThread':
682.8           MQTTAsyncUtils.c:(.text.MQTTAsync_sendThread+0x539): undefined reference to `OPENSSL_thread_stop'
682.8           collect2: error: ld returned 1 exit status

Cargo.toml
paho-mqtt = "^0.12.5"

Dockerfile
RUN apk --update --no-cache add build-base openssl libressl-dev cmake

This resolves the issue.

paho-mqtt = { version = "^0.12.5", default-features = false, features = [ "bundled" ] }

1 Like

This will disable the ssl.
If you need ssl connection then here it is.

Cargo.toml
paho-mqtt = { version = "^0.12.5", features = ["vendored-ssl"] }

Alpine Dockerfile
RUN apk --update --no-cache add build-base openssl-dev libressl cmake perl

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.