Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build/plyvel/_plyvel.cpp:1293:10: fatal error: leveldb/db.h: No such file or directory #88

Open
2 of 3 tasks
Tropingenie opened this issue Aug 18, 2024 · 8 comments
Open
2 of 3 tasks

Comments

@Tropingenie
Copy link

IMPORTANT: Be sure to replace all {{ template sections ⚠️}} or your issue may be discarded.

Bug Description

Building wheels during requirements installations fails due to nonstandard header.

Expected behavior

Installation of requirements succeeds without errors.

Building wheels for collected packages: plyvel-ci
  Building wheel for plyvel-ci (pyproject.toml) ... done
  Created wheel for plyvel-ci: filename=plyvel_ci-1.5.0-cp312-cp312-linux_x86_64.whl size=326279 sha256=7edb7800f232e31c61e6d1d1dd26e6e6e74992a11abbb3b6d696bfb373eaab34
  Stored in directory: /home/pon/.cache/pip/wheels/d0/64/cb/94d7964f6afd4e64c8d2876b7ba390a09e0ec6f96fec2672b9
Successfully built plyvel-ci

Actual behavior

Building wheel for plyvel-ci fails.

Building wheels for collected packages: plyvel-ci
  Building wheel for plyvel-ci (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for plyvel-ci (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/plyvel
      copying plyvel/__init__.py -> build/lib.linux-x86_64-cpython-312/plyvel
      copying plyvel/_version.py -> build/lib.linux-x86_64-cpython-312/plyvel
      running build_ext
      building 'plyvel._plyvel' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/build
      creating build/temp.linux-x86_64-cpython-312/build/plyvel
      creating build/temp.linux-x86_64-cpython-312/plyvel
      g++ -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fPIC -Iplyvel -I/home/pon/Programs/fansly-downloader-ng/include -I/usr/include/python3.12 -c build/plyvel/_plyvel.cpp -o build/temp.linux-x86_64-cpython-312/build/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -fno-rtti
      g++: warning: ‘-x c++’ after last input file has no effect
      build/plyvel/_plyvel.cpp:1293:10: fatal error: leveldb/db.h: No such file or directory
       1293 | #include "leveldb/db.h"
            |          ^~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/g++' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for plyvel-ci
Failed to build plyvel-ci
ERROR: Could not build wheels for plyvel-ci, which is required to install pyproject.toml-based projects

Environment Information

  • Operating System: Fedora 40
  • Fansly Downloader Version: 2a6e63f
  • Fansly Downloader Type: Python Version
  • Specific creators name: n/a

User Research

I have done the following:

Additional context

This is a simple dependency issue, solved by installing the correct development package, per this Stackoverflow answer (archived). Dependency issues are easy enough to solve but the packages on various systems can be a touch obscure, making it difficult for newer Linux users to figure out, so I am reporting this issue and my fix for posterity. A documentation update (probably just linking to the SO in the README.MD) could address this dependency for future reference.

Aside: I also had to install gcc-g++ package since Fedora doesn't come standard with that, so the call to g++ was failing.

@deadbeatdandylyon
Copy link

deadbeatdandylyon commented Nov 3, 2024

I wound up having to install python 3.10.7 and after doing that I was able to install plyvel then re ran the requirements.txt and everything worked for me

I also had to delete line 52 and 107 of the IDLE for fansly_downloader_main.py - it was advised - as found in the following thread - #84

@blue-popsicle
Copy link

Oops, deleted my previous comment before I realized you responded. I was able to get plyvel installed manually through Powershell by first downloading the plyvel_ci-1.5.1-cp312-cp312-win_amd64.whl file from the Plyvel page on PyPI.
Now I seemingly have everything necessary installed, but the fansly_downloader_ng.py file just closes instantly seemingly without doing anything. No idea what's going on.

@blue-popsicle
Copy link

Oh! Commenting out lines 52 and 107 fixed that. Thanks for the help!

@deadbeatdandylyon
Copy link

Yeah I spent a lot of time as well trying to figure it out, but I didn't know how to do the .whl file install and I even tried at one point installing each requirement 1 at a time and it kept getting hung up on plyvel-ci till i found somewhere to install version 3.10 python and then i installed plyvel and it worked so odd

@Jakan-Kink
Copy link

Jakan-Kink commented Dec 8, 2024

This isn't actually a bug in this project; instead, it is an issue with plyvel requiring the LevelDB development headers and share library. Specifically called out (https://plyvel.readthedocs.io/en/latest/installation.html)

@maraudersmapx
Copy link

I'm still struggling to get this to work on macOS Sonoma. I've used Homebrew to install leveldb with brew install leveldb, but I'm still getting the error 'leveldb/db.h' file not found.

I've tried this, but same results: wbolster/plyvel#114 (comment)

@Jakan-Kink
Copy link

I'm still struggling to get this to work on macOS Sonoma. I've used Homebrew to install leveldb with brew install leveldb, but I'm still getting the error 'leveldb/db.h' file not found.

I've tried this, but same results: wbolster/plyvel#114 (comment)

What worked for me on Sequoia was:

brew install leveldb
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
export CPATH="$CPATH:$(brew --prefix)/include"
python3 -m pip install plyvel

@maraudersmapx
Copy link

Thank you, @Jakan-Kink ! That did the trick!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants