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

lxqt-build-tools version "0.8.0" required for compilation? #402

Closed
mcondarelli opened this issue Jan 28, 2021 · 3 comments · Fixed by #410
Closed

lxqt-build-tools version "0.8.0" required for compilation? #402

mcondarelli opened this issue Jan 28, 2021 · 3 comments · Fixed by #410

Comments

@mcondarelli
Copy link

Apparently build instructions are a bit off.
They state:

The only runtime dependency is qtbase ≥ 5.7.1. In order to build CMake ≥ 3.0.2 and lxqt-build-tools >= 0.4.0 are needed as well as Git to pull translations and optionally latest VCS checkouts.

But I get:

mcon@cinderella:~/projects/qtermwidget/build$ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:39 (find_package):
  Could not find a configuration file for package "lxqt-build-tools" that is
  compatible with requested version "0.8.0".

  The following configuration files were considered but not accepted:

    /usr/share/cmake/lxqt-build-tools/lxqt-build-tools-config.cmake, version: 0.6.0



-- Configuring incomplete, errors occurred!
See also "/home/mcon/projects/qtermwidget/build/CMakeFiles/CMakeOutput.log".

I am running on a fairly up-to date Linux Mint 20.1 "Ulyssa".
My distribution already has binary distribution for qtermwidget, my only interest in compiling is I need to use this from Python (either PyQt5 or Pyside) and I was not able to find relevant bindings while I understand they should be available recompiling.

Build instructions for Python would be much appreciated.
I could help in preparing a setup.py suitable for general consumption (i.e.: for PyPi)

Thanks In Advance
Mauro

@mcondarelli
Copy link
Author

mcondarelli commented Jan 28, 2021

Update:
I have been able to overcome the above problem by manually lowering requirements in CMaleLists.txt, but I'm far from confident that is a good idea.

I also tried to build the PyQt5 bindings, but I got a bad error (apparently unrelated to the above):

mcon@cinderella:~/projects/qtermwidget/buildpy$ cmake ../pyqt/
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python (found version "3.8.5") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found version "3.8.5") 
-- Python system site-packages directory: /usr/lib/python3/dist-packages
-- The Python files will be installed to /usr/local/lib/python3/dist-packages. Make sure to add them to the Python search path (e.g. by setting PYTHONPATH)
-- Found PythonLibrary: /usr/lib/x86_64-linux-gnu/libpython3.8.so  
-- Found SIP version: 4.19.21
-- Found PyQt5 version: 5.14.1
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.16)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/mcon/projects/qtermwidget/buildpy
mcon@cinderella:~/projects/qtermwidget/buildpy$ make
Scanning dependencies of target __home_mcon_projects_qtermwidget_buildpy____pycache_____init__.cpython-38.pyc
Byte-compiling /home/mcon/projects/qtermwidget/buildpy//__init__.py to /home/mcon/projects/qtermwidget/buildpy//__pycache__/__init__.cpython-38.pyc
[  0%] Built target __home_mcon_projects_qtermwidget_buildpy____pycache_____init__.cpython-38.pyc
[ 10%] Generating sip/sipQTermWidgetpart0.cpp, sip/sipQTermWidgetpart1.cpp, sip/sipQTermWidgetpart2.cpp, sip/sipQTermWidgetpart3.cpp, sip/sipQTermWidgetpart4.cpp, sip/sipQTermWidgetpart5.cpp, sip/sipQTermWidgetpart6.cpp, sip/sipQTermWidgetpart7.cpp

Scanning dependencies of target python_module_QTermWidget
[ 20%] Building CXX object CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart0.o
In file included from /home/mcon/projects/qtermwidget/buildpy/sip/sipQTermWidgetpart0.cpp:7:
/home/mcon/projects/qtermwidget/buildpy/sip/sipAPIQTermWidget.h:12:10: fatal error: QMetaType: No such file or directory
   12 | #include <QMetaType>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/python_module_QTermWidget.dir/build.make:91: CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart0.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/python_module_QTermWidget.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

QMetaType is available, of course, as part of the qtbase5-dev package:

mcon@cinderella:~/projects/qtermwidget/buildpy$ ls -l /usr/include/x86_64-linux-gnu/qt5/*/QMetaType
-rw-r--r-- 1 root root 23 Jan 22  2020 /usr/include/x86_64-linux-gnu/qt5/QtCore/QMetaType

But, for some reason, is not found :(

Any hint welcome.
TiA!

@mcondarelli
Copy link
Author

Update2:
I managed to have an apparently working version of QTermWidget.

I am uneasy with it thou as I had to compile with:

CPLUS_INCLUDE_PATH='/usr/include/x86_64-linux-gnu/qt5:/usr/include/x86_64-linux-gnu/qt5/QtCore:/usr/include/x86_64-linux-gnu/qt5/QtGui:/usr/include/x86_64-linux-gnu/qt5/QtWidgets:../build:/home/mcon/projects/qtermwidget/build/lib' make

which surely does not look right.

Explicit build instructions would be most welcome.
I will not venture in building for pyside2/pyside6 without some directions.

Thanks.

@yan12125
Copy link
Member

lxqt-build-tools version "0.8.0" required for compilation?

I have been able to overcome the above problem by manually lowering requirements in CMaleLists.txt, but I'm far from confident that is a good idea.

Yes, qtermwidget targets only the latest version of lxqt-build-tools. Older version may work but not recommended.

Build instructions for Python would be much appreciated.

Currently PyQt bindings should be built together with the main library using the cmake option QTERMWIDGET_BUILD_PYTHON_BINDING=ON. Our CI script for Arch Linux may help https://github.com/lxqt/qtermwidget/blob/master/.ci/build.sh

I could help in preparing a setup.py suitable for general consumption (i.e.: for PyPi)

That is much appreciated! Leave a comment at #364 is you have anything to discuss/share/etc.

I also tried to build the PyQt5 bindings, but I got a bad error (apparently unrelated to the above):

I am uneasy with it thou as I had to compile with:

Thanks for testing. Include paths should be correctly set with QTERMWIDGET_BUILD_PYTHON_BINDING=ON

I will not venture in building for pyside2/pyside6 without some directions.

Currently only there are only PyQt bindings. PySide2 is requested (#249) while not solved.

yan12125 pushed a commit that referenced this issue Mar 3, 2021
* Minimal Qt version is bumped in lxqt/lxqt#1844
* Minimal CMake version is bumped in #230
* Closes #402 - confusion around lxqt-build-tools version and PyQt
  builds
@yan12125 yan12125 mentioned this issue Mar 3, 2021
yan12125 pushed a commit that referenced this issue Mar 14, 2021
* Update docs

* Minimal Qt version is bumped in lxqt/lxqt#1844
* Minimal CMake version is bumped in #230
* Closes #402 - confusion around lxqt-build-tools version and PyQt
  builds

* Address comments
inventor2525 pushed a commit to inventor2525/qtermwidget that referenced this issue May 14, 2024
* Update docs

* Minimal Qt version is bumped in lxqt/lxqt#1844
* Minimal CMake version is bumped in lxqt#230
* Closes lxqt#402 - confusion around lxqt-build-tools version and PyQt
  builds

* Address comments
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

Successfully merging a pull request may close this issue.

2 participants