Open timbad opened 6 years ago
At least on Linux & MacOS, I've used pb11 2.2.3 and Intel 2018.0.2 with no problem.
@loriab were you able to compile given code?
yes
>>> icpc -Wall -shared -std=c++11 -fPIC `python -m pybind11 --includes` test.cc -o test.so
In file included from test.cc(3):
/home/psilocaluser/toolchainconda/envs/p4dev36/include/python3.6m/pybind11/common.h(2): warning #1224: #warning directive: "Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'."
#warning "Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'."
^
>>> ldd test.so
linux-vdso.so.1 => (0x00007ffd67de3000)
libimf.so => /theoryfs2/common/software/intel2018/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libimf.so (0x00007f64d2202000)
libsvml.so => /theoryfs2/common/software/intel2018/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libsvml.so (0x00007f64d0b4c000)
libirng.so => /theoryfs2/common/software/intel2018/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirng.so (0x00007f64d07d8000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f64d04a9000)
libm.so.6 => /lib64/libm.so.6 (0x00007f64d01a7000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f64cff91000)
libintlc.so.5 => /theoryfs2/common/software/intel2018/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libintlc.so.5 (0x00007f64cfd22000)
libc.so.6 => /lib64/libc.so.6 (0x00007f64cf961000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f64cf75d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f64d29bf000)
whoops, executable, not module. it does not segfault upon execution.
>>> icpc -Wall -std=c++11 -fPIC `python -m pybind11 --includes` /home/psilocaluser/toolchainconda/envs/p4dev36/lib/libpython3.6m.so test.cc
In file included from test.cc(3):
/home/psilocaluser/toolchainconda/envs/p4dev36/include/python3.6m/pybind11/common.h(2): warning #1224: #warning directive: "Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'."
#warning "Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'."
^
>>> ldd a.out
linux-vdso.so.1 => (0x00007ffec9ff9000)
libpython3.6m.so.1.0 => not found
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f76515dc000)
libm.so.6 => /lib64/libm.so.6 (0x00007f76512da000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f76510c3000)
libc.so.6 => /lib64/libc.so.6 (0x00007f7650d02000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f7650afe000)
/lib64/ld-linux-x86-64.so.2 (0x00007f765190c000)
>>> LD_LIBRARY_PATH=/home/psilocaluser/toolchainconda/envs/p4dev36/lib:$LD_LIBRARY_PATH ./a.out
What's the status on this, and on pybind11 wrt ICC 2018 ? I have on my side a bunch of errors :
Problems are confined to Windows, I believe. I can vouch for pb11 with 2018.0.2 & 2018.0.3 on Linux and 2018.0.2 on Mac.
I know, my question was : what is planned for windows ? Is it an icc bug or is the issue on pybind11 side ?
Ah, that I couldn't venture (I don't even have a Windows box around). If can't build https://github.com/pybind/cmake_example, then it's a real problem. If you or a friend likes template metaprogramming, handing over your terminal and jiggling the pb11 syntax has fixed a few Intel-specific pb11 problems for me.
I'm having similar trouble with icpc 18. I'm running on Linux CentOS6:
In file included from /home/davidsca/.pyenv/versions/lxc6-cronuspy2.7/include/site/python2.7/pybind11/pytypes.h(12),
from /home/davidsca/.pyenv/versions/lxc6-cronuspy2.7/include/site/python2.7/pybind11/cast.h(13),
from /home/davidsca/.pyenv/versions/lxc6-cronuspy2.7/include/site/python2.7/pybind11/attr.h(13),
from /home/davidsca/.pyenv/versions/lxc6-cronuspy2.7/include/site/python2.7/pybind11/pybind11.h(43),
from src/CronusPy.cpp(1):
/home/davidsca/.pyenv/versions/lxc6-cronuspy2.7/include/site/python2.7/pybind11/detail/common.h(147): catastrophic error: cannot open source file "typeindex"
#include <typeindex>
^
compilation aborted for src/CronusPy.cpp (code 4)
error: command 'icpc' failed with exit status 4
I've been porting a wrapper library from boost::python to pybind11. My boost::python environment works in this environment using icpc 15, so the problem probably isn't icpc. My pybind wrapper also works for a similar environment when built using g++, so it's not my implementation. The problem appears to be with combining pybind11 + icpc.
Latest master seems to work on Intel 18+, reopen if it doesn't! Hope to add CI based on OneAPI in the future.
Sorry, Intel + Windows has not been tested.
It looks like Intel c++ 18 fails to compile pybind11. I tried to reproduce small example which compiles with Microsoft compiler and GCC but fails to compile with Intel 18 compiler:
Compiler options:
Linker options:
Compiler gives strange errors. For example it seems like compiler expects PYBIND11_DEPRECATED to be function in definition of method object_api:call
Or says that m_ptr is undefined in handle class