Skip to content
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

CMake build requires qmake? #154

Open
vadi2 opened this issue Nov 27, 2019 · 6 comments
Open

CMake build requires qmake? #154

vadi2 opened this issue Nov 27, 2019 · 6 comments

Comments

@vadi2
Copy link
Contributor

vadi2 commented Nov 27, 2019

It would seem the cmake build requires qmake - which is super odd, is this supposed to happen?

/snap/clion/96/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -Wno-dev -DCMAKE_PREFIX_PATH=/home/vadi/Programs/Qt/5.13.0/gcc_64/ -G "CodeBlocks - Unix Makefiles" /home/vadi/Programs/Mudlet/mudlet
-- Including optional updater module
-- Including optional fonts module
-- Excluding optional 3D mapper module explicitly
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/local/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether gcc and cc understand -c and -o together... yes
checking whether make sets $(MAKE)... (cached) yes
checking for python3... python3
checking for ANSI C header files... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for stdint.h... (cached) yes
checking size of int... 4
checking size of short... 2
checking size of long... 8
checking size of void*... 8
checking size of long long... 8
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for working memcmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating onigmo-config
config.status: creating sample/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands
CMake Warning at 3rdparty/qtkeychain/cmake/Modules/ECMQueryQmake.cmake:29 (message):
  Failed call: /home/vadi/Programs/Qt/5.13.0/gcc_64/bin/qmake -query
  "QT_INSTALL_PREFIX"
Call Stack (most recent call first):
  3rdparty/qtkeychain/cmake/Modules/ECMGeneratePriFile.cmake:105 (query_qmake)
  3rdparty/qtkeychain/CMakeLists.txt:18 (include)


CMake Error at 3rdparty/qtkeychain/cmake/Modules/ECMQueryQmake.cmake:30 (message):
  QMake call failed: No such file or directory
Call Stack (most recent call first):
  3rdparty/qtkeychain/cmake/Modules/ECMGeneratePriFile.cmake:105 (query_qmake)
  3rdparty/qtkeychain/CMakeLists.txt:18 (include)


-- Configuring incomplete, errors occurred!
See also "/home/vadi/Programs/Mudlet/mudlet/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/home/vadi/Programs/Mudlet/mudlet/cmake-build-debug/CMakeFiles/CMakeError.log".

[Failed to reload]
@oliviervibe
Copy link

I'm getting the same error while trying to configure for Visual Studio 2015 x64. QT 5.9.8 is installed and BUILD_WITH_QT4 is not set.

Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.18362.
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- 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: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Warning at cmake/Modules/ECMQueryQmake.cmake:16 (message):
Should specify a qmake Qt5 binary. Can't check QT_INSTALL_PREFIX
Call Stack (most recent call first):
cmake/Modules/ECMGeneratePriFile.cmake:105 (query_qmake)
CMakeLists.txt:18 (include)

CMake Error at D:/Programs/Cmake/share/cmake-3.16/Modules/FindQt4.cmake:1314 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:97 (find_package)

Configuring incomplete, errors occurred!
See also "D:/dev/Nextcloud/qtkeychain-master/build/CMakeFiles/CMakeOutput.log".

Is there any option that needs to be set when calling the configuration to avoid that?

@vadi2
Copy link
Contributor Author

vadi2 commented Feb 22, 2020

As a workaround, setting -DCMAKE_PREFIX_PATH= to a valid Qt installation works for the time being.

@frankosterfeld
Copy link
Owner

Please provide more details on how the qtkeychain build is included in the respective main project build.

@vadi2
Copy link
Contributor Author

vadi2 commented Jan 18, 2021

add_subdirectory https://github.com/Mudlet/Mudlet/blob/development/CMakeLists.txt#L133
target_compile_definitions(mudlet PRIVATE INCLUDE_OWN_QT5_KEYCHAIN QTKEYCHAIN_NO_EXPORT) https://github.com/Mudlet/Mudlet/blob/development/src/CMakeLists.txt#L382

@SlySven
Copy link

SlySven commented Jan 18, 2021

TBH I have seen an opposite sort of warning along the lines of:

Unused executable qmake found.

which is probably what one might expect - CMake is told to find Qt and it also finds qmake - yet, of course, by using CMake one does not want to use qmake...

🤷‍♂️

@frankosterfeld
Copy link
Owner

I've seen errors like this when qtkeychain was built using ExternalProject_Add, not passing on the CMAKE_PREFIX_PATH to the external build and Qt simply wasn't found, I believe. But this doesn't seem to be the problem here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants