QCAD 3.33.0 port

There was new QCAD version available, so i tried to compile it too and managed to get it work. :smiling_face_with_sunglasses:

Notes to myself:

Download sources from QCAD:

Extract zip and cd to it.

Install following packages:

qt5_script
qt5_script_devel

It needs qt-labs-qtscriptgenerator-5.15.19 , so i copied newest version which were included in sources, 5.15.8

cp -R src/3rdparty/qt-labs-qtscriptgenerator-5.15.8 src/3rdparty/qt-labs-qtscriptgenerator-5.15.19

Renamed .pro file to match version:

mv src/3rdparty/qt-labs-qtscriptgenerator-5.15.19/qt-labs-qtscriptgenerator-5.15.8.pro src/3rdparty/qt-labs-qtscriptgenerator-5.15.19/qt-labs-qtscriptgenerator-5.15.19.pro

Open src/core/RDebug.cpp file and find..

#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID)
#include <execinfo.h>
#endif

Change it to:

#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU)
#include <execinfo.h>
#endif

..find another:

void RDebug::printBacktrace(const QString& prefix) {
#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID)
void *array[20];
size_t size;
char **strings;
int i;

Changed it to:

void RDebug::printBacktrace(const QString& prefix) {
#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU)
void *array[20];
size_t size;
char **strings;
int i;

Open qcad-pro and comment out following, otherwise it goes infinite loop:

#else {

#SUBDIRS += $$system(“ls -d ../qcad?* 2>/dev/null | grep -v $(basename $(pwd))$”)

#}

Compile, use -j1 because 8gb of ram. With -j2 it starts to use swap and slows down a lot:

qmake -r
make -j1 release

Start QCAD:

cd “/MyStuff/compiled_apps/qcad-3.33.0.0”
export LIBRARY_PATH=./release:/boot/system/lib
./release/qcad-bin

And voila..

7 Likes

First of, thanks on the pointers for QCad, did an attempt some time ago, but failed trying with Qt6 (didn’t know about the possibility to do this with Qt5 - granted didn’t hunt it down).
Things I left out was patching for libexecinfo and the “loop” you mentioned, one file I had to patch for missing Qt5Script headers, recipe is updated here, if you still want to have a go at it at haikuports I could guide you through the process, otherwise I’ll probably update the recipe myself. :slight_smile:

EDIT: first I’ll try to get a build for Qt6 (checking up on Arch recipe, it should be possible) :slight_smile:

2 Likes

I took the initiative to move these posts into a dedicated QCAD topic thread

2 Likes

Still running into a LOT of errors when trying to build for Qt6, specific the 3rdparty library opennurbs, so I pushed the recipe to haikuports now, builds should start on buildmasters soon enough. Thanks again!

3 Likes

Big thanks to you too! :slightly_smiling_face:

1 Like

New version of qcad available. It compiled fine.

I still haven’t got fixed “print review” blank buttons in haiku, those are still without icons..

3 Likes