Ηi there,
I ve been using boost (geometry) with xeus-cling kernel without any issues, so far. I install boost from conda forge:
conda install boost -c conda-forge
I tried to include odeint.hpp without any issues on my cling environment:
see also https://stackoverflow.com/questions/61205040/how-do-i-use-boost-with-the-xeu...
BW
G
On Fri, 12 Jun 2020, 19:46 A. de Windt via Boost-users, < boost-users@lists.boost.org> wrote:
Hi everyone,
As my first post in this mailing list I would like to ask, has anyone tried using boost in a xeus-cling jupyter kernel? Or just cling?
My plan is to use odeint in the jupyter notebook for some simulations. However I had issues when I tried to run one of the odeint examples. I originally posted my issue on stackoverlfow but didn;t get any feedback. So I'm going to mostly copy my original question in this email.
https://stackoverflow.com/questions/61205040/how-do-i-use-boost-with-the-xeu...
I'm running Pop!_OS (ubuntu derivative) and apt installed boost (libboost-all-dev) from the default repositories. I know it has been installed properly since I can compile and run the simple boost odeint example with GCC.
However when I tried to run the same example inside a jupyter notebook using the zeus-cling kernel I got an error while including the odeint header. I can recreate the error while executing this code:
#pragma cling add_include_path("/usr/include")#include
The error message I get is:
In file included from input_line_8:1: In file included from /usr/include/boost/numeric/odeint.hpp:22: In file included from /usr/include/boost/numeric/odeint/config.hpp:44: In file included from /usr/include/boost/config.hpp:48: In file included from /usr/include/boost/config/stdlib/libstdcpp3.hpp:78: /usr/include/unistd.h:756:28: error: expected function body after function declarator extern __pid_t fork (void) __THROWNL; ^ /usr/include/unistd.h:869:11: fatal error: 'bits/getopt_posix.h' file not found # include
^~~~~~~~~~~~~~~~~~~~~ Interpreter Error: From what I understand bits/getopt_posix.h is a GCC only header, thus I think the problem might be because the boost headers are configuring themselves as if they are compiling under GCC instead of cling/clang.
My solution so far has been to submodule the boost super project into my repository and add all the include paths necessary to get odeint and it's dependencies to compile. This is fine since odeint is a header only library anyways. But I'm pretty sure there is a better solution to this problem.
Thanks in advance and hope to hear from someone back soon.
Cheers, Aaron M. de Windt
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users