brainboxdotcc / DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
https://dpp.dev/
Apache License 2.0
1.05k stars 159 forks source link

fix: correct wrong linking order to fix static build #1101

Closed Syping closed 6 months ago

Syping commented 6 months ago

Build DPP statically causing linker errors with OpenSSL with undefined references

/usr/bin/ld: s3_lib.c:(.text+0x348): undefined reference to `OPENSSL_sk_pop_free'
/usr/bin/ld: s3_lib.c:(.text+0x35c): undefined reference to `CRYPTO_free'
/usr/bin/ld: s3_lib.c:(.text+0x377): undefined reference to `CRYPTO_clear_free'
/usr/bin/ld: s3_lib.c:(.text+0x38b): undefined reference to `CRYPTO_free'
/usr/bin/ld: s3_lib.c:(.text+0x39f): undefined reference to `CRYPTO_free'
/usr/bin/ld: s3_lib.c:(.text+0x3ab): undefined reference to `EVP_PKEY_free'
/usr/bin/ld: s3_lib.c:(.text+0x3b7): undefined reference to `EVP_PKEY_free'
/usr/bin/ld: s3_lib.c:(.text+0x3d3): undefined reference to `CRYPTO_free'
/usr/bin/ld: s3_lib.c:(.text+0x3e7): undefined reference to `CRYPTO_free'
/usr/bin/ld: s3_lib.c:(.text+0x440): undefined reference to `CRYPTO_free'

So i corrected the linking order to fix that problem.

Code change checklist

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 6 months ago

Thank you for your contribution, but PRs must be raised against the dev branch. Please log your pull request against the dev branch not master. You can also retarget this pull request, then reopen it.