Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#66593 closed defect (worksforme)

qt6 references file in /opt/local/bin, which do not exist

Reported by: kgarrels Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: qt6-qtbase

Description (last modified by kgarrels)

Hi,

got this error now building cmake projects, works if I uninstall all of qt6 and use qt5 instead. All qt6 version 6.2.4_2+openssl

Any suggestions?

Happy New Year, kai

CMake Error at /opt/local/lib/cmake/Qt6CoreTools/Qt6CoreToolsTargets.cmake:154 (message):
  The imported target "Qt6::moc" references the file

     "/opt/local/bin/moc"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/opt/local/lib/cmake/Qt6CoreTools/Qt6CoreToolsTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /opt/local/lib/cmake/Qt6CoreTools/Qt6CoreToolsConfig.cmake:37 (include)
  /opt/local/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:76 (find_package)
  /opt/local/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:40 (include)
  /opt/local/lib/cmake/Qt6/Qt6Config.cmake:209 (find_package)
  CMakeLists.txt:124 (find_package)

Change History (9)

comment:1 Changed 15 months ago by kgarrels

Description: modified (diff)

comment:2 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Port: qt6-qtbase added

qt6-qtbase installs /opt/local/libexec/qt6/bin/moc.

comment:3 Changed 15 months ago by kgarrels

it does, but cmake does not look there...seems some prefix is not set, how could I do that?

comment:4 Changed 15 months ago by reneeotten (Renee Otten)

You don’t show the command you're using to do the build - just to be sure: are you using qt-cmake?

comment:5 Changed 15 months ago by kgarrels

ho ho ho - that was it! Thanks a lot!

Has this changed? because I was using macports' cmake until the last update of qt6...

Thanks again & Happy New Year! kai

comment:6 Changed 15 months ago by kgarrels

Type: defectrequest

comment:7 Changed 15 months ago by reneeotten (Renee Otten)

Resolution: worksforme
Status: newclosed

Things did change with a recent Qt6 update in an attempt to resolve some other CMake issues we were seeing. However, you were always supposed ot use qt-cmake as described in the upstream documentation.

comment:8 Changed 15 months ago by jmroot (Joshua Root)

Type: requestdefect

comment:9 Changed 15 months ago by kgarrels

perfect, thanks for the explanation, your rapid response and clarity!

Note: See TracTickets for help on using tickets.