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

Build >3.3.7 without X ( cannot find QtSingleApplication) #7551

Closed
tudor2k3 opened this Issue Oct 7, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@tudor2k3

tudor2k3 commented Oct 7, 2017

  • affects any version over 3.3.7
  • linux distro: Gentoo Linux
  • libtorrent 0.13.6
  • qtsingleapplication 2.6.1_p20150629

What is the problem:

When trying to build without X, the following error appears:

-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test _PEDANTIC_IS_SUPPORTED
-- Performing Test _PEDANTIC_IS_SUPPORTED - Success
-- Detecting Glibc version...
-- Glibc version is 225, adding -D_DEFAULT_SOURCE
-- Performing Test _DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED
-- Performing Test _DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- libtorrent definitions: -DTORRENT_USE_OPENSSL;-DBOOST_ASIO_HASH_MAP_BUCKETS=1021;-DBOOST_EXCEPTION_DISABLE;-DBOOST_ASIO_ENABLE_CANCELIO;-DBOOST_ASIO_DYN_LINK;-DTORRENT_LINKING_SHARED;-I/usr/include/libtorrent
-- Libtorrent Boost dependencies: system
-- Boost version: 1.61.0
-- Found the following Boost libraries:
-- system
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2l")
-- Found LibtorrentRasterbar: /usr/lib64/libtorrent-rasterbar.so
-- Project is built in RELEASE mode.
-- Disabling debug output.
CMake Error at cmake/Modules/FindQtSingleApplication.cmake:77 (MESSAGE):
Could not find QtSingleApplication library
Call Stack (most recent call first):
src/CMakeLists.txt:97 (find_package)

What is the expected behavior:

Build the package.

Steps to reproduce:

Build without X.

Extra info(if any):

@tudor2k3

This comment has been minimized.

Show comment
Hide comment
@tudor2k3

tudor2k3 Oct 7, 2017

If it helps (https://bugs.gentoo.org/613194#c10):

The Qt5 version of QtSingleApplication is only searched for if Qt5Widgets is found (in cmake/Modules/FindQtSingleApplication.cmake):
IF(QT4_FOUND)
...
ELSEIF(Qt5Widgets_FOUND)

But Qt5Widgets is only found if GUI is enabled (in src/CMakeLists.txt):
list(APPEND QBT_QT_COMPONENTS Core Network Xml)
if (GUI)
list (APPEND QBT_QT_COMPONENTS Concurrent Gui Widgets)
endif (GUI)
...
find_package(Qt5 5.2.0 COMPONENTS ${QBT_QT_COMPONENTS} REQUIRED)

Considering that qtsingleapplication[qt5] only uses qtwidgets when built with USE="X", I suspect FindQtSingleApplication.cmake is incorrect.

tudor2k3 commented Oct 7, 2017

If it helps (https://bugs.gentoo.org/613194#c10):

The Qt5 version of QtSingleApplication is only searched for if Qt5Widgets is found (in cmake/Modules/FindQtSingleApplication.cmake):
IF(QT4_FOUND)
...
ELSEIF(Qt5Widgets_FOUND)

But Qt5Widgets is only found if GUI is enabled (in src/CMakeLists.txt):
list(APPEND QBT_QT_COMPONENTS Core Network Xml)
if (GUI)
list (APPEND QBT_QT_COMPONENTS Concurrent Gui Widgets)
endif (GUI)
...
find_package(Qt5 5.2.0 COMPONENTS ${QBT_QT_COMPONENTS} REQUIRED)

Considering that qtsingleapplication[qt5] only uses qtwidgets when built with USE="X", I suspect FindQtSingleApplication.cmake is incorrect.

@zeule zeule self-assigned this Oct 7, 2017

@zeule

This comment has been minimized.

Show comment
Hide comment
@zeule

zeule Oct 7, 2017

Contributor

Thank you for reporting this.

Contributor

zeule commented Oct 7, 2017

Thank you for reporting this.

@zeule zeule closed this in 0ad5290 Oct 8, 2017

zeule added a commit that referenced this issue Oct 8, 2017

Merge pull request #7555 from evsh/fix-qtsingleapplication-cmake
cmake: do not use Qt5Widgets when locating QtSingleApplication. Closes #7551.

zeule added a commit to zeule/qBittorrent that referenced this issue Oct 23, 2017

cmake: do not use Qt5Widgets when locating QtSingleApplication. Closes
…#7551.

This fixes cmake builds with GUI disabled and system
QtSingleApplication. We rely on Qt5::Core instead of Qt5::Widgets.

zeule added a commit that referenced this issue Oct 23, 2017

Merge pull request #7640 from evsh/v3_3_x
cmake: do not use Qt5Widgets when locating QtSingleApplication. Closes #7551.

sledgehammer999 added a commit that referenced this issue Oct 23, 2017

cmake: do not use Qt5Widgets when locating QtSingleApplication. Closes
…#7551.

This fixes cmake builds with GUI disabled and system
QtSingleApplication. We rely on Qt5::Core instead of Qt5::Widgets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment