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

capnp missing include path #1719

Closed
breznak opened this issue Jan 5, 2015 · 8 comments
Closed

capnp missing include path #1719

breznak opened this issue Jan 5, 2015 · 8 comments

Comments

@breznak
Copy link
Member

breznak commented Jan 5, 2015

when running python setup.py build --cmake_options="-DNUPIC_CORE=/my/nupiccore/release"

I had a successful built of both nupic & nupic.core, but python setup.py develop fails with

Installed /home/mmm/nupic/nupic-source
Processing dependencies for nupic==0.0.26-dev
Searching for pycapnp==0.5.1
Reading https://pypi.python.org/simple/pycapnp/
Best match: pycapnp 0.5.1
Downloading https://pypi.python.org/packages/source/p/pycapnp/pycapnp-0.5.1.tar.gz#md5=526534727701677b7552febdedfc0482
Processing pycapnp-0.5.1.tar.gz
Writing /tmp/easy_install-0w_uAE/pycapnp-0.5.1/setup.cfg
Running pycapnp-0.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0w_uAE/pycapnp-0.5.1/egg-dist-tmp-X7wf1w
/tmp/easy_install-0w_uAE/pycapnp-0.5.1/temp/tmpT7FLBW/tmp/easy_install-0w_uAE/pycapnp-0.5.1/temp/timer_create0kVOmo.o: In function `main':
timer_create0kVOmo.c:(.text+0x15): undefined reference to `timer_create'
collect2: error: ld returned 1 exit status
/tmp/easy_install-0w_uAE/pycapnp-0.5.1/temp/tmpT7FLBW/vers.cpp:4:26: fatal error: capnp/common.h: No such file or directory
 #include "capnp/common.h"
                          ^
compilation terminated.
*WARNING* no libcapnp detected. Will download and build it from source now. If you have C++ Cap'n Proto installed, it may be out of date or is not being detected. Downloading and building libcapnp may take a while.
fetching https://capnproto.org/capnproto-c++-0.5.0.tar.gz into /tmp/easy_install-0w_uAE/pycapnp-0.5.1/bundled
error: Setup script exited with error: [Errno 13] Permission denied
(env_py)mmm@mmm-U2442:~/nupic/nupic-source$ git pull
Already up-to-date.
(env_py)mmm@mmm-U2442:~/nupic/nupic-source$ find . -name common.h
./extensions/core/external/common/include/capnp/common.h
./extensions/core/external/common/include/kj/common.h
./extensions/core/external/common/include/kj/parse/common.h
@breznak
Copy link
Member Author

breznak commented Jan 5, 2015

CC @scottpurdy

@scottpurdy
Copy link
Contributor

@breznak - it looks like the error happens when pycapnp is being installed via pip. It should be able to do this without any prebuilt Cap'n Proto files. So I don't think this is an includes issue but rather a permissions issue. pip is trying to use a /tmp path that it doesn't have permissions for.

@breznak
Copy link
Member Author

breznak commented Jan 5, 2015

@scottpurdy you're right! Seems like a bug in pip package/ubuntu - the tmp/tmpXXXX dir pip mentions is not even created (/tmp has normal 1777 permissions).
Workaround was to pip install pycapnp manually, it failed with same err, but pip fallbacked to some alternative install method and finished OK.

@rhyolight
Copy link
Member

Is there any action to be taken?

@breznak
Copy link
Member Author

breznak commented Jan 8, 2015

@rhyolight I dont know..maybe notify pycapnp upstream..? or point people who encounter the problem here for workaround.

@rhyolight
Copy link
Member

@scottpurdy Can you create an issue on pycapnp and I'll update the developer FAQ with this issue.

@ghost
Copy link

ghost commented Aug 31, 2017

pip install pycapnp --install-option '--force-bundled-libcapnp'

@rhyolight
Copy link
Member

@kyle-sorensen

pip install pycapnp --install-option '--force-bundled-libcapnp'

Thanks for the tip. I did not know that option existed.

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

No branches or pull requests

3 participants