Skip to content
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

[cling 1.0~dev] IncrementalJIT error in c++20 mode #226

Open
1 task done
dimitry-ishenko opened this issue Oct 19, 2022 · 1 comment
Open
1 task done

[cling 1.0~dev] IncrementalJIT error in c++20 mode #226

dimitry-ishenko opened this issue Oct 19, 2022 · 1 comment
Labels

Comments

@dimitry-ishenko
Copy link

  • Checked for duplicates

Describe the bug

When running cling in c++20 mode I get this:

root@laptop:~# cling -std=c++20

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <regex>
[cling]$ std::regex re1{"x"};
[cling]$ std::regex re2{"y"};
[IncrementalJIT] addModule() failed: Duplicate definition of symbol '__const._ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEElcNS0_5__ops15_Iter_less_iterEEvT_T0_SA_T1_T2_.__cmp'
[cling]$ .q

Same example runs totally fine in c++17 mode:

root@laptop:~# cling -std=c++17

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <regex>
[cling]$ std::regex re1{"x"};
[cling]$ std::regex re2{"y"};
[cling]$ .q

Cling 0.9 likewise works fine in c++17 mode.

Expected behavior

No error.

To Reproduce

See above.

Setup

Cling version: 1.0~dev (cling-patches-llvm13 branch)
Operating system: Ubuntu 22.04
How you obtained Cling: compiled myself

@dimitry-ishenko dimitry-ishenko changed the title [cling 1.0~dev] Strange behavior in c++20 mode [cling 1.0~dev] IncrementalJIT error in c++20 mode Oct 19, 2022
@vgvassilev
Copy link
Owner

The new orc infrastructure is very rigorous when it comes to weak symbol redefinition. I will have to test this example with clang-repl as well.

We have been trying to mitigate this problem and perhaps I miss some recent patch.

cc: @hahnjo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants