Re: [I] [C++] Error linking the util/cancel.h [arrow]
hharng commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-4531276794 For those who will encounter this error, here is how I fixed it for me when my Qt 6 project was giving me this error when trying to compile it with an added #include : When building and installing Arrow from source, I had installed Arrow into /usr/local, so I had to open it like this: sudo nano /usr/local/include/arrow/util/cancel.h Scroll down to the bottom and replace the name of the method paramer from "signals" to something else (I just added an underscore, so it became "_signals"). Close and reopen QtCreator, open the project, compile. The problem is now gone. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
github-actions[bot] commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-4396840378 This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this usage question has evolved into a feature request or docs update, please remove the 'Type: usage' label and add the 'Type: enhancement' label instead. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
kou commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2856773278 Thanks. I got it. Qt defines `signals` macro as `public`. So the `signals` parameter name in https://github.com/apache/arrow/blob/272715f6df2a042d69881ffa03d5078c58e4b345/cpp/src/arrow/util/cancel.h#L112 is replaced to `public`. It causes the error because `public` is a C++ keyword. How to fix: Define `QT_NO_META_MACROS` before you include Qt. It prevents defining the `signals` macro. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
tungdsefastec commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2856724709 This is the main.i [main.txt](https://github.com/user-attachments/files/20074358/main.txt) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
kou commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2854327940 Could you generate pre-processed result by `-P -C` instead of `-c`? ```text C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\cl.exe /nologo /TP -DQT_CORE_LIB -DQT_NO_DEBUG -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -ID:\1.Work\1.Code\untitled\apache-arrow\include -external:ID:\1.Work\1.Code\untitled\build\Desktop_Qt_6_6_3_MSVC2019_64bit-Release\untitled_autogen\include -external:IC:\Qt\6.6.3\msvc2019_64\include\QtCore -external:IC:\Qt\6.6.3\msvc2019_64\include -external:IC:\Qt\6.6.3\msvc2019_64\mkspecs\win32-msvc -external:W0 /DWIN32 /D_WINDOWS /EHsc /O2 /Ob2 /DNDEBUG -std:c++17 -MD -Zc:__cplusplus -permissive- -utf-8 /showIncludes /FoCMakeFiles\untitled.dir\main.cpp.obj /FdCMakeFiles\untitled.dir\ /FS -P -C D:\1.Work\1.Code\untitled\main.cpp ``` This will generate `D:\1.Work\1.Code\untitled\main.i`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
tungdsefastec commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2853894703 Sorry. This is updated compile output for arrow version 19.0.1. `[1/2 0.8/sec] Building CXX object CMakeFiles\untitled.dir\main.cpp.obj FAILED: CMakeFiles/untitled.dir/main.cpp.obj C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\cl.exe /nologo /TP -DQT_CORE_LIB -DQT_NO_DEBUG -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -ID:\1.Work\1.Code\untitled\apache-arrow\include -external:ID:\1.Work\1.Code\untitled\build\Desktop_Qt_6_6_3_MSVC2019_64bit-Release\untitled_autogen\include -external:IC:\Qt\6.6.3\msvc2019_64\include\QtCore -external:IC:\Qt\6.6.3\msvc2019_64\include -external:IC:\Qt\6.6.3\msvc2019_64\mkspecs\win32-msvc -external:W0 /DWIN32 /D_WINDOWS /EHsc /O2 /Ob2 /DNDEBUG -std:c++17 -MD -Zc:__cplusplus -permissive- -utf-8 /showIncludes /FoCMakeFiles\untitled.dir\main.cpp.obj /FdCMakeFiles\untitled.dir\ /FS -c D:\1.Work\1.Code\untitled\main.cpp D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(112): error C2143: syntax error: missing ')' before 'public' D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(112): error C2143: syntax error: missing ';' before 'public' D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(112): error C2059: syntax error: 'public' D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(112): error C2059: syntax error: ')' ninja: build stopped: subcommand failed. 16:34:48: The process "C:\Qt\Tools\CMake_64\bin\cmake.exe" exited with code 1. Error while building/deploying project untitled (kit: Desktop Qt 6.6.3 MSVC2019 64bit) When executing step "Build" 16:34:48: Elapsed time: 00:01.` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
kou commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2853522401 https://github.com/apache/arrow/blob/272715f6df2a042d69881ffa03d5078c58e4b345/cpp/src/arrow/util/cancel.h#L109 The target line is a comment line. Did you change `arrow/util/cancel.h`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
tungdsefastec commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2853448271 I used arrow 19.0.1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
kou commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2853414603 What Apache Arrow C++ version are you using? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
tungdsefastec commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2852808815 Here is the compile output. `07:07:25: Starting: "C:\Qt\Tools\CMake_64\bin\cmake.exe" --build D:/1.Work/1.Code/untitled/build/Desktop_Qt_6_6_3_MSVC2019_64bit-Release --target all [1/4 8.9/sec] Automatic MOC and UIC for target untitled [2/4 14.3/sec] Building CXX object CMakeFiles\untitled.dir\untitled_autogen\mocs_compilation.cpp.obj [3/4 2.8/sec] Building CXX object CMakeFiles\untitled.dir\main.cpp.obj FAILED: CMakeFiles/untitled.dir/main.cpp.obj C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\cl.exe /nologo /TP -DQT_CORE_LIB -DQT_NO_DEBUG -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -ID:\1.Work\1.Code\untitled\apache-arrow\include -external:ID:\1.Work\1.Code\untitled\build\Desktop_Qt_6_6_3_MSVC2019_64bit-Release\untitled_autogen\include -external:IC:\Qt\6.6.3\msvc2019_64\include\QtCore -external:IC:\Qt\6.6.3\msvc2019_64\include -external:IC:\Qt\6.6.3\msvc2019_64\mkspecs\win32-msvc -external:W0 /DWIN32 /D_WINDOWS /EHsc /O2 /Ob2 /DNDEBUG -std:c++17 -MD -Zc:__cplusplus -permissive- -utf-8 /showIncludes /FoCMakeFiles\untitled.dir\main.cpp.obj /FdCMakeFiles\untitled.dir\ /FS -c D:\1.Work\1.Code\untitled\main.cpp D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(109): error C2143: syntax error: missing ')' before 'public' D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(109): error C2143: syntax error: missing ';' before 'public' D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(109): error C2059: syntax error: 'public' D:\1.Work\1.Code\untitled\apache-arrow\include\arrow/util/cancel.h(109): error C2059: syntax error: ')' ninja: build stopped: subcommand failed. 07:07:26: The process "C:\Qt\Tools\CMake_64\bin\cmake.exe" exited with code 1. Error while building/deploying project untitled (kit: Desktop Qt 6.6.3 MSVC2019 64bit) When executing step "Build"` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
kou commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2841026652 Could you show full build log of the test program? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
tungdsefastec commented on issue #46258:
URL: https://github.com/apache/arrow/issues/46258#issuecomment-2840546001
I used vcpkg for downloading the package. The version of the arrow is
19.0.1. Actually, the MSVC 16 does support the C++17, and we are currently
using C++ 17 for our project. We suspect that it conflicts with the
qcoreapplication.h. I can build without errors if not including, or putting the
arrow header before the qcoreapplication.h.
I made a simple example to check.
With this version, it will give error.
#include
#include
#include "arrow/io/file.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
std::cout << "nothing to show";
a.exec();
}
However, if I put the "arrow/io/file.h" before the QCoreApplication, it will
be fine.
#include
#include "arrow/io/file.h"
#include
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
std::cout << "nothing to show";
a.exec();
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [I] [C++] Error linking the util/cancel.h [arrow]
raulcd commented on issue #46258: URL: https://github.com/apache/arrow/issues/46258#issuecomment-2837794633 Could you give more details on how are you building Arrow? How are you downloading it? What version of Arrow are you using? From my understanding MSVC 16 is out of support and uses C++14 as its standard, C++ 17 has been required for Arrow for the last 2.5 years (https://github.com/apache/arrow/pull/13991) but I am unsure if that's the issue without more details. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
