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

Failure to build pcl against Qt 6 #5776

Closed
fxcoudert opened this issue Jul 31, 2023 · 2 comments · Fixed by #5777
Closed

Failure to build pcl against Qt 6 #5776

fxcoudert opened this issue Jul 31, 2023 · 2 comments · Fixed by #5777
Labels
kind: bug Type of issue status: triage Labels incomplete

Comments

@fxcoudert
Copy link

Describe the bug

Building pcl 1.13.1 against Qt 6.5.1 as part of Homebrew (where we previously used Qt 5.15.10) leads to a build failure:

  In file included from /tmp/pcl-20230731-43792-ujwqr0/pcl-pcl-1.13.1/apps/cloud_composer/src/signal_multiplexer.cpp:1:
  /tmp/pcl-20230731-43792-ujwqr0/pcl-pcl-1.13.1/apps/cloud_composer/include/pcl/apps/cloud_composer/signal_multiplexer.h:51:38: error: base class has incomplete type
      class SignalMultiplexer : public QObject
                                ~~~~~~~^~~~~~~
  /opt/homebrew/include/QtCore/qtclasshelpermacros.h:81:7: note: forward declaration of 'QObject'
  class QObject;
        ^
  In file included from /tmp/pcl-20230731-43792-ujwqr0/pcl-pcl-1.13.1/apps/cloud_composer/src/signal_multiplexer.cpp:1:
  /tmp/pcl-20230731-43792-ujwqr0/pcl-pcl-1.13.1/apps/cloud_composer/include/pcl/apps/cloud_composer/signal_multiplexer.h:146:27: error: implicit instantiation of undefined template 'QList<pcl::cloud_composer::SignalMultiplexer::Connection>'
          QList<Connection> connections;
                            ^
  /opt/homebrew/include/QtCore/qcontainerfwd.h:29:29: note: template is declared here
  template <typename T> class QList;
                              ^
  /tmp/pcl-20230731-43792-ujwqr0/pcl-pcl-1.13.1/apps/cloud_composer/src/signal_multiplexer.cpp:5:5: error: type 'QObject' is not a direct or virtual base of 'pcl::cloud_composer::SignalMultiplexer'
    : QObject (parent)
      ^~~~~~~
  3 errors generated.

Context

Trying to move, in Homebrew (a macOS open source distro), as many packages to Qt 6 as possible given the near EOL of Qt 5: Homebrew/homebrew-core#138034

Expected behavior

Build with Qt 5 is successful. I hoped it would be the same with Qt 6 :)

Current Behavior

See error above.

To Reproduce

We build pcl from source with:

cmake .. -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/pcl/1.13.1_2 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DBUILD_TESTING=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_apps=AUTO_OFF -DBUILD_apps_3d_rec_framework=AUTO_OFF -DBUILD_apps_cloud_composer=AUTO_OFF -DBUILD_apps_in_hand_scanner=AUTO_OFF -DBUILD_apps_point_cloud_editor=AUTO_OFF -DBUILD_examples:BOOL=OFF -DBUILD_global_tests:BOOL=OFF -DBUILD_outofcore:BOOL=AUTO_OFF -DBUILD_people:BOOL=AUTO_OFF -DBUILD_simulation:BOOL=ON -DWITH_CUDA:BOOL=OFF -DWITH_DOCS:BOOL=OFF -DWITH_TUTORIALS:BOOL=OFF -DBoost_USE_DEBUG_RUNTIME:BOOL=OFF -DBUILD_apps_modeler:BOOL=OFF -DPCL_ENABLE_MARCHNATIVE:BOOL=OFF && make install

Your Environment (please complete the following information):

  • OS: macOS 11
  • Compiler: AppleClang 13.0.0.13000029
  • PCL Version: 1.13.1
@mvieth
Copy link
Member

mvieth commented Jul 31, 2023

@fxcoudert Can you try the following, please:

diff --git a/apps/cloud_composer/include/pcl/apps/cloud_composer/signal_multiplexer.h b/apps/cloud_composer/include/pcl/apps/cloud_composer/signal_multiplexer.h
index 86c72299a..c8a5224f5 100644
--- a/apps/cloud_composer/include/pcl/apps/cloud_composer/signal_multiplexer.h
+++ b/apps/cloud_composer/include/pcl/apps/cloud_composer/signal_multiplexer.h
@@ -42,6 +42,8 @@
 
 #pragma once
 
+#include <QList>
+#include <QObject>
 #include <QPointer>
 
 namespace pcl

@fxcoudert
Copy link
Author

Yes, that diff fixes the build issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Type of issue status: triage Labels incomplete
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants