compiler-research / xeus-cpp

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
17 stars 24 forks source link

xeus-cpp does not work on Windows #144

Open JohanMabille opened 2 months ago

JohanMabille commented 2 months ago

System information

Description of issue

Trying to execute the first cell of the notebooks/xeus-cpp.ipynb makes the kernel restart forever (with xeus-cpp 0.5). Trying the same thing with a local build of current main branch gives thefollowing error:

JIT session error: Symbols not found: [ __emutls_v._Init_thread_epoch, __emutls_get_address, _Init_thread_header, _Init_thread_footer, ??3@YAXPEAX_K@Z, ??_7type_info@@6B@, ?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z ]
Failed to execute via ::process:Failed to materialize symbols: { (main, { ??_R3_Iostream_error_category2@std@@8, ??_R3facet@locale@std@@8, ??_R1A@?0A@EA@ctype_base@std@@8, ?_Tidy@?$_Yarn@D@std@@AEAAXXZ, ??_R0?AV_Facet_base@std@@@8, ?widen@?$ctype@D@std@@QEBADD@Z, ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z, ??0system_error@std@@QEAA@AEBV01@@Z, ?_Take_contents@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXAEAV12@@Z, ??_R0?AVbad_alloc@std@@@8,

Commands or code executed

#include <iostream>

std::cout << "some output" << std::endl;

Expected Result

Outputs "some output" under the notebook cell.

vgvassilev commented 2 months ago

Maybe we should add these symbols to the list of re-exports in CppInterOp? @mcbarton what do you think?

mcbarton commented 2 months ago

Maybe we should add these symbols to the list of re-exports in CppInterOp? @mcbarton what do you think?

@vgvassilev The example notebook is not expected to work on Windows at the moment. This is related to the discussion we had on the failing XCpp jupyter_kernel_test tests. Exporting the symbols may work, but its expected to be a fragile solution from what I remember from the discussion.

vgvassilev commented 2 months ago

Yes, fragile but the only option available now.