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

Error compiling with mysys2 #166

Open
iraizo opened this issue Aug 2, 2021 · 4 comments
Open

Error compiling with mysys2 #166

iraizo opened this issue Aug 2, 2021 · 4 comments

Comments

@iraizo
Copy link

iraizo commented Aug 2, 2021

Im using clang version 9.0.0 (https://github.com/msys2/MINGW-packages.git ded8515833d0acc22453a8b5d2adb73cbf355fe1)
to compile it, but it fails

C:/Users/raizo/Desktop/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
C:/Users/raizo/Desktop/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6275:24: error: lambda parameter 'CGF' previously declared as a capture
 6275 |       CodeGenFunction &CGF, PrePostActionTy &) {
      |       ~~~~~~~~~~~~~~~~~^~~
C:/Users/raizo/Desktop/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
C:/Users/raizo/Desktop/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6321:62: error: lambda parameter 'CGF' previously declared as a capture
 6321 |   auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
      |                                             ~~~~~~~~~~~~~~~~~^~~
C:/Users/raizo/Desktop/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
C:/Users/raizo/Desktop/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6400:56: error: lambda parameter 'CGF' previously declared as a capture
 6400 |   auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
      |

i havent seen this issue anywhere and im not sure how to fix this :/

@iraizo
Copy link
Author

iraizo commented Aug 4, 2021

This also fails on native clang on arch linux

@v4kst1z
Copy link

v4kst1z commented Aug 14, 2021

This also fails on native clang on arch linux

delete 'CGF' previously declared as a capture

before

auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {

after

auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {

@iraizo
Copy link
Author

iraizo commented Aug 15, 2021

also getting

/home/raizo/work/obfuscator/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h:696:26: error: could not convert ‘((llvm::orc::remote::OrcRemoteTargetClient<ChannelT>*)this)->callB<llvm::orc::remote::OrcRemoteTargetRPCAPI::ReadMem>(Src, Size)’ from ‘Expected<vector<unsigned char,allocator<unsigned char>>>’ to ‘Expected<vector<char,allocator<char>>>’
  696 |     return callB<ReadMem>(Src, Size);
      |            ~~~~~~~~~~~~~~^~~~~~~~~~~
      |                          |
      |                          Expected<vector<unsigned char,allocator<unsigned char>>
``` now

@v4kst1z
Copy link

v4kst1z commented Aug 16, 2021

also getting

/home/raizo/work/obfuscator/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h:696:26: error: could not convert ‘((llvm::orc::remote::OrcRemoteTargetClient<ChannelT>*)this)->callB<llvm::orc::remote::OrcRemoteTargetRPCAPI::ReadMem>(Src, Size)’ from ‘Expected<vector<unsigned char,allocator<unsigned char>>>’ to ‘Expected<vector<char,allocator<char>>>’
  696 |     return callB<ReadMem>(Src, Size);
      |            ~~~~~~~~~~~~~~^~~~~~~~~~~
      |                          |
      |                          Expected<vector<unsigned char,allocator<unsigned char>>
``` now

change readMem function return to Expected<std::vector<unsigned char>>

Expected<std::vector<unsigned char>> readMem(char *Dst, JITTargetAddress Src,
                                      uint64_t Size) {
    // Check for an 'out-of-band' error, e.g. from an MM destructor.
    if (ExistingError)
      return std::move(ExistingError);

    return callB<ReadMem>(Src, Size);
  }

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

No branches or pull requests

2 participants