Page MenuHomePhabricator

Fix Huggle build on Travis CI
Closed, ResolvedPublic

Description

It works only for 1 build now (Qt4 I think) other is broken, so I had to disable it. We need to fix it and re-enable travis for all builds on linux.

Event Timeline

Petrb triaged this task as Medium priority.Apr 2 2016, 9:05 AM

Example of a build erroring: https://travis-ci.org/huggle/huggle3-qt-lx/builds/80786704 . Error message:

CMake Error at extension_list/extension-scoring/CMakeLists.txt:18 (find_package):
  Could not find module FindQt5Core.cmake or a configuration file for package
  Qt5Core.
  Adjust CMAKE_MODULE_PATH to find FindQt5Core.cmake or set Qt5Core_DIR to
  the directory containing a CMake configuration file for Qt5Core.  The file
  will have one of the following names:
    Qt5CoreConfig.cmake
    qt5core-config.cmake

CMake Error at extension_list/extension-scoring/CMakeLists.txt:19 (find_package):
  Could not find module FindQt5Gui.cmake or a configuration file for package
  Qt5Gui.
  Adjust CMAKE_MODULE_PATH to find FindQt5Gui.cmake or set Qt5Gui_DIR to the
  directory containing a CMake configuration file for Qt5Gui.  The file will
  have one of the following names:
    Qt5GuiConfig.cmake
    qt5gui-config.cmake

CMake Error at extension_list/extension-scoring/CMakeLists.txt:20 (find_package):
  Could not find module FindQt5WebKit.cmake or a configuration file for
  package Qt5WebKit.
  Adjust CMAKE_MODULE_PATH to find FindQt5WebKit.cmake or set Qt5WebKit_DIR
  to the directory containing a CMake configuration file for Qt5WebKit.  The
  file will have one of the following names:
    Qt5WebKitConfig.cmake
    qt5webkit-config.cmake

CMake Error at extension_list/extension-scoring/CMakeLists.txt:21 (find_package):
  Could not find module FindQt5Xml.cmake or a configuration file for package
  Qt5Xml.
  Adjust CMAKE_MODULE_PATH to find FindQt5Xml.cmake or set Qt5Xml_DIR to the
  directory containing a CMake configuration file for Qt5Xml.  The file will
  have one of the following names:
    Qt5XmlConfig.cmake
    qt5xml-config.cmake

CMake Error at extension_list/extension-scoring/CMakeLists.txt:22 (find_package):
  Could not find module FindQt5Widgets.cmake or a configuration file for
  package Qt5Widgets.
  Adjust CMAKE_MODULE_PATH to find FindQt5Widgets.cmake or set Qt5Widgets_DIR
  to the directory containing a CMake configuration file for Qt5Widgets.  The
  file will have one of the following names:
    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

CMake Error at extension_list/extension-scoring/CMakeLists.txt:23 (find_package):
  Could not find module FindQt5Network.cmake or a configuration file for
  package Qt5Network.
  Adjust CMAKE_MODULE_PATH to find FindQt5Network.cmake or set Qt5Network_DIR
  to the directory containing a CMake configuration file for Qt5Network.  The
  file will have one of the following names:
    Qt5NetworkConfig.cmake
    qt5network-config.cmake

CMake Error at extension_list/extension-scoring/CMakeLists.txt:55 (QT5_WRAP_CPP):
  Unknown CMake command "QT5_WRAP_CPP".

-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found.  Stop.

Disabled in https://github.com/huggle/huggle3-qt-lx/commit/2ebfffbef3447e42fe77100637e27c0a3db5f610

I have done quite a bit more digging into this.

The problem, at its heart, is the same problem I ran into on T157837: WebKit is depricated and has been removed from Qt5.8. The problem will be solved by setting a "CMAKE_MODULE_PATH" or building a script similar to the following that will set individual paths:

#!/bin/sh

export Qt5Core_DIR=/Users/Matthew/Qt5.8.0/5.8/clang_64/lib/cmake/Qt5Core
export Qt5Network_DIR=/Users/Matthew/Qt5.8.0/5.8/clang_64/lib/cmake/Qt5Network
export Qt5Gui_DIR=/Users/Matthew/Qt5.8.0/5.8/clang_64/lib/cmake/Qt5Gui
export Qt5Xml_DIR=/Users/Matthew/Qt5.8.0/5.8/clang_64/lib/cmake/Qt5Xml
export Qt5Widgets_DIR=/Users/Matthew/Qt5.8.0/5.8/clang_64/lib/cmake/Qt5Widgets
export Qt5WebEngine_DIR=/Users/Matthew/Qt5.8.0/5.8/clang_64/lib/cmake/Qt5WebEngine

The remaining question is: where does Travis store its Qt5? Further investigation is needed, as Google is showing nothing right now.

Krinkle renamed this task from Fix travis to Fix Huggle build on Travis CI.Jul 29 2017, 1:50 AM

Travis doesn't support Qt5 very well, the problem here is that it's using ubuntu as backend, and every version of ubuntu changes their semantics for package naming for Qt, so preinstall script that installs dependencies would have to change with every ubuntu version.

I made a travis build Qt5 on OSX though