Nheko-Reborn / nheko

Desktop client for Matrix using Qt and C++20.
https://nheko-reborn.github.io/
GNU General Public License v3.0
1.93k stars 201 forks source link

Cmake does not check for LMDB when building on Linux Debian #1086

Open vi opened 2 years ago

vi commented 2 years ago

Describe the bug

Nheko seems to depend on LMDB, but presence of this dependency is not checked by CMake.

To Reproduce

  1. Use Debian Buster
  2. Checkout tag v0.9.3
  3. Use CMake like cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_MTXCLIENT=ON -DUSE_BUNDLED_OLM=ON -DUSE_BUNDLED_COEURL=ON -GNinja.
  4. Satisfy missing dependencies until cmake completes successfully
  5. Start the compilation (cd build; ninja in my case)

What happened?

It stumbled into missing lmdb++.h. After installation of liblmdb++-dev (0.9.14.1+git20160228.0b43ca8-1+b1) it fails compilation because of extra argument in lmdb::cursor::get (maybe it expects newer version of lmdb).

Expected behavior

It build and resulting Nheko runs successfully.

Screenshots

No response

Version

v0.9.3

Operating system

Linux

Installation method

Local build

Qt version

5.15.2

C++ compiler

g++ (Debian 10.2.1-6) 10.2.1 20210110

Desktop Environment

No response

Did you use profiles?

Relevant log output

No response

Backtrace

No response

deepbluev7 commented 2 years ago

The version of lmdb++ you installed is too old. Since the package is just a single header, there is no way for us to check what version it is, so we can't make the buildsystem error in that case. Please install lmdb++.h 1.0.0 or newer.

deepbluev7 commented 2 years ago

I don't think we can fix that, unless upstream provides pkgconfig files: https://github.com/hoytech/lmdbxx/pull/8