Nheko-Reborn / mtxclient

Client API library for Matrix, built on top of libcurl
MIT License
40 stars 25 forks source link

0.5.1 release Incompatible with Olm 3.2.6 #69

Closed adriaandegroot closed 3 years ago

adriaandegroot commented 3 years ago

The build of 0.5.1 release fails against Olm 3.2.6 on FreeBSD with clang 11.0.1, as follows:

/wrkdirs/usr/ports/net-im/mtxclient/work/mtxclient-0.5.1/lib/crypto/client.cpp:40:1: error: reference to 'OlmErrorCode' is ambiguous
OlmErrorCode
^
/usr/local/include/olm/error.h:22:6: note: candidate found by name lookup is 'OlmErrorCode'
enum OlmErrorCode {
     ^
/wrkdirs/usr/ports/net-im/mtxclient/work/mtxclient-0.5.1/include/mtxclient/crypto/client.hpp:34:12: note: candidate found by name lookup is 'mtx::crypto::OlmErrorCode'
enum class OlmErrorCode

This is, I think, because the newer Olm release introduces Olm error codes (I spotted a new header olm_error.h for instance). The fix is to add mtx::crypto:: to disambiguate the type-name lookup in client.cpp.

adriaandegroot commented 3 years ago

.. which is already there in b452a984 . A new release would be welcome.

deepbluev7 commented 3 years ago

We fixed it already for the master branch, but we wanted to make a new Nheko release a lot sooner than it will probably happen, so we didn't release a compilation fix. Next Nheko release should be in a few weeks, which includes an mtxclient release, so we'll probably focus on that.