Open michaelkuhn opened 3 years ago
I found another problem with the pkg-config file: Due to escaping issues, '$ORIGIN'
does not end up in the pkg-config file, resulting in something like -ldl -Wl,-rpath -Wl, -lrocksdb
. This will cause build errors with Clang because it tries to consume the next argument if the argument to -Wl
is empty (see also https://github.com/mesonbuild/meson/issues/2814).
We use the following patch in Spack to fix these issues, feel free to reuse: https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/rocksdb/pkg-config.patch
I am also troubled by this, since the exported pkg-config cflags contains -std=c++17
which overrides -std=c++20
specified by my build system, causing failure.
The pkg-config file that recently started being generated by RocksDB contains flags that make it hard to use on different systems/compilers/etc.
Expected behavior
The pkg-config file should work on all systems as well as with C and C++.
Actual behavior
Trying to use RocksDB in a C application results in errors like this:
Clang also does not know about some of the flags:
The generated one causing problems looks something like this:
A working one generated by Spack or Fedora looks like this:
Steps to reproduce the behavior
Try to use recent release of RocksDB from C and/or with Clang.