8000 no member named 'shared_ptr' in namespace 'std' · Issue #1434 · pytorch/pytorch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

8000 no member named 'shared_ptr' in namespace 'std' #1434

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

Closed
zhanghang1989 opened this issue May 2, 2017 · 3 comments
Closed

no member named 'shared_ptr' in namespace 'std' #1434

zhanghang1989 opened this issue May 2, 2017 · 3 comments

Comments

@zhanghang1989
Copy link
zhanghang1989 commented May 2, 2017

When building from source, I got this error. My system is OSX 10.12.4, conda, CUDA 8.0. Any thoughts? Thanks!

torch/csrc/serialization.cpp:2:10: fatal error: 'system_error' file not found
#include <system_error>
         ^
In file included from torch/csrc/autograd/engine.cpp:1:
pytorch/torch/csrc/autograd/function_hook.h:11:40: error: no member named 'shared_ptr' in namespace 'std'
using variable_list = std::vector<std::shared_ptr<Variable>>;
                                  ~~~~~^
/Users/hangzhang/pytorch/torch/csrc/autograd/function_hook.h:11:51: error: 'Variable' does not refer to a value
using variable_list = std::vector<std::shared_ptr<Variable>>;
@soumith
Copy link
Member
soumith commented May 2, 2017

can you try adding #include <memory> to the file pytorch/torch/csrc/autograd/function_hook.h and see if that fixes things? if so i'll commit it.

@soumith
Copy link
Member
soumith commented May 2, 2017

actually, that file already has memory included.

Are you following instructions from https://github.com/pytorch/pytorch#from-source
Especially:

MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

This part is important: MACOSX_DEPLOYMENT_TARGET=10.9

@zhanghang1989
Copy link
Author

MACOSX_DEPLOYMENT_TARGET=10.9 works nicely! Thanks a lot!

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

2 participants
0