Please sign in to comment.
Do not link against libpython when building python bindings
Summary: our cmake build used to link against libpython.so with its absolute path (instead of -LSOME_LIB_PATH -lpython), so at runtime loader will think it needs the libpython.so at that specific path, and so load in an additional libpython.so, which causes the python binding built with one python installation not reusable by another (maybe on same machine or sometimes even not on same machine). The solution is quite simple, which is we don't link against libpython, leave all the python related symbols unresolved at build time, they will be resolved at runtime when imported into python. Closes facebookarchive/caffe2#1514 Reviewed By: dzhulgakov Differential Revision: D6412405 Pulled By: bddppq fbshipit-source-id: 9ff5b752ae3806bfac94085942f82d89c304c887
- Loading branch information...
Showing with 2 additions and 1 deletion.