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 tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj #105637

Open
YWtheGod opened this issue Aug 22, 2024 · 6 comments

Comments

@YWtheGod
Copy link

Error compiling tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj

version:
commit 51ca235 (HEAD -> main, origin/main, origin/HEAD)

compiler: mingw64 gcc 14.2

message:

D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:86:44: error: expected ';' before '(' token
   86 | using EditlineGetCharCallbackType = int (*)(::EditLine *editline,
      |                                            ^
      |                                            ;

etc...
@YWtheGod
Copy link
Author

editline.h on my computer:
Editline.h.zip

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 22, 2024

@llvm/issue-subscribers-lldb

Author: YWtheGod (YWtheGod)

Error compiling tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj

version:
commit 51ca235 (HEAD -> main, origin/main, origin/HEAD)

compiler: mingw64 gcc 14.2

message:

D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:86:44: error: expected ';' before '(' token
   86 | using EditlineGetCharCallbackType = int (*)(::EditLine *editline,
      |                                            ^
      |                                            ;

etc...

@bulbazord
Copy link
Member

Do you have the specific compile command that was used to try to compile Editline.cpp? The error message is strange to me, I would imagine minGW's gcc 14.2 should be able to understand this function pointer type.

@YWtheGod
Copy link
Author

To bullbazord:

[13/3635] Building CXX object tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj
FAILED: tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj
D:\msys64\mingw64\bin\c++.exe -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DUNICODE -D_BSD_SOURCE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_FILE_OFFSET_BITS=64 -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/source/Host -ID:/msys64/home/ywthe/llvm-project/lldb/source/Host -ID:/msys64/home/ywthe/llvm-project/lldb/include -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/include -ID:/msys64/home/ywthe/llvm-project/build/include -ID:/msys64/home/ywthe/llvm-project/llvm/include -ID:/conda/include -ID:/msys64/home/ywthe/llvm-project/llvm/../clang/include -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/../clang/include -ID:/msys64/home/ywthe/llvm-project/lldb/source -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/source -isystem D:/msys64/mingw64/include/libxml2 -Wa,-mbig-obj -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation  -O2 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj -MF tools\lldb\source\Host\CMakeFiles\lldbHost.dir\common\Editline.cpp.obj.d -o tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj -c D:/msys64/home/ywthe/llvm-project/lldb/source/Host/common/Editline.cpp
In file included from D:/msys64/home/ywthe/llvm-project/lldb/source/Host/common/Editline.cpp:13:
D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:86:44: error: expected ';' before '(' token
   86 | using EditlineGetCharCallbackType = int (*)(::EditLine *editline,
      |                                            ^
      |                                            ;
D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:88:54: error: expected ';' before '(' token
   88 | using EditlineCommandCallbackType = unsigned char (*)(::EditLine *editline,
      |                                                      ^
      |                                                      ;
D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:90:51: error: expected ';' before '(' token
   90 | using EditlinePromptCallbackType = const char *(*)(::EditLine *editline);
      |                                                   ^
      |                                                   ;

etc...

@YWtheGod
Copy link
Author

And I tryed to build lldb on Ubuntu 18.04+gcc 11.4, It didn't have the same issue.

@bulbazord
Copy link
Member

Hmm, I'm not sure what could be going on here. I would recommend trying to reduce the problem by removing code from the file and recompiling to see which pattern triggers the error.

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

No branches or pull requests

4 participants