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

Installation with pip fails if libraries are anywhere other than /usr/ #38

Open
darksidelemm opened this issue Mar 15, 2021 · 1 comment
Labels

Comments

@darksidelemm
Copy link

Describe the bug
The tests performed during pip install, which attempt to build a small amount of source code including rrd.h only use /usr/include/ and /usr/lib/ as include and lib directories.
Under OSX / Macports, these directories should be /opt/local/include and /opt/local/lib .
As a result, rrdtool cannot be installed via pip within a Macports system.

Collecting rrdtool
  Using cached rrdtool-0.1.15.tar.gz (21 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/darkside/Dev/kiwisnr/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/g5/f1sl_t4x2yn65bnb66pkwssm0000gn/T/pip-install-47rqsze7/rrdtool/setup.py'"'"'; __file__='"'"'/private/var/folders/g5/f1sl_t4x2yn65bnb66pkwssm0000gn/T/pip-install-47rqsze7/rrdtool/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/g5/f1sl_t4x2yn65bnb66pkwssm0000gn/T/pip-pip-egg-info-qwj88vz5
         cwd: /private/var/folders/g5/f1sl_t4x2yn65bnb66pkwssm0000gn/T/pip-install-47rqsze7/rrdtool/
    Complete output (5 lines):
    /var/folders/g5/f1sl_t4x2yn65bnb66pkwssm0000gn/T/tmp_python_rrdtool0a8kjkfx/test_rrdtool.c:2:10: fatal error: 'rrd.h' file not found
    #include <rrd.h>
             ^~~~~~~
    1 error generated.
    Error: Unable to compile the binary module. Do you have the rrdtool header and libraries installed?
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

To Reproduce
Steps to reproduce the behaviour:

  • Use Macports, or have librrd installed anywhere other than /usr/include /usr/lib
  • Attempt to run: pip install rrdtool (ideally within a venv)

Desktop (please complete the following information):

  • Python version: 3.7.9
  • RRDtool version: 1.7.1 (installed to /opt/local/)
  • python-rrdtool version: 0.1.15 (via pip)
@darksidelemm
Copy link
Author

I should note that just adding on /opt/local/include and /opt/local/lib into the relevant variables in setup.py made this build just fine on my system, but i'm unsure if that will work on systems where those directories do not exist.

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

No branches or pull requests

1 participant