# QCAD



## AScribot (Nov 30, 2022)

Hi, 
After installing the qcad pkg, when I type the command "qcad", I get :

```
QCAD version  3.27.6.7
15:38:32: Debug:    loading plugins...
15:38:32: Debug:    loading static plugins...
Segmentation fault
```
 A similar message comes up during compilation if I try to install the port.

Does anybody know how to solve this (probably simple) problem ?

Thanks, Al


----------



## SirDice (Nov 30, 2022)

What version of FreeBSD and how up to date are the rest of your packages?


----------



## T-Daemon (Nov 30, 2022)

There is a PR  cad/qcad: core dumps on -current (also on 13.1).

The culprit seems to be devel/qt5-script. As workaround it's suggested to build the port  `WITH_DEBUG=yes`.


----------



## AScribot (Nov 30, 2022)

Hi Sir-D & T-D,
Thanks for your replies.

FreeBSD version is 13.1-RELEASE-p5. 
-Concerning  update of packages, I removed all concerning qcad, updated my packages and reinstalled (pkg install qcad). Unfortunately the problem remains. 
-Concerning "WITH_DEBUG=yes", I suppose that means having a "make.conf " file in /etc, which in 13.1 is going to take a bit of work. I'll try to sort it out tomorrow.

Otherwise after updates, I tried /usr/ports again:
 compilation output is:

===>  Patching for qcad-3.27.7.0
===>  Applying FreeBSD patches for qcad-3.27.7.0 from /usr/ports/cad/qcad/files
===>   qcad-3.27.7.0 depends on executable: bash - found
===>   qcad-3.27.7.0 depends on file: /usr/local/lib/libopenNURBS.a - not found
===>  opennurbs-20130711_3 needs SRC_BASE to compile. Install base system
sources and try again.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/graphics/opennurbs
*** Error code 1

I'll look libopenNURBS.a and SRC_BASE also tomorrow... unless you tell me there's an easier way around.

Thanks again for your help, Al


----------



## T-Daemon (Nov 30, 2022)

AScribot said:


> -Concerning "WITH_DEBUG=yes", I suppose that means having a "make.conf " file in /etc


Only devel/qt5-script needs to be build `WITH_DEBUG=yes`, like:

```
/usr/ports/devel/qt5-script # make install clean WITH_DEBUG=yes
```

From PR 265989 comment 10:

```
If you just need to use qcad then, as somebody mentioned above, the workaround is
to install devel/qt5-script with debug info (WITH_DEBUG=yes).
```



AScribot said:


> I'll look libopenNURBS.a and SRC_BASE also tomorrow... unless you tell me there's an easier way around.



You don't need to install cad/qcad from ports, in fact you don't need to re-install it at all, only devel/qt5-script. But if you insist, the build message gives all the information needed:


AScribot said:


> ===> qcad-3.27.7.0 depends on file: /usr/local/lib/lib*openNURBS*.a - not found
> ===> *opennurbs*-20130711_3 ...


graphics/opennurbs


AScribot said:


> ===> *opennurbs*-20130711_3 needs SRC_BASE to compile. *Install base system
> sources* and try again.


Fetch the FreeBSD source code, populate /usr/src .

Alternatively install missing build dependencies from packages, no base system sources needed:

ports(7)

```
Example 2: Installing Dependencies with pkg(8)

       The following example shows how to build and install a port without
       having to build its dependencies.  Instead, the dependencies are
       downloaded via pkg(8).

         # make install-missing-packages
         # make install

       It is especially useful, when the dependencies are costly in time and
       resources to build (like lang/rust).  The drawback is that pkg(8)
       offers only packages built with the default set of OPTIONS.
```

Only make sure packages and ports tree are from the same branch ('quarterly', 'latest') if you want to mix them.


----------



## AScribot (Dec 1, 2022)

Hi again,
SOLVED
Well T-D, many many thanks for your help ! QCAD works like a breeze. 

3 cheers, Al


----------

