Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Building with pip fails with missing headers #17

Closed

Description

@GodTamIt

Trying to build this repository with pip install -r requirements.txt, where the repository is listed as a Git hash is broken:

rocksdb/_rocksdb.cpp:1232:10: fatal error: 'rocksdb/slice.h' file not found
#include "rocksdb/slice.h"
         ^~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

Running python -m build also results in this error.

Activity

  1. wbarnha commented on Sep 8, 2023

    @wbarnha
    Member

    You need to install and link the RocksDB header files, it's a major pain ☹️, which is why I created a workflow to build wheel files to get around this issue.

    Alternatively, you may find this SO answer of interest: https://stackoverflow.com/a/70501371/9852671

  2. GodTamIt commented on Sep 9, 2023

    @GodTamIt
    Author

    @wbarnha I tried building RocksDB as a shared library, but it didn't seem to like that either.

    I'm doing the following in a Dockerfile:

    RUN apt-get install -y --no-install-recommends libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev
    RUN git clone https://github.com/facebook/rocksdb --depth 1 --branch "v6.29.5" rocksdb
    RUN cd rocksdb && make install-shared -j 32
    RUN ls /usr/local/lib && test -f /usr/local/lib/librocksdb.so.6.29
    
    # Remove temporary dir
    RUN rm -rf rocksdb
    
    RUN pip install git+https://github.com/faust-streaming/python-rocksdb.git@9b81bed3ffa55a1662811e9ad9fea652f42047f6
    
    RUN python -c 'import rocksdb'

    I'm getting:

    ImportError: librocksdb.so.6.29: cannot open shared object file: No such file or directory
    
  3. wbarnha commented on Sep 10, 2023

    @wbarnha
    Member

    Out of curiosity, what's the motivation for building this library from source? Are you trying to support another OS or architecture? I'm considering marking this project as deprecated since rocksdict has taken over.

  4. GodTamIt commented on Sep 10, 2023

    @GodTamIt
    Author

    I'm trying to build it for ARM64. I want to move to rocksdict, but there are a few legacy instances that rocksdict isn't binary compatible with, I don't think.

  5. wbarnha commented on Sep 10, 2023

    @wbarnha
    Member

    Got it. The easiest solution to be honest would to be extending the CI/CD pipeline for more architectures. The complexity of this library's build process is horrific and I apologize.

  6. wbarnha commented on Sep 15, 2023

    @wbarnha
    Member

    Got your ARM wheels built in #18. Holy crap, I can't believe QEMU slowed it down to take 5h8m.

    To be honest I'm contemplating this being my final release and then archiving the project. This has been an unwieldy library for some time and maintaining it is incredibly difficult. I've tried reviewing the internals of RocksDB to see if I can improve build times or reduce wheel sizes, but there's not much I can currently achieve with my skillset at the moment. Plus not many other people have actively stepped up to help me maintain this project, and I think I've been able to move more attention to rocksdict, which in my opinion, is substantially easier to maintain. Unless other people volunteer to support this project, I will be likely archiving it due to lack of additional support and outdated functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions