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

Building Havoc QT Client on Ubuntu 20.04 codespace #95

Closed
zrayburn opened this issue Sep 30, 2022 · 4 comments
Closed

Building Havoc QT Client on Ubuntu 20.04 codespace #95

zrayburn opened this issue Sep 30, 2022 · 4 comments

Comments

@zrayburn
Copy link

Build Context
I was attempting to build the Havoc Client in a GitHub Codespace which is based on Ubuntu 20.04.
Docker image the Codespace is based on: mcr.microsoft.com/devcontainers/universal:2
VERSION="20.04.5 LTS (Focal Fossa)"
This build was attempted on commit ID 8418a43.
Steps

  1. Spin up Codespace dev environment
  2. Follow pre-requisite installation

Pre-requisites

sudo apt install -y git build-essential apt-utils cmake libfontconfig1 libglu1-mesa-dev libgtest-dev libspdlog-dev libboost-all-dev libncurses5-dev libgdbm-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev mesa-common-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5websockets5 libqt5websockets5-dev qtdeclarative5-dev golang-go qtbase5-dev libqt5websockets5-dev libspdlog-dev python3-dev libboost-all-dev mingw-w64 nasm

Ubuntu 20.04 / 22.04

You must enable Python 3.10 in your APT repositories before you can run the Client successfully.

sudo apt install build-essential
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10 python3.10-dev
  1. Follow Build and Run

Build and Run:

cd Havoc/Client
mkdir Build
cd Build
cmake ..
cd ..
./Havoc.sh
  1. Error generated during build
/workspaces/Havoc/Client/Source/UserInterface/Widgets/DemonInteracted.cpp: In member function ‘void HavocNamespace::UserInterface::Widgets::DemonInteracted::AppendText(const QString&)’:
/workspaces/Havoc/Client/Source/UserInterface/Widgets/DemonInteracted.cpp:200:40: error: incomplete type ‘QDate’ used in nested name specifier
  200 |             ColorText::Comment( QDate::currentDate().toString( "dd/MM/yyyy" ) + " "+ QTime::currentTime().toString( "hh:mm:ss" ) +
      |                                        ^~~~~~~~~~~
/workspaces/Havoc/Client/Source/UserInterface/Widgets/DemonInteracted.cpp:200:93: error: incomplete type ‘QTime’ used in nested name specifier
  200 |             ColorText::Comment( QDate::currentDate().toString( "dd/MM/yyyy" ) + " "+ QTime::currentTime().toString( "hh:mm:ss" ) +
      |                                                                                             ^~~~~~~~~~~
  1. Fix in my environment
    In Client/Include/global.hpp add #include <QTime> at the top of the file.

Discussion
Most likely this is just the Codespace docker container not using the same QT headers as a full normal Ubuntu install. Would it be detrimental to include QTime explicitly instead of relying upon the OS to implicitly include it?
I haven't tested on a full ubuntu VM yet but I assume that builds fine.

@zrayburn
Copy link
Author

Noticed this same issue in the wiki, just didn't see it before publishing this issue. Solution is to install a newer version of QT backported to ubuntu 20.04. Trying build process on 22.04 to see if it needs to be qt6 across the board.

@zrayburn
Copy link
Author

Yes this is exclusively a 20.04 issue with it's specific version of qt5. Could update the global.hpp or maybe just include a separate build step for 20.04.

@js-virtualretail
Copy link

Came here for the same reason. Got the error while compiling in Ubuntu 20.04 and had to #include <QTime> in /Client/Source/UserInterface/Widgets/DemonInteracted.cpp for it to work.

@chbGSmCm
Copy link
Contributor

chbGSmCm commented Oct 5, 2022

As @js-virtualretail seems to have solved it, I will close this issue. Ive mentioned it in the WIKI and requested a merge in #139.

@chbGSmCm chbGSmCm closed this as completed Oct 5, 2022
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

3 participants