← All tasks
cppPointCloudLibrary/pcl #6390Not a task: not reproduced

[cmake] Qt6 cmake errors

envgap__PointCloudLibrary__pcl-6390

01 / FAILURE SIGNATURE

As reported upstream

When building with Qt6 on Ubuntu 24.04 with ROS installed, cmake produces the following error:
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
6e9460ca20220d2f6d926d42e0c936dc587e9126
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

PointCloudLibrary/pcl #6390 · read the original issue
<!--- WARNING: This is an issue tracker. Before opening a new issue make sure you read https://github.com/PointCloudLibrary/pcl/blob/master/CONTRIBUTING.md#using-the-issue-tracker. -->
**Describe the bug**

When building with Qt6 on Ubuntu 24.04 with ROS installed, cmake produces the following error:
```
 CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:42 (message):
   Some (but not all) targets in this export set were already defined.

   Targets Defined: Qt::Core

   Targets not yet defined: Qt::CorePrivate

 Call Stack (most recent call first):
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreConfig.cmake:65 (include)
   /usr/share/cmake-3.28/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtPublicDependencyHelpers.cmake:108 (find_dependency)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Concurrent/Qt6ConcurrentDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Concurrent/Qt6ConcurrentConfig.cmake:50 (include)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:167 (find_package)
   cmake/pcl_find_qt.cmake:28 (find_package)
   CMakeLists.txt:432 (include)

 Configuring incomplete, errors occurred!
```

**Context**

Building pcl with Qt6.

**Expected behavior**
CMake should be able to successfully find and link to Qt6 without the error.

**Current Behavior**

If you switch from `WITH_QT=AUTO` to `WITH_QT=QT5` everything builds properly. Auto and QT6 produce the same error as seen above. 

**To Reproduce**
Ubuntu 24.04 with ROS installed.
Install Qt6 from apt. 
Try to run cmake for pcl with qt. 

```
docker run -it --rm osrf/ros:rolling-desktop-full
git clone https://github.com/PointCloudLibrary/pcl.git
mkdir pcl/build
cd pcl/build
cmake ..
```

**Your Environment (please complete the following information):**

 - OS: Ubuntu 24.04
 - Compiler: CMake 3.28.3
 - PCL Version: HEAD

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]