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

pip install on FreeBSD doesn't work #17

Open
tomsparks opened this issue Sep 4, 2019 · 2 comments
Open

pip install on FreeBSD doesn't work #17

tomsparks opened this issue Sep 4, 2019 · 2 comments
Labels

Comments

@tomsparks
Copy link

I'm guessing this has to do with pybgpstream not using /usr/local/{lib,include}, similar to issue #96 for bgpstream
(CAIDA/bgpstream#96)

pip install pybgpstream

Collecting pybgpstream
Using cached https://files.pythonhosted.org/packages/26/9e/d174e153e0b6afb28af13e7da06529ba98bee5d92f53b7dc67a61f0b5977/pybgpstream-1.2.3.tar.gz
Installing collected packages: pybgpstream
Running setup.py install for pybgpstream ... error
Complete output from command /usr/local/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-install-dc3323ob/pybgpstream/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-r6yei02p/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building '_pybgpstream' extension
creating build
creating build/temp.freebsd-12.0-RELEASE-p3-amd64-3.6
creating build/temp.freebsd-12.0-RELEASE-p3-amd64-3.6/src
cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -I/usr/local/include /usr/include -I/usr/local/include/python3.6m -c src/_pybgpstream_module.c -o build/temp.freebsd-12.0-RELEASE-p3-amd64-3.6/src/_pybgpstream_module.o
In file included from src/_pybgpstream_module.c:24:
src/_pybgpstream_bgpelem.h:27:10: fatal error: 'bgpstream_elem.h' file not found
#include "bgpstream_elem.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1

----------------------------------------

Command "/usr/local/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-install-dc3323ob/pybgpstream/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-r6yei02p/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-dc3323ob/pybgpstream/

@alistairking
Copy link
Member

It's possible that the solution I suggested in #96 will solve this problem too, otherwise you should be able to use the method described at https://bgpstream.caida.org/docs/install/pybgpstream to explicitly specify the install location:

pip install \
    --global-option build_ext \
    --global-option '--include-dir=/usr/local/include' \
    --global-option '--library-dir=/usr/local/lib' \
    pybgpstream

@tomsparks
Copy link
Author

Yep, your suggestion does seem to work.
I'll see if I can turn that into a port as well.

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

No branches or pull requests

3 participants