# Compiling Qcad with QT6 under Linux

**URL:** <http://forum.qcad.org/t/compiling-qcad-with-qt6-under-linux/9449>\
**Category:** QCAD Community Edition\
**Created:** [April 6, 2025, 3:46pm UTC](http://forum.qcad.org/t/compiling-qcad-with-qt6-under-linux/9449 "2025-04-06T15:46:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagmat84](http://forum.qcad.org/letter_avatar_proxy/v4/letter/n/cab0a1/32.png) [@nagmat84](http://forum.qcad.org/u/nagmat84)\
**Post date:** [April 6, 2025, 3:46pm UTC](http://forum.qcad.org/t/compiling-qcad-with-qt6-under-linux/9449/1 "2025-04-06T15:46:42Z")

</div>

How do I compile Qcad with QT6 under Linux?

I read [QCAD - QCAD](https://www.qcad.org/en/component/content/article/78-qcad/111-qcad-compilation-from-sources) but this only contains instructions for QT6 under Windows or QT5 under Linux.

Specifically, I have the following questions:

1. Do I also have to clone qtjsapi and qcadjsapi for Qt6 under Linux or is this Windows only?
2. Which packages do I need as dependencies? (I am running Gentoo. I do not expect someone to know the Gentoo Packages, Debian packages would be fine, too. I will look up the corresponding Gentoo packages myself.)
3. How do I set BUILD\_QT6=ON? Are the CMake scripts actually necessary under Linux? The Linux instructions for Qt5 seem to use qmake and traditional make only.
4. The instructions for Qt5 under Linux first list package dependencies for various distribution, but then step 2 asks to download Qt5 from the QT upstream website. This seems odd. Is the indentation wrong? I guess this is actually an alternative for step 1, right?

---

<div class="post-metadata">

**Author:** ![Matfie](http://forum.qcad.org/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@Matfie](http://forum.qcad.org/u/Matfie)\
**Post date:** [April 11, 2025, 7:47am UTC](http://forum.qcad.org/t/compiling-qcad-with-qt6-under-linux/9449/2 "2025-04-11T07:47:56Z")

</div>

Hello

I updated QCAD for Qt6 for NetBSD recently (not Linux, but..), see [Making sure you're not a bot!](https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/cad/qcad/Makefile?rev=1.127)

1. Yes, I did that
2. If you run cmake it will tell you what it is missing - I used qtbase, qtdeclarative, qttools, qtsvg, qt5compat there are also some optional requirements
3. cmake -DBUILD\_QT6=ON
4. perhaps the instructions are not yet updated

---

<div class="post-metadata">

**Author:** ![nagmat84](http://forum.qcad.org/letter_avatar_proxy/v4/letter/n/cab0a1/32.png) [@nagmat84](http://forum.qcad.org/u/nagmat84)\
**Post date:** [May 13, 2025, 6:14pm UTC](http://forum.qcad.org/t/compiling-qcad-with-qt6-under-linux/9449/3 "2025-05-13T18:14:39Z")

</div>

Compilation and linking works, but qcad-bin crashes with

```plaintext
CAD version 3.32.2
20:13:22: Debug: loading plugins...
20:13:22: Debug: loading static plugins...
Warning: No script handler found...
Warning: QThreadStorage: Thread 0x55efee092310 exited after QThreadStorage 8 destroyed
Warning: QThreadStorage: Thread 0x55efee092310 exited after QThreadStorage 6 destroyed
Warning: QThreadStorage: Thread 0x55efee092310 exited after QThreadStorage 1 destroyed

```

---

<div class="post-metadata">

**Author:** ![nagmat84](http://forum.qcad.org/letter_avatar_proxy/v4/letter/n/cab0a1/32.png) [@nagmat84](http://forum.qcad.org/u/nagmat84)\
**Post date:** [May 15, 2025, 12:47pm UTC](http://forum.qcad.org/t/compiling-qcad-with-qt6-under-linux/9449/4 "2025-05-15T12:47:30Z")

</div>

I found the solution. I posted it in [Building on Gentoo with recent Qt - QCAD Community Edition - QCAD Forum](https://forum.qcad.org/viewtopic.php?f=76&t=3517&p=48128#p48128)
