Cuperino / QPrompt-Teleprompter

Teleprompter software for all video creators. Built with ease of use, productivity, control accuracy, and smooth performance in mind.
https://qprompt.app
GNU General Public License v3.0
361 stars 24 forks source link

Build instructions #38

Closed nobicycle closed 2 years ago

nobicycle commented 2 years ago

Scroll down for build instructions

Bug Description Cannot find file: QPrompt-1.0.0/3rdparty/kirigami/kirigami.pro.

$ make
cd 3rdparty/kirigami/ && ( test -e Makefile || /usr/bin/qmake -o Makefile /mnt/Archives/archives/Office/Presentation/qprompt/QPrompt-1.0.0/3rdparty/kirigami/kirigami.pro ) && make -f Makefile 
Cannot find file: /mnt/Archives/archives/Office/Presentation/qprompt/QPrompt-1.0.0/3rdparty/kirigami/kirigami.pro.
make: *** [Makefile:50: sub-3rdparty-kirigami-make_first] Error 2

Steps to Reproduce Download latest release. cd QPrompt-1.0.0 qmake QPrompt.pro make

Detailed description of display configuration (if applicable)

Installed: kcoreaddons 5.89.0-1 (1.3 MiB 3.4 MiB) [kf5] (Installed) kirigami2 5.89.0-1 (563.9 KiB 1.9 MiB) [kf5] (Installed) ki18n 5.89.0-1 (1.9 MiB 17.6 MiB) [kf5] (Installed) clang-13.0.0-4
clazy-1.10-2
compiler-rt-13.0.0-2
qt6-5compat-6.2.2-1
qt6-declarative-6.2.2-1
qt6-positioning-6.2.2-1
qt6-quick3d-6.2.2-1
qt6-quicktimeline-6.2.2-1 qt6-serialport-6.2.2-1
qt6-shadertools-6.2.2-1
qt6-tools-6.2.2-1
qt6-webchannel-6.2.2-1
qt6-webengine-6.2.2-2
yaml-cpp-0.7.0-2
qtcreator-6.0.1-1

Device information $ uname -a Linux tower 5.10.89-1-MANJARO #1 SMP PREEMPT Wed Dec 29 18:09:17 UTC 2021 x86_64 GNU/Linux

Cuperino commented 2 years ago

My apologies @nobicycle, I haven't had time to document this. The qmake project file is misleading; it is only there to enable creating an iOS build, which does not exist yet. All existing builds of QPrompt are created using CMake.

Build Instructions (updated 2022-06-21)

You'll need

Ubuntu/Debian users can run this apt command to satisfy all dev-dependencies:

sudo apt install build-essential kirigami2-dev cmake-extras extra-cmake-modules qml-module-org-kde-kcoreaddons qml-module-qtquick-shapes qtdeclarative5-dev-tools libqt53drender5 libqt5quickshapes5 qtdeclarative5-dev qt5-qmltooling-plugins libqt53dcore5 libkf5kirigami2-doc librhash0 libqt5svg5-dev cmake-data qml-module-qt-labs-qmlmodels qml-module-qtqml-statemachine qml-module-qtquick-dialogs libqt5quicktest5 libqt5x11extras5-dev qml-module-qtquick-scene2d qml-module-qt-labs-platform qml-module-qt-labs-settings libqt53dquickscene2d5 cmake qtquickcontrols2-5-dev gettext libkf5auth-dev-bin libkf5widgetsaddons-dev libkf5iconthemes-dev libkf5iconthemes-doc libkf5codecs-dev libkf5codecs-doc libkf5guiaddons-dev libkf5guiaddons-doc libkf5auth-dev libkf5auth-doc libkf5configwidgets-dev libkf5configwidgets-doc libkf5itemviews-dev libkf5itemviews-doc

Future versions of QPrompt will also require:

Compilation goes like

mkdir build
cmake -B build/ .
cmake --build build/
cd build
sudo make install

To create a Debian package

# Follow steps for compilation and run the following at the build directory.
cpack -G DEB

QPrompt has been tested to build with both GCC and Clang compilers. There is no perceptible performance difference between the two builds.

For QPrompt to build with QT 6 instead of Qt 5, you'll need to modify the CMake project files. You may also need to replace the KDE libraries with their KF6 counterparts, which at the time of writing do not exist. If you're able to build QPrompt using Qt 6 and KF5 libraries, please let me know. I've written QPrompt in such a way that it should work with Qt 6. I'm waiting for KDE to port their libraries to Qt 6 to move over.

Thanks for compiling on Arch, BTW!

...

Quick update, a note mostly for myself: You can manually compile each KDE library against Qt 6 by passing -DBUILD_WITH_QT6=ON -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=CURRENT to cmake, and having a Qt 6 installation that CMake can use in your system paths. Once all libraries are installed, you can compile QPrompt against Qt 6 and KF5. At the time of writing this update, QPrompt's compilation will succeed but it will fail to start because not all of the Kirigami features used in QPrompt have been ported to Qt 6 yet. (updated 2022-06-21)

kbimplis commented 2 years ago

What would the dependencies and build process be for building on Mac OSX? Thanks

Cuperino commented 2 years ago

Hi @kbimplis, On macOS, Windows, and for the Linux AppImage, the project uses KDE's Craft meta build system. Outside of Linux, I haven't been able to create a single working build that does not use Craft. So, if you don't wish to use Craft, it's on you to figure out how. I personally like Craft because it is very effective in streamlining the distribution process to other platforms. I'm going to rely on third party build instructions to save time in maintaining these instructions.

Windows, macOS, and Linux AppImage build instructions

Setup Craft (build Windows, macOS, and Linux AppImage for x86_64 architecture) (Updated: June 29, 2022)

Follow the respective instruction to setup Craft for your operating system. Linux, Windows, and macOS are confirmed to work. The Android is created manually using different instructions. https://community.kde.org/Craft#Setting_up_Craft

To build Linux AppImage, also install these dependencies

sudo apt install libxcb-xinput0 libxcb-xinput-dev

Setup QPrompt inside of Craft's build environment

  1. Start Craft environment (you should be given the OS specific command to start Craft at the end of Craft's setup)
  2. Install QPrompt's Craft repository
    craft --add-blueprint-repository https://github.com/Cuperino/craft-blueprints-qprompt.git
  3. Force use of the Qt 5 Patch Collection by KDE, which fixes bugs present in all other versions of Qt 5:
    craft --set version=kde/5.15 libs/qt5
  4. (optional, not recommended for personal builds) Set KDE Frameworks to a version that is stable and works well on all supported OS. (Determining which version works right with all OS is a process done experimentally.) For QPrompt v1.0, I used version5.86.0 of KDE Frameworks. The version used will appear inside of QPrompt's About page. Package versions are provided by KDE Craft. Some versions may not be available at the time you attempt to build.
    craft --set version=[version] kde/frameworks
  5. (optional) Set which version of QPrompt you wish to install. Supported versions are main and final release version numbers such as v1.0. The version used will appear inside of QPrompt's About page.
    craft --set version=[version] cuperino/qprompt
  6. Run QPrompt's build command
    craft qprompt
  7. (optional) To download the latest source code run:
    craft --update qprompt
  8. (optional) To package QPrompt for your system run:
    craft --package qprompt

    The resulting package will be saved in Craft's tmp folder.

For additional Craft commands and other Craft supported platforms, please refer to Craft's documentation.

Additional information

Android build instructions

First time Docker container setup

docker pull kdeorg/android-sdk
mkdir $HOME/CraftRootAndroid $HOME/apks

Start persistent Docker container

docker run -ti --rm -v $HOME/CraftRootAndroid:/home/user/CraftRoot -v $HOME/apks:/output kdeorg/android-sdk bash

From inside Docker

# Install KDE tooling and dependencies
git clone --depth 1 kde:sysadmin/ci-tooling
/opt/helpers/build-kde-project ki18n Frameworks
/opt/helpers/build-kde-project kcoreaddons Frameworks
/opt/helpers/build-kde-project kirigami Frameworks

# Clone QPrompt repository to src subdirectory
git clone https://github.com/Cuperino/QPrompt.git src/qprompt

# Get parameters for the next command
python /opt/helpers/get-apk-args.py /home/user/src/qprompt/

# Here's the command with all parameters specified
/opt/helpers/build-cmake qprompt https://github.com/Cuperino/QPrompt.git -DQTANDROID_EXPORTED_TARGET=qprompt -DANDROID_APK_DIR=/home/user/src/qprompt/android

# Create APK
/opt/helpers/create-apk qprompt
kbimplis commented 2 years ago

Thank you. Much appreciated

videosmith commented 1 year ago

Cleaned up output. After adding apt command to satisfy all dev-dependencies:

Some errors occurred--

-- The CXX compiler identification is GNU 10.2.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found KF5Kirigami2: /usr/lib/x86_64-linux-gnu/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake (found version "5.78.0") -- Found Gettext: /usr/bin/msgmerge (found version "0.21") -- Found KF5I18n: /usr/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.78.0") -- Found KF5CoreAddons: /usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.78.0") -- Found KF5IconThemes: /usr/lib/x86_64-linux-gnu/cmake/KF5IconThemes/KF5IconThemesConfig.cmake (found version "5.78.0") -- Found KF5: success (found suitable version "5.78.0", minimum required is "5.68.0") found components: Kirigami2 I18n CoreAddons IconThemes

-->>> CMake Warning at CMakeLists.txt:240 (find_package): By not providing "FindKF5Crash.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "KF5Crash", but CMake did not find one.

Could not find a package configuration file provided by "KF5Crash" with any of the following names:

KF5CrashConfig.cmake
kf5crash-config.cmake

Add the installation prefix of "KF5Crash" to CMAKE_PREFIX_PATH or set "KF5Crash_DIR" to a directory containing one of the above files. If "KF5Crash" provides a separate development package or SDK, be sure it has been installed.

-->>> CMake Warning at CMakeLists.txt:245 (find_package): By not providing "FindQHotkey.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "QHotkey", but CMake did not find one.

Could not find a package configuration file provided by "QHotkey" (requested version 1.5.0) with any of the following names:

QHotkeyConfig.cmake
qhotkey-config.cmake

Add the installation prefix of "QHotkey" to CMAKE_PREFIX_PATH or set "QHotkey_DIR" to a directory containing one of the above files. If "QHotkey" provides a separate development package or SDK, be sure it has been installed.

-- Installing in the same prefix as Qt, adopting their path scheme. -- Looking for GLIBC -- Looking for GLIBC - found -- Performing Test _OFFT_IS_64BIT -- Performing Test _OFFT_IS_64BIT - Success -- Performing Test HAVE_DATE_TIME -- Performing Test HAVE_DATE_TIME - Success -- The following REQUIRED packages have been found:

-->>> The following OPTIONAL packages have not been found:

-- Configuring done -- Generating done -- Build files have been written to: /home/stuartscoon/Desktop/QPrompt-1.1.2/build


Did I miss a step?

Cuperino commented 1 year ago

You did not miss any required steps. Making use of optional libraries, can complicate the building process and, at present you don't really gain much from them.

QHotkey library only enables a single shortcut (Meta+Alt+F10) to toggle making all windows fully semi-transparent, and not just their backgrounds, on or off. Future versions of QPrompt will make more and better use of QHotkey, and I will update these instructions accordingly then. The reason v1.1 makes use of said library for an optional feature almost no one needs is because I needed to make sure that I could successfully distribute the 3rd party library in all of QPrompt's distribution formats prior to making the commitment to add hotkey support to more parts of the program.

KF5Crash was incorporated to help me find the cause behind a few crashes, all of which have been addressed. The only benefit installing this library now is QPrompt will automatically try to restart if it crashes. There are no other benefits like file recovery, yet. I haven't gotten v1.1 to crash on Linux or Mac. Only the Windows and Haiku versions can be crashed in my experience and, in the case of Windows, this crash is difficult to trigger involuntarily in my opinion.

Nevertheless, if you'd like these optional features now, do the following prior to compiling QPrompt:

  1. Install KCrash dev dependency

    sudo apt install libkf5crash-dev
  2. Build and install QHotkey from a folder outside of QPrompt's folder, by following these instructions: https://github.com/Skycoder42/QHotkey

videosmith commented 1 year ago

A few more items (text between graphic lines- tried to space it apart more for clarity, however some auto-formatting here rejected my input) - apologies for the long entry but wasn't certain if just terminal window snippets would be sufficient:

root@xxx-Laptop:/home/xxxxxx/Desktop/QPrompt-1.1.2# mkdir build
root@xxx-Laptop:/home/xxxxxx/Desktop/QPrompt-1.1.2# cmake -B build/ .
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
******************************************************************************************************************************************
-- Check for working CXX compiler: /usr/bin/c++ - skipped
******************************************************************************************************************************************
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found KF5Kirigami2: /usr/lib/x86_64-linux-gnu/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake (found version "5.78.0") 
-- Found Gettext: /usr/bin/msgmerge (found version "0.21") 
-- Found KF5I18n: /usr/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.78.0") 
-- Found KF5CoreAddons: /usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.78.0") 
-- Found KF5IconThemes: /usr/lib/x86_64-linux-gnu/cmake/KF5IconThemes/KF5IconThemesConfig.cmake (found version "5.78.0") 
-- Found KF5: success (found suitable version "5.78.0", minimum required is "5.68.0") found components: Kirigami2 I18n CoreAddons IconThemes 
CMake Warning at CMakeLists.txt:240 (find_package):
  By not providing "FindKF5Crash.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "KF5Crash",
  but CMake did not find one.

  Could not find a package configuration file provided by "KF5Crash" with any
  of the following names:

    KF5CrashConfig.cmake
    kf5crash-config.cmake

  Add the installation prefix of "KF5Crash" to CMAKE_PREFIX_PATH or set
  "KF5Crash_DIR" to a directory containing one of the above files.  If
  "KF5Crash" provides a separate development package or SDK, be sure it has
  been installed.

CMake Warning at CMakeLists.txt:245 (find_package):
  By not providing "FindQHotkey.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "QHotkey", but
  CMake did not find one.

  Could not find a package configuration file provided by "QHotkey"
  (requested version 1.5.0) with any of the following names:

    QHotkeyConfig.cmake
    qhotkey-config.cmake

  Add the installation prefix of "QHotkey" to CMAKE_PREFIX_PATH or set
  "QHotkey_DIR" to a directory containing one of the above files.  If
  "QHotkey" provides a separate development package or SDK, be sure it has
  been installed.

-- Installing in the same prefix as Qt, adopting their path scheme.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- The following REQUIRED packages have been found:

 * ECM (required version >= 5.68.0)
 * QT
 * Qt5Qml (required version >= 5.15.2)
 * Qt5QmlModels (required version >= 5.15.2)
 * Qt5Quick
 * Qt5Svg
 * Qt5Gui
 * Qt5QuickControls2
 * Qt5Network
 * Qt5X11Extras
 * Qt5
 * KF5Kirigami2 (required version >= 5.68.0)
 * Gettext
 * KF5I18n (required version >= 5.68.0)
 * KF5CoreAddons (required version >= 5.68.0)
 * Qt5Widgets (required version >= 5.14.0)
 * KF5IconThemes (required version >= 5.68.0)
 * KF5 (required version >= 5.68.0)
 * Qt5Core

-- The following OPTIONAL packages have not been found:

 * KF5Crash, Graceful handling of application crashes.
 * QHotkey (required version >= 1.5.0)

-- Configuring done
-- Generating done
-- Build files have been written to: /home/xxxxxx/Desktop/QPrompt-1.1.2/build

root@xxx-Laptop:/home/xxxxxx/Desktop/QPrompt-1.1.2# cmake --build build/
Scanning dependencies of target pofiles-ab72fa3e2a4b170ad4e3282d4adeb4c4
[  7%] Generating mo...
[  7%] Built target pofiles-ab72fa3e2a4b170ad4e3282d4adeb4c4
Scanning dependencies of target tsfiles-ab72fa3e2a4b170ad4e3282d4adeb4c4
[ 14%] Generating ts...
[ 14%] Built target tsfiles-ab72fa3e2a4b170ad4e3282d4adeb4c4
Scanning dependencies of target qprompt_autogen
[ 21%] Automatic MOC and UIC for target qprompt
[ 21%] Built target qprompt_autogen
[ 28%] Automatic RCC for icons/icons.qrc
[ 35%] Automatic RCC for qml.qrc
[ 42%] Automatic RCC for assets.qrc
Scanning dependencies of target qprompt
[ 50%] Building CXX object build/CMakeFiles/qprompt.dir/qprompt_autogen/mocs_compilation.cpp.o                                                                          
In file included from /home/xxxxxx/Desktop/QPrompt-1.1.2/build/build/qprompt_autogen/YJWVCCTYAF/../../../../src/prompter/documenthandler.h:83,
                 from /home/xxxxxx/Desktop/QPrompt-1.1.2/build/build/qprompt_autogen/YJWVCCTYAF/moc_documenthandler.cpp:10,
                 from /home/xxxxxx/Desktop/QPrompt-1.1.2/build/build/qprompt_autogen/mocs_compilation.cpp:2:
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h: In constructor ‘Marker::Marker(const QString&, int, int, int, const QString&, const QString&, int)’:

******************************************************************************************************************************************
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:67: warning: unused parameter ‘length’ [-Wunused-parameter]
   36 |       Marker(const QString& text, const int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                       ~~~~~~~~~~^~~~~~

/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:105: warning: unused parameter ‘keyLetter’ [-Wunused-parameter]
   36 | t int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                  ~~~~~~~~~~~~~~~^~~~~~~~~
******************************************************************************************************************************************

[ 57%] Building CXX object build/CMakeFiles/qprompt.dir/main.cpp.o
In file included from /home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/documenthandler.h:83,
                 from /home/xxxxxx/Desktop/QPrompt-1.1.2/src/main.cpp:62:
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h: In constructor ‘Marker::Marker(const QString&, int, int, int, const QString&, const QString&, int)’:

******************************************************************************************************************************************
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:67: warning: unused parameter ‘length’ [-Wunused-parameter]
   36 |       Marker(const QString& text, const int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                       ~~~~~~~~~~^~~~~~
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:105: warning: unused parameter ‘keyLetter’ [-Wunused-parameter]
******************************************************************************************************************************************

   36 | t int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                  ~~~~~~~~~~~~~~~^~~~~~~~~

[ 64%] Building CXX object build/CMakeFiles/qprompt.dir/prompter/documenthandler.cpp.o                                                                                  
In file included from /home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/documenthandler.h:83,
                 from /home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/documenthandler.cpp:72:
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h: In constructor ‘Marker::Marker(const QString&, int, int, int, const QString&, const QString&, int)’:

******************************************************************************************************************************************
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:67: warning: unused parameter ‘length’ [-Wunused-parameter]
   36 |       Marker(const QString& text, const int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                       ~~~~~~~~~~^~~~~~

/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:105: warning: unused parameter ‘keyLetter’ [-Wunused-parameter]
   36 | t int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                  ~~~~~~~~~~~~~~~^~~~~~~~~

/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/documenthandler.cpp: In member function ‘void DocumentHandler::preventSleep(bool)’:
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/documenthandler.cpp:954:41: warning: unused parameter ‘prevent’ [-Wunused-parameter]
  954 | void DocumentHandler::preventSleep(bool prevent) {
      |                                    ~~~~~^~~~~~~
******************************************************************************************************************************************

[ 71%] Building CXX object build/CMakeFiles/qprompt.dir/prompter/markersmodel.cpp.o
In file included from /home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.cpp:22:
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h: In constructor ‘Marker::Marker(const QString&, int, int, int, const QString&, const QString&, int)’:

******************************************************************************************************************************************
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:67: warning: unused parameter ‘length’ [-Wunused-parameter]
   36 |       Marker(const QString& text, const int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                       ~~~~~~~~~~^~~~~~

/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:36:105: warning: unused parameter ‘keyLetter’ [-Wunused-parameter]
   36 | t int position, const int length, const int key, const QString& keyLetter, const QString& url, const int requestType)
      |                                                  ~~~~~~~~~~~~~~~^~~~~~~~~

/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h: In member function ‘Marker MarkersModel::binarySearch(int, int, int, bool)’:
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:27:8: warning: ‘virtualMarker.Marker::key’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   27 | struct Marker {
      |        ^~~~~~
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:27:8: warning: ‘virtualMarker.Marker::requestType’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h: In member function ‘Marker MarkersModel::nextMarker(int)’:
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:27:8: warning: ‘invalidPositionMarker.Marker::key’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   27 | struct Marker {
      |        ^~~~~~
/home/xxxxxx/Desktop/QPrompt-1.1.2/src/prompter/markersmodel.h:27:8: warning: ‘invalidPositionMarker.Marker::requestType’ may be used uninitialized in this function [-Wmaybe-uninitialized]
******************************************************************************************************************************************

[ 78%] Building CXX object build/CMakeFiles/qprompt.dir/qprompt_autogen/EWIEGA46WW/qrc_qml.cpp.o                                                                        
[ 85%] Building CXX object build/CMakeFiles/qprompt.dir/qprompt_autogen/EWIEGA46WW/qrc_assets.cpp.o 

******************************************************************************************************************************************                                                                    
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
gmake[2]: *** [build/CMakeFiles/qprompt.dir/build.make:271: build/CMakeFiles/qprompt.dir/qprompt_autogen/EWIEGA46WW/qrc_assets.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:368: build/CMakeFiles/qprompt.dir/all] Error 2
gmake: *** [Makefile:182: all] Error 2
******************************************************************************************************************************************

root@xxx-Laptop:/home/xxxxxx/Desktop/QPrompt-1.1.2#
Cuperino commented 1 year ago

The following error:

c++: fatal error: Killed signal terminated program cc1plus

means the operating system prevented compilation from completing. In the context of QPrompt, this usually happens because the computer being used to compile QPrompt lacks or cannot allocate the necessary RAM to complete the compilation process.

A minimum of 6 GB of RAM is recommended to compile QPrompt. Two workarounds can be used to compile QPrompt in 64 bit architecture systems with only 4 GBs of RAM:

First workaround: Reduce the number of cores used by the compiler to reduce RAM usage

You can reduce the number of "jobs" or CPU cores dedicated to building QPrompt by passing the --parallel 1 argument to cmake's build instruction.

cmake --build build/ --parallel 1

This solution is not guaranteed to work because QPrompt's RAM requirements increase as features grow, and I haven't tried compiling with 4 GB of RAM in a while. Nevertheless, if the approach does work, no modifications to QPrompt would be needed.

Second workaround: Prevent included Asian languages font from being bundled with QPrompt

This approach works because the bundling of assets is the part that consumes the most RAM while building QPrompt.

  1. Remove the following line from src/assets.qrc
        <file alias="fonts/sourcehansans.ttc">fonts/editor/SourceHanSans/SourceHanSans-Regular.ttc</file>
  2. And remove the following lines from src/kirigami_ui/EditorToolbar.qml
            FontLoader {
                id: asianSeriousSansFont
                source: "fonts/sourcehansans.ttc"
            }
                MenuItem {
                    text: i18nc("FontName (Translatable font details)", "Source Han Sans (CH, JP, KO)")
                    onTriggered: viewport.prompter.document.fontFamily = asianSeriousSansFont.name
                }

Additional note

It is not possible to build QPrompt on 32 bit systems because those systems allocate considerably less than 4 GB of RAM to the compiler. Cross-compilation is a requirement to make a fully featured build for a 32 bit operating system.

Regarding formatting

You can use the triple quotes described on this guide to format terminal output on GitHub: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code

videosmith commented 1 year ago

Understood and thank you. The only computer I have with sufficient memory is an old mac pro. Can a compile be performed from a linux Live cd?

Cuperino commented 1 year ago

The only computer I have with sufficient memory is an old mac pro. Can a compile be performed from a linux Live cd?

Running from a live system may increase RAM requirements. If the Mac's CPU is of Intel architecture, and the Mac can boot a distribution modern enough to meet QPrompt's dependencies, then yes, you should be able to compile and package QPrompt from a Linux live CD or live USB flash.

Just keep in mind that Mac boot loaders work different to regular PCs and extra considerations may be needed to get a Linux system to boot.

videosmith commented 1 year ago

Thank you I will look into it. Hopefully booting with refind will work.