epasveer / seer

Seer - a gui frontend to gdb
GNU General Public License v3.0
2.11k stars 67 forks source link

Build script can't find build QT5 cmake files on MacOS #137

Closed Joebeazelman closed 9 months ago

Joebeazelman commented 1 year ago

On MacOS, the build script cannot locate the required QT cmake files. I had to manually set their locations in order to successfully build.

https://stackoverflow.com/questions/38746635/how-to-solve-qt5-packages-not-found-cmake-errors-in-mac

One possible cause for this error message is outdated CMake code like

find_package(Qt5Core REQUIRED). Then there is a good chance for solving the problem by changing to

find_package(Qt5 COMPONENTS REQUIRED Core).

epasveer commented 1 year ago

Thanks. Let me try changing it to the style you mention.

epasveer commented 1 year ago

I've changed CMakeFiles.txt to the style you mention. Everything thing still compiles. Thanks for the suggestion!

My CI/CD pipeline, which builds my MacOS snapshot release, still works fine. Perhaps you can clone the latest "main" and try building it to see if it has gone away for you. Or download the source tar ball.

https://github.com/epasveer/seer/archive/refs/tags/macos-latest.tar.gz https://github.com/epasveer/seer/archive/refs/tags/macos-latest.zip

Joebeazelman commented 1 year ago

I'm still getting the following error:

CMake Error at CMakeLists.txt:16 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one.

Could not find a package configuration file provided by "Qt5" with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. If "Qt5" provides a separate development package or SDK, be sure it has been installed.


epasveer commented 1 year ago

Thanks. My buddy ran into the problem with his Mac machine. I'll do some more looking...

Joebeazelman commented 1 year ago

I got it to compile. I had to set the path correctly.

epasveer commented 1 year ago

I found this on the web:

$ cmake  -DQt5_DIR=$(brew --prefix qt)/lib/cmake/Qt5 ..

Seems to be a common thing with Qt and cmake on MacOS. Is that what you had to do?

Joebeazelman commented 1 year ago

Yes and no. Yes, I had to point it to homebrew's install path for qt5. No, in that I manually edited the file to use the correct cmake path folders.

epasveer commented 1 year ago

Hi,

I got it to compile. I had to set the path correctly.

Sorry to ask again. Can you detail all you had to set/change, and the eventual cmake command you ran.

(I think I'll need to get myself a cheep Mac machine)

Joebeazelman commented 1 year ago

I need to find the script somewhere. Stay tuned.

Get an M1 MacMini for under $700, but be careful, it's a slippery slope. Your sheetmetal boxes with radiators will eventually become doorstops, and you'll find yourself camping out in front of your local Apple Store whenever they release a new product.

Joebeazelman commented 1 year ago

I just pulled the latest main and it seems to build fine.

epasveer commented 9 months ago

Closing task. Can be reopened if required.